3e Audio DSP and Airplay at 44.1 kHz?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I am currently using a 3e Audio DSP as an active XO and I really like the flexibility a DSP brings to the table.

I have also been using a RPi with a HiFiBerry DAC+ and Mike Brady's Shairport Sync as an Airplay receiver for years. It works great with my analog gear but the DSP introduces an extra ADC-DAC step that I don't like. The RPi and the DSP both supports I2S so how hard could it be to make the RPi talk I2S with the DAC? Harder than I thought it seems... :(

Running the RPi as the I2S master seems tricky (MCLK not avalable etc.). It is probably better to let the DSP be the master and run the PRi as a slave using an I2S driver like this one by MKSounds or this one by Akiyuki Okayasu. But the DSP seems to operate in 48, 96 or 192 kHz with a 12.288 MHz oscillator and Airplay (and therefor Shairport Sync) is based around 44.1 kHz (using ALSA to resample in software might be doable but I would prefer a hardware based solution).

So the question is how do I feed the DSP 44.1 kHz through I2S from the RPi?

My guess is that I could replace the 12.288 MHz oscillator on the DSP with a 11.2896 MHz oscillator. I further guess it would slow down the core clock to 45.1584 MIPS and make the DSP support 44.1, 88.2 and 176.4 kHz instead of 48, 96 and 192 kHz. I don't mind being stuck at 44.1 kHz since I only plan to run Shairport Sync through the I2S interface of the DSP (I don't plan to use it for Bluetooth etc.). I am also able to de-solder and solder SMD at work so it would be a fairly easy mod but I would like to know if it might work before I actually start modding the board.

I asked 3e Audio about it but the answer was quite short and I'm not sure I totally get it, the answer I got was:
the DSP can change to 44.1Khz.please try and not change the 12.288Mhz crystal.firat to see if it can work.
It seems like 3e Audio is telling me that the DSP can change to 44.1 kHz and that I therefor should try and se if it works without changing the 12.288 MHz oscillator. But I am still skeptical if this would work with the DSP acting as the master. And I am not sure how I could get the RPi to act as the master (it just seems like a safer bet to let the DSP act as the master).

I would happily try it out on the board I have if it wasn't stuck in my power-amp as my current XO. So I have to buy another board in order to actually try this out.

Another solution I guess would be to use another board with the RPi, something like the HiFiBerry Digi+ with digital out. But I would still have to somehow feed the digital signal to the DSP. Does anyone know of a working solution for adding a S/PDIF input (over I2S I guess) to the 3e Audio DSP?

I appreciate any help I can get to solve this problem. Thanks in advance and a happy new year to you all.
 
Wasn't clear to me from the above what the DSP is? You say there is an extra ADC/DAC step, so I presume it is some box?
The DSP is an ADAU1701-2In4Out ADAU1701 DSP Board by 3e Audio (it is not a "box", it is currently fitted inside my DIY power amp serving as an active XO and room EQ). The extra ADC/DAC conversion is due to my DIY Airplay streamer (RPi + Shairport Sync) currently using a HiFiBerry DAC+ to feed my my preamp (analog) to my power amp (analog) processed by the DSP board (ADC->DAC) before handed to my power amp (analog).

What I am considering is to build an integrated amp with the DSP as the preamp using the DSP analog in for phono (RIAA preamp) and digital in for Airplay (RPI + Shairport Sync + I2S). That would be one ADC->DAC step less for Airplay.
 
Well, ADAU1701 can operate from more than one clock speed, but changing the clock would change the filter corner frequencies. ADAU1701 can also I/O I2S. However, looks like the board you have is not designed to support changing those things.

I suppose you could get an ebay ADAU1701 board and program it yourself to make it do what you want. Then connecting it between a SBC (single board computer) I2S port and a dac chip should be pretty straightforward. That said, most SBC GPIO busses are pretty jittery for good audio. It can get pretty involved to fix that. Easiest way might be to use asynchronous USB from the SBC to a USB-to-I2S board. That gets rid of the jitter problem and the computer EMI/RFI interference issues. From there the DSP and the dac could be chained. The USB board, the DSP, and the dac could all use the same master clocks. At least, that's one way 'doing it right' might look.
 
Last edited:
Well, ADAU1701 can operate from more than one clock speed, but changing the clock would change the filter corner frequencies. ADAU1701 can also I/O I2S. However, looks like the board you have is not designed to support changing those things.
Not much wrong with the design but 3e Audio had to make a couple of design decisions that might not be for everyone. Having three pots and a LED on the board works as intended but if you want to use all four Aux ADCs (through J4 for example). You then have to disable the LED (unsolder a SMD resistor) since the LED occupy MP2 by default. You might also prefer another input sensitivity (than 1 Vrms). Thats another pair of SMD resistors that needs to be swapped out. So why not swap the oscillator on the board if needed?
I suppose you could get an ebay ADAU1701 board and program it yourself to make it do what you want.
I consider the DSP I got being an "ebay ADAU1701 board" even though I got it from Aliexpress. ;)
Then connecting it between a SBC (single board computer) I2S port and a dac chip should be pretty straightforward. That said, most SBC GPIO busses are pretty jittery for good audio. It can get pretty involved to fix that.
Well it should be pretty straightforward but as you say, the RPi might not be the best I2S master and after reading things like this I really prefer to run the DSP as the master. But that would be a problem if the DSP MCLK is 48 kHz and Shairport Sync is talking straight to the hardware device on the RPi (I guess Shairport Sync will see a 48 kHz device where it requires 44.1 kHz).
Easiest way might be to use asynchronous USB from the SBC to a USB-to-I2S board. That gets rid of the jitter problem and the computer EMI/RFI interference issues. From there the DSP and the dac could be chained. The USB board, the DSP, and the dac could all use the same master clocks. At least, that's one way 'doing it right' might look.
That is absolutely an option even though I would prefer S/PDIF over USB if the I2S route is too cumbersome. But my current hypothesis is that a 11.2896 MHz oscillator on the DSP board would make the DSP core clock to 45.1584 MIPS, keep the PPL setting and I guess the DSP then would run on a 44.1 kHz MCLK. I also hope that Shairport Sync now would see a 44.1 kHz device through the I2S hardware driver (running as a slave). But it is a bit too much guessing so I would like to know if anyone done something similar with success before I buy another board to hack on...
 
SPDIF brings another problem that asynchronous USB avoids. The problem is SPDIF clock jitter, which can be attenuated with a good ASRC, or eliminated with a FIFO buffer (but the buffer will add a time delay).

USB has none of those issues, and if implemented well is pretty much the standard for best sound quality nowadays.
 
SPDIF brings another problem that asynchronous USB avoids. The problem is SPDIF clock jitter, which can be attenuated with a good ASRC, or eliminated with a FIFO buffer (but the buffer will add a time delay).

USB has none of those issues, and if implemented well is pretty much the standard for best sound quality nowadays.
Interesting, maybe there is an USB device that would look like an audio device to the RPi with support for 44.1 kHz and I2S out? Shairport Sync could then address the USB audio device (at 44.1 kHz). Even better if the USB device can act as the master and provide the DSP with the MCLK. Anyone know of any such device?
 
A good one with good clocks and galvanic isolation: I2SoverUSB - I2S over USB Audio
Price is good for what it is. Haven't found any good ones of better value yet, always keep an eye out for one though. It can also support using external clocks if desired (such as a master clock located next to the dac chip, probably the ideal location).

To clarify, it can serve as master clock (MCLK) for itself, DSP, and dac. It is also an I2S master, meaning it generates BCLK and LRCK too.
 
Last edited:
A good one with good clocks and galvanic isolation: I2SoverUSB - I2S over USB Audio
Price is good for what it is. Haven't found any good ones of better value yet, always keep an eye out for one though. It can also support using external clocks if desired (such as a master clock located next to the dac chip, probably the ideal location).
Nice product, thanks for sharing Mark! :) PI2AES seems like another nice option.

To clarify, it can serve as master clock (MCLK) for itself, DSP, and dac. It is also an I2S master, meaning it generates BCLK and LRCK too.
The I2SoverUSB seems really capable but I am not sure the ADAU1701 is as capable. It does not have a sample rate converter for example. So what happens if I use the I2SoverUSB as the master and outputs 44.1 kHz (from Shairport Sync on the RPi) into the ADAU1701 based DSP (running as slave but with the core set to 48 kHz)? It might lock on to the 44.1 kHz stream but I guess it will eventually pop and make noises without a builtin sample rate converter. Maybe it's better to start looking for DSP board with a builtin sample rate converter instead (like ADAU1442 or ADAU1452/51/50)?
 
If running only the DSP at 48kHz, then the ASRC function blocks in ADAU1701 would need to be used twice, once the way in, and then again on the way out. That would be if the dac is to be clocked by the USB board clocks. In that case, jitter from the ADAU1701 48kHz clock is going to be imprinted on both ASRC conversions (assuming the control software/firmware lets you configure ADAU1701 to do that, and allows use of I2S I/O).
Also perhaps something to consider, IME power supply noise will probably affect PLL tracking in the ASRC processing, which can result in increased audible distortion.

Alternatively, if once at 48kHz you decide to stay there, then the dac chip might end up being clocked from the jittery ADAU1701 clock. Not a good thing either.

I guess you could run the dac from a good 24MHz crystal clock, and divide that clock by two in order to produce a low jitter clock that could be used by ADAU1701. Then there would only need to be one ASRC conversion between the USB board and the ADAU1701.

Personally though, for my own use I would want a fully synchronous system if possible. If I did opt for ASRC, I wouldn't want to do it more than once, and I would want to do it very carefully, the best I know how.
 
Thanks for all your feedback Mark. This turned out even messier than I thought. I mostly play vinyl and only Spotify through Airplay so I think I just have to live with that extra A/D->D/A step for a while. At least until I have made up my mind if the use of active XO and DSP is actually worth it (especially with analog sources). It is easy to be dazzled by dynamic and high order filters almost for free. But I could probably solve 80% of my problems with a couple of simple analog circuits, like LT and PEQ...
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.