• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Enginerding with Weeb Labs

The SPDIF BMC is implemented via the PIO state machines, which is a little bit fancier than bit-banged GPIO. I can certainly add more inputs (SPDIF, I2S, Bluetooth). The only limitation is that they can't be mixed; one would switch to their desired input. Mixing inputs would mean mixing clock domains and ASRC is impractical on these boards.
Isn’t any other digital input bound to give you clock issues? They all bring their own clock domain, while the current USB input can run in sync with the output. Maybe something a hardware ASRC could fix, but that adds cost and complexity.

But I was actually talking more about adding more output channels ;) With 4 or 6 one could build an active speaker system easily. Even with the current setup that might be possible if one could sync 2 boards (one for R, one for L).
 
Isn’t any other digital input bound to give you clock issues? They all bring their own clock domain, while the current USB input can run in sync with the output. Maybe something a hardware ASRC could fix, but that adds cost and complexity.

But I was actually talking more about adding more output channels ;) With 4 or 6 one could build an active speaker system easily. Even with the current setup that might be possible if one could sync 2 boards (one for R, one for L).
The manner in which it is handled really depends upon the input type. For instance, with a SPDIF input, we have no feedback mechanism and therefore no control over the clock. When implementing this, the firmware needs to follow the incoming stream and absorb rate error through buffering.

It make uses of a ring buffer (similar to the current PDM output) with a write side (SPDIF clock domain) and a read side (system clock domain). The buffer fill is continuously monitored and if it begins to drain or fill, the read rate and corresponding PIO clock divider is slightly adjusted to compensate. I suppose you could almost call it a tiny fractional PLL or ASRC.

Regarding the outputs, one could theoretically implement a maximum of 12 SPDIF outputs on the hardware. The practical limitation will be the program size and state machines required for inputs other than USB. If using I2S, TDM8 is also possible.
 
Last edited:
Obviously :) But all the ones you mentioned bring their own clocks.

Some inspiration on that:

That's a really interesting board. Their sketch is just Arduino but one could absolutely configure USB descriptors for 8 channels.

Regarding the inputs and clocks, you are of course correct. I don't mean to state the obvious. It's 8AM and I haven't slept yet, so keeping thoughts straight is a struggle. o_O

But the gist of it is that so long as we are generating the output PIO clock (SPDIF, I2S, PDM) from the system clock using a divider, we can effectively use the ring buffer fill level as a feedback mechanism. Incrementing or decrementing the divider (and by extension buffer read rate) to pass the input's clock drift to the output where a DAC can lock to it without needing to handle under/overruns.
 
Regarding the inputs and clocks, you are of course correct. I don't mean to state the obvious. It's 8AM and I haven't slept yet, so keeping thoughts straight is a struggle. o_O
Please go get some sleep :facepalm: ;)
But the gist of it is that so long as we are generating the output PIO clock (SPDIF, I2S, PDM) from the system clock using a divider, we can effectively use the ring buffer fill level as a feedback mechanism. Incrementing or decrementing the divider (and by extension buffer read rate) to pass the input's clock drift to the output where a DAC can lock to it without needing to handle under/overruns.
It would be good to verify how bad the SPDIF jitter is with this setup. Usually, I would not expect super performance, but then again, an SPDIF receiver can handle it without issues. TDM/I2S is another matter. For that, an external clock would probably be a good idea.

A fun side project would be to see how many FIR taps the tiny CPU can handle. CMSIS-DSP has some easy-to-use methods to do that. People always complain that a DSP has no FIR ;) And if it has FIR, they complain that it has to few taps ;) You can never win this one :facepalm:
 
Their sketch is just Arduino but one could absolutely configure USB descriptors for 8 channels.
If we're still talking about RP2350 the problem with that would be bandwidth as it only allows full-speed USB (12Mb/s). That wouldn't be a problem for the proposed active crossover option though - that only needs 2 input channels and the onboard EQ to split those between the outputs.
 
If we're still talking about RP2350 the problem with that would be bandwidth as it only allows full-speed USB (12Mb/s). That wouldn't be a problem for the proposed active crossover option though - that only needs 2 input channels and the onboard EQ to split those between the outputs.
For 8 channels at 16-bit 48KHz, we would only need 6.144Mb/s. It's close to the maximum payload but should definitely work.

I believe the M-Audio Sonica Theater makes use of this configuration.
 
This will likely be the last progress update on this thread as the project will have a dedicated one tonight but...

1770257687897.png

Loudness compensated volume control has now been implemented. It is not yet perfectly mathematically accurate but it works very well. As the host's digital volume control is adjusted, the response is smoothly and continuously compensated. This commit has not yet been pushed as there are still a few things to refine but I am very much enjoying using it while listening to my library at low volume.
 
I have been following your project to convert your 8-channel ADAT signal into four stereo SPDIF coaxial signals. Is it progressing well?

Personally, I think this is the best method these days for utilizing the ADAT outputs of budget audio interfaces to connect to speakers that accept digital inputs. Wouldn't it be particularly useful when trying to connect many speakers to implement Dolby Atmos, as is common these days? I believe it would sell very well if commercialized, provided the price is reasonable.

While most digital input speakers use AES/EBU, there are also many that accept SPDIF, so I wonder if it would be better to support both. It would be great if you could allow switching between channels with a simple switch. Although, looking at the forum records, it seems this has already been mentioned.

I wish you the best of luck. I look forward to hearing good news.
 
I have been following your project to convert your 8-channel ADAT signal into four stereo SPDIF coaxial signals. Is it progressing well?

Personally, I think this is the best method these days for utilizing the ADAT outputs of budget audio interfaces to connect to speakers that accept digital inputs. Wouldn't it be particularly useful when trying to connect many speakers to implement Dolby Atmos, as is common these days? I believe it would sell very well if commercialized, provided the price is reasonable.

While most digital input speakers use AES/EBU, there are also many that accept SPDIF, so I wonder if it would be better to support both. It would be great if you could allow switching between channels with a simple switch. Although, looking at the forum records, it seems this has already been mentioned.

I wish you the best of luck. I look forward to hearing good news.
The ADAT-SPDIF board works well. I’m not currently mass producing them but may order a limited run if there is enough interest.

Recently, I have been evaluating the possibility of replacing the dedicated board with just an RP2350. This should be quite feasible; especially given that any interface with ADAT output also includes a word clock output. I have already created an instantiable fork of the Pico SDK’s SPDIF library for use in DSPi, so the only remaining work would be to implement an ADAT decoder.
 
The ADAT-SPDIF board works well. I’m not currently mass producing them but may order a limited run if there is enough interest.

Recently, I have been evaluating the possibility of replacing the dedicated board with just an RP2350. This should be quite feasible; especially given that any interface with ADAT output also includes a word clock output. I have already created an instantiable fork of the Pico SDK’s SPDIF library for use in DSPi, so the only remaining work would be to implement an ADAT decoder.
Sign me up for the limited run in case RP2030 ADAT decoder is not happening :)

I used to assume that RME Digiface USB (for quite a lot of $$$) can work as a compact ADAT-to-Toslink converter, but turns out it one does NOT. The RME works only when connected to a host computer, while my setup needs to work even with no computers connected.
 
Back
Top Bottom