Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Media centres • RPi 5 - 7.1 DSP Half Project

$
0
0
Hello, i recently bought raspberry pi 5 with goal in mind - to use it as sound card with DSP. Goal was to drive 7.1 surround sound from Windows PC to RPi over USB and then to external DAC via I2S. I needed to flexibly config, route, mix channels, i thought about using CamillDSP for this. I heard that RPi 5 has 4 I2S outputs and i needed to convert 8 ch to 16 ch. I thought about streaming two TDM8 over two different pins (to two DACs). However, i found that RPi 5 has hard limit to only 2 ch I2S sound stream over each of four I2S output pins, thus it is only able to output 8 ch. So, in the end, i could not realize my goal on RPi 5.

Still, i had steady progress until that point. I wanted to share this with you, in case 8 ch is enough for you.
RPi5 DSP.jpg
I managed to successfully configure descriptors to 7.1 surround 24/96 format. Windows 11 see it just fine. (Note that only OTG port is usb-c, which is also only power port. I provided power over GPIO pins, it was working fine.) CamillaDSP can't work with two playback devices, so i inverted playback to capture. When Windows was playing using this sound card, all internal tests inside RPi were OK, so it accepted and recognized 7.1 PCM stream from Windows. (I should note that microphone is required for UAC2 gadget to work, it would not start without it, i have configured mic 2x24/96 just in case, but best left it disabled in Windows sound settings.)

I attached .zip with my code. You have to recompile the core for this to work, see attached .config.txt (inside .zip) to see which settings to use when recompiling core.

So, with that half done, you only need to create your I2S sound card inside RPi OS for you DAC. By default, OS uses only one I2S output, you have to patch driver (dwc_i2s and probably others). Configure CamillaDSP and you're good to go, probably. I haven't tested this beyond Windows recognition and PCM stream acceptance.

My other part, I2S pins output, SPI codecs for DAC, Sound Card was only somewhat working and was not finished, so i won't share them.

Best of luck in your projects, hope this helps.
RPi5 UAC2.zip

Statistics: Posted by Mishaiger — Tue Sep 09, 2025 3:28 pm — Replies 0 — Views 327



Viewing all articles
Browse latest Browse all 7503

Trending Articles