A new multi-digital-source DSP project

Hello everyone.

I have not yet read all the way through Tranquility Base's thread, but I am embarking on a similar project.

I have recently been doing a thread over on the Solid State Amp board on renovating some Adcom GFA 565 amps. These are part of the system I am building...so I decided to start this thread on the rest of the system.

I currently have a three source semi-digital system. I like to select music and control it from my iPad or phone (essentially a better remote than a simple remote). I have 24/96 FLAC files on an HDD, iTunes on the iPad, and LPs. I use an Arcam AirDAC to convert the digital files (using the TOSLink output from an Airport Express, that is also the ethernet hub for the HDD/AirDAC link. I also set up a MiniDSP digital crossover and EQ system ahead of the non-phono preamp. I am using the test monitor loop to get the phono source into the overall system. It works and sounds great (the MiniDSP crossover and EQ is very nice), but there are a lot of components, cables and wires, and, as I have said to my wife, it sort of requires a "ride along mechanic" to make sure it works. It is a bit of a mess of components, and wires, and it isn't really very convenient, even if it sounds great!

So my friend and I set out to design a better system to do all this.

Our goals:
Select physical source:
• Select either via front panel push button switch or via tablet application
• Application selection is direct select of any source via soft key
• Selection by either method causes front panel display, and application to reflect change

Control Playback for digital sources:
• Touch to play
• Side volume control or manual knob control (either changes display on unit and on iPad)
• Conventional screen controls: play/pause/stop

Seamlessly support a variety of sources:
• Analog LP (converted to 24/96)
• Analog AUX (converted to 24/96)
• Digital External (TOS and S/PDIF coax)
• Digital HDD
• Digital WiFi (e.g; Pandora/Spotify or iTunes converted from 16/44.1 to 24/96)
• Provide automatic mute and fade in/out when changing sources

Provide 2x2 crossover in digital domain (any of the above stereo inputs result in 4 output channels 2 HF and 2 LF) all processing tone done at 24/96.

Provide for user controllable/managed room equalization (using an external USB mic. Goal is to be able to use calibrated phone mic to do this)

We will be doing this with a Raspberry Pi as the main controller, a custom digital board to provide the rate conversion and digital source selection, A/D and D/A conversion, and a custom analog board to provide the pre and post amplification. I plan to use a Cirrus 5381 ADC for the analog inputs and two Cirrus 4398 DACs for the output. The ASRC is a TI 4382, which also supports the source selection controlled by the RPi. The DSP is the same Analog Devices SHARC used by Tranquility Base, providing 8K FIR coefficients for some pretty sweet digital filtering.

I'll be documenting this project here as we move forward.

Hope you all enjoy it!

Using I2C to control the ASRC, and the DACs seems to be pretty straightforward. Using the DACs in control mode allows us to implement the volume control and mute functions digitally, which is nice, and using the RPi to generate the I2C commands is simple.

We will also use the RPi to implement the wireless "airplay" functionality as well as the HDD interface. These come to the RPi as ethernet packets, and get sent out to the ASRC as I2S signals.

The preamplified LP phono input is digitized at 24/96 in the ADC, and this is also provided to the ASRC in I2S format. The ASRC also supports PCM inputs, so we will support up to four TOS or SP/DIF inputs (The prototype will have just one of each, but adding others is easy).

The ASRC converts everything to 24/96, and, under control by the RPi over I2C, supports selection of any of the sources. We then ferry off the selected and re-sampled signal in I2S format to the SHARC, which provides the crossover and parametric EQ filtering. Using the SHARC allows us to implement FIR filters, so we can control phase very accurately.

Once the SHARC does its job, the (now four channels ) audio comes back in I2S, which is sent to the dual DACs.

The core issues we are concerned about are clock jitter and distribution, and noise.

We have at least two clocks. The RPI has one, and the SHARC has another. The SHARC is a 24.576 MHz unit, which is great for 96 KHz sample rates, but we do not yet know how clean it is, and currently, the MiniDSP MiniSHARC is set up to provide the clock, so for the near term we are stuck with it. We'll see how well it works.

The RPI clock is a little more complex. There are apparently a few hacks that allow the use of external BCLK and LRCK signals on the RPI, so we are going to explore that. It is made slightly complicated that some HDD files (e.g. FLAC rips of CDs) are recorded at 44.1 KHz, so we may end up with a separate and selectable I2S clock so when the file is 44.1, we select the slightly lower clock. The ASRC provides all the rate interpolation to maintain bit perfect operation with these different clock rates, but we need to be sure we don't skip packets or bits from the RPi when they are clocked onto the I2S bus enroute to the ASRC. I am sure we will have much more to say about this as we progress!

We plan to deal with noise in two ways. The audio line inputs go directly to an analog board. This board is in a shielded housing inside the unit. It contains the pre-amplifiers and filters for the ADC, and the output amplifiers for the DACs. Our power supply board provides well regulated ±12 volt power to both the analog and digital boards, and it is then regulated locally again on each board. The only place the analog and digital systems meet is at the ±12V supply ground, inside the DAC/ADC chips, and through a back to back pair of Schottky diodes (as recommended by TI). These chips provide inputs for both digital power and ground, and analog power and ground. We ship analog power and ground from the analog board to the analog side of the DAC/ADC board, so there is minimal interaction between the two.

Lastly we will send the input and output audio signals to and from the shielded analog board using shielded cables. We think that paying close attention to grounding, shielding and supply isolation should significantly reduce the potential for corrupting the analog signals


Last edited:
Well, we have been making slow but steady progress on this project.

We developed a power supply for the overall system, and did up a breadboard of the analog output stage (DAC and amplifiers), and set that up to interface with the Raspberry Pi and the TI 4382 ASRC Evaluation board.

Part of this involved a patch board to get the various I/Os right, and to also address the clock issue (see here for that http://www.diyaudio.com/forums/digi...-pi-external-i2s-master-clock-pcm_mclk-3.html Post #28).

We had a few issues with component layouts from the Eagle libraries having the wrong pin assignments (I am going to check every one of this next time I design something!!), and some power transformer spec issues, but that all seems to be working fine now. Those issues ruined the first DAC, and resulted in a new breadboard PCB, which set us back a bit.

My colleague Dennis has been working on the RPi software, digging into the ALSA drivers, and working out the various I2C configuration bits.

The digital board has a Cirrus 5381 A/D converter, which will digitize analog audio from the LP input. There are two Cirrus 4398 DACs, one for the LF channels and one for the HF channels.

The core of this is the TI 4382 ASRC. this handles both the input selection tasks, and all of the rate conversion. We have inputs for Analog (converted directly to 24/96), TOS/SPDIF, and 16/44.1, 16/48 and 24/96 from the RPi (sourced from digital storage).

We use the I2C controls to configure the ASRC, and we have set up the DACs so they can be switched between "hardware mode" (fixed configuration) and "control mode" full I2C control. The control mode is nice since it includes a full suite of mute and volume control features, including fading and such. All of that will be controlled by the RPi. This accounts for some of the circuitry around the two DACs (upper right in the image below)

Here is the layout for the digital board. The SHARC will sit on top of this on the left, the RPI will sit on top on the upper right. Data comes from the ASRC to the SHARC via the 30 pin connector, gets filtered and equalized, and then comes back to the DACs, and from there off to a separate shielded analog board. This is a four layer board. The digital ground and power embedded planes are on the left side, and the analog embedded ground plane is on the right. These are joined by back to back Schottky diodes, per TI's application notes.

We will be testing the eval board with the RPi next, and will probably commit the digital and analog boards in the next few weeks.

Last edited:
And here is the breadboard, all connected up. The board on the right is the DAC and RPi control interface, the board in the middle has the clock generator and provides for proper pinouts to the eval board. The board on the left is the TI SRC 4382 evaluation board.

All of this will end up on the digital board, except for the analog amplifier section of the breadboard.

Looking good, is there a reason you are limiting to 4 outputs?

This system is designed to accept a variety of different stereo (2-channel) inputs from different sources, some of which may be analog, and some of which may be digital with different sample rates and bit depths. We can select any source from a connected device (e.g tablet or phone), or from the front panel. once the source is connected we can then select content from that source (if it is digital), and route it to the SHARC for processing.

If it is an analog LP input, then it gets digitized and then sent to the ASRC where it can be selected.

Once the source is selected, it is converted as necessary to 24/96, and routed to the SHARC.

The SHARC provides FIR filtering to perform crossover filtering and also to provide amplitude and phase EQ filtering. The SHARC has up to eight channels, but at 96 KHz the number of taps is limited, and the filters become pretty ragged. If I were doing eight output channels I'd probably use two SHARCs.

So, currently all we need is two input channels (from one of 5 sources, one of them analog), and we generate four output channels that emerge in analog form from the DACs.

If you just have one source with lots of channels and want to process them in a DSP, I'd change up the architecture a bit. First, if they are already 24/96, and there is no complicated source selection, then you would not need the ASRC. What you would need is several SHARCs, and then a big DAC board. You would convert all of the inputs to I2S, and then fan them out to the SHARCs. Assuming you still needed to do crossovers (I don't know much about things like home theatre), then the SHARC would provide the crossover function as well as the EQ filtering.

Our goal here is a clean turnkey system that can be controlled from the front panel (source and volume), or from a connected device (e.g. iPad/iPhone), will allow the user to select any digital track to play from the connected device, and will provide crossover and equalization for the four outputs.

Additional features are in-room one-touch room equalization (using a USB mic), and HF/LF balance control (as part of the system setup).
2CH DSP will rule out 3way and 4way speakers where the crossover design is complex enough to benefit from DSP.
Please consider expanding to support at least 8 channels.
Have you considered the 5th gen SHARC?

I suppose, but realistically a 3 or 4 way system with digital line crossovers is unlikely to have significantly fine amplifiers. One would need 8 amps for a 4-way two channel system. While that might be realistic for powered speaker systems, and/or a pile of plate amps, our goal here is more audiophile oriented, and the market for 8x multi-amped audiophile systems is, I suspect pretty small..for one, because it would be hugely expensive just to drive such a setup.

My current system includes only three 350 watt Adcom 565 amps, one driving a 15 inch sub, and the others driving a set of vintage Magnepans.. The sound is breathtaking. Not convinced that more speakers resolves to better aural quality.

I have a thread over in Solid State dealing with the restoration of old Adcom 350 Watt mono bloc amps. I have done four of these, and, at 45 Lb each, and 100 watts + AC, I can't imagine using eight of them! OTOH, you may have a point that providing more channels may be attractive to a larger market.

I'll consider your request going forward, and we may look into a simpler multi-input SHARC system going forward. For now, we need to get this one done!!
Last edited:
Yeah the modern Sharc chips have more than enough taps for at least 3 and 4 way. 6 channel would be the sweet spot, it would allow for either 3 way or 2 way with a sub.

Amplification is cheap these days, I've got 8 channels in 1 box. 3.2Kw altogether. Expensive but no more than one monoblocks linear amp used to be back in the day.

The audiophile world is moving toward active setups slowly so it makes sense to cater for it. Maybe withnthe use of add-on modules?
Yeah, the SHARC ADSP SC583 does 1800 MMACs vs the 800 for the Mini DSP SHARC. OTOH, there is a TON of development work that would need to be done to develop the firmware for that.

The MiniDSP SHARC (ADSP 21369) can support up to 8 channels with 425 taps per channel. I am not sure how fine an FIR filter one can make with 425 taps. The SC583 would technically be able to support 8 channels with almost 1000 taps per channel.

So, I may experiment with the FIR filters to see how they degrade with fewer taps. If that works, then I could easily make a larger DAC board (probably separate the digital input ASRC board from the DACs), and then route that to a six channel analog output board.



2013-12-22 6:40 pm
Hi cogeniac,

I'm impressed by such a project, and I wonder how you intend to build that board. Will it be hand soldered? Or is there a way to get the board "factory" built even if only a few samples are to be built?

I know that it is maybe not project specific, by I would be happy to understand what hobbyist can/can't do and associated cost.

Best regards,


I have been using Eagle as a schematic capture and board layout tool. It is pretty nice. Does up to 6 layer boards, and has pretty good libraries and facility to create your own library objects, usually from generic package layouts (which hardly vary that much). So you can either pick an existing component, or make up a new symbol, define pins and then link those symbolic pins to the pads on the layout, or you can develop the package and the symbol from scratch with their drawing tools, and then link up the pins and pads (I had to do this for the master clock, which uses an unusual inverted pad setup (a pain in the neck to solder!).

Eagle has an auto-router that, once you set it up, does a decent job of laying out the circuit. It's funny to see my 2.5 GHz Mac Powerbook grind away for 5 minutes with the fan running full blast as the auto routers toil away with millions of routes.. I usually tweak the routes, and re-align or re-position components to eliminate really messy routing, and then run the Autorouter again, to be sure I haven't missed something (AMHIK this.. )...

Eagle has what they call a "CAM Processor" (CAM=Computer Aided Manufacturing), which will generate Gerber files and Excellon drill files. I upload these to Sierra circuits.

Sierra has a full range of services from "No Touch" where they just fab what you send them, to various levels of board check, and even small scale board stuffing. All for a price.

The bare No-Touch boards generally cost about $50-$75, depending on size, in quantity 1. The costs go down very rapidly as the numbers increase.

For example a 4 layer board 4" x 6" (which is what the board above will be) is $216 for 4-day turn around at Quantity 1, the same board in quantity 3 is $78, and 100 boards are $17 each.. so obviously there are some fixed setup fees. In my experience, Sierra usually sends me 2-3 boards even if I only order one. Those prices drop to $195/$70/$15 for 10-day turnaround, and rise to a whopping $2648/$557/$35 for ONE day turn around.

I have been super happy with them.

I stuff the boards myself, which is why I am not using chip caps and resistors (which would vastly simplify the board design). The SMD parts are a little tricky to solder. I found that if you tin the pads with solder first, then you can place the chip down and align it using tweezers under a magnifier lamp. You can then tack down one corner pad, and then the opposite corner pad. That holds the chip in place, and then you can press the tip of the iron down on each pad until the solder under it flows. I bought a good Hakko soldering station that can support very fine iron tips. I must say, the Cirrus DAC was a bit tough to get down without solder bridges, and I am not looking forward to the 48 pin ASRC (with 10 mil pins)...after doing those high pin count packages, little 8 and 16 SOIC packages are a snap!

You need to be mentally prepared for at least one cycle on the boards, because errors are inevitable. Eagle provides Electrical Rule Checks (ERC), which look for things like lines that look connected but aren't (for example if the signal line in the schematic overlaps a pin, but isn;t logically connected to that pin), missing power/ground to chips (often there chip power is "implicit" (i.e. not on the schematic), so you need to be mindful of that sort of thing. It will also flag, for example if all the pins on a network are "inputs" or if there are multiple "outputs" tied together..indicating that you messed something up. Eagle also provides Design Rule Check (DRC), which examines the board for disconnected traces, overlapping traces, improper clearances, etc. It will flag these on the layout one by one, and you can fix them and move on.

Here is a board I posted on my Adcom GFA-565 thread (replacement board for the notorious "input board" with its leaky capacitors.. This is iteration #2. The first one worked with some minor field re-working. This one should be perfect. This 2-sided board cost about $75 in quantity 2.

The Eagle layout:

The finished board:
Last edited:


2013-12-22 6:40 pm
Thanks cogeniac for those long explanations. This confirms my understanding that good tools exist for the board design, but need some dedication and knowledge to get things done well. And... soldering is a tricky part for those tiny packages. Magnifier and a good iron are needed. Risks to mess the thing exist... I would like to try, but I'm not sure to be able :)

By the way: your project is really nice.

Just another vote for 8 channels!

OK, just so I understand this, are you folks seeking 2X8?

So in this case the system would be any of the following 2 channel inputs:

Analog LP
HDD file at 16/44.1 (ripped CD)
HDD file at 14/48
HDD file at 24/96

The front panel would allow source selection and volume control.

The iPad/Phone app would allow on-screen source selection, and track selection as well as volume control, room equalization, and channel balance adjustments. I am going to embed a test sweep file in the system, so that the room EQ is really a matter of hooking up the calibrated mic and pressing a button on the screen. Presto! instant room EQ!

All DSP and all outputs are done at 24/96.

This is the current system we are doing in 2x4 format.

For a 2X8 version, I would just provide 4 channels per input channel, so multiple crossovers, and multiple analog outputs. I'd probably just do this as two four-channel analog output boards, one for right and one for left.

So, I can probably do this with a little finessing of the DAC I2C addressing, a new digital board, Or maybe just an extra digital board with only the DACs (no ASRC and no ADC on one of the boards), two analog boards, and the existing MiniSHARC DSP (MiniDSP) board and their 2X8 plug-in.

Doing any other DSP will be a much much longer project since I would have to not only do the DSP board, but also develop all of the DSP software for it.

To address the tap count issue, an alternative also could be to use two separate SHARC boards It would be a bit of a leap of faith in bit perfect processing to be sure the channels didn't have any time skew. In that setup we would, for example, do right and left channels 1 and 2 on one SHARC and right and left channels 3 and 4 on the other SHARC. That seems pretty reasonable, and it would keep the tap count pretty high on the filters.

That's 6 boards plus the power supply.. yikes! Of course we'd need a bigger housing, but we'd need that anyway, just to handle all the additional analog outputs.

Let us get the 2X4 version going first, and then I'll play with this.

Last edited: