DSP-in-the-middle: CamillaDSP on RPi4 with 8 channel I2S inputs and outputs?

I have a 7.1 AVR that uses a PCM1690 DAC. It has some decent EQ capabilities, but I want to unlock the full potential of DSP by intercepting the pre-DAC I2S signals, manipulating them with CamillaDSP (or a better alternative?), and feeding that to the DAC.

I'm only using 3.1 speakers right now but I'm building my own 2-way speakers and I don't want to use passive crossovers. What I want to do is leverage the extra channels my AVR provides to power each speaker driver independently. The AVR configuration interface will not allow me to do what I want, so I want to intercept the I2S inputs, process them with my own DSP, then provide them back to the DAC. Digital in for DSP, digital out back to DAC, using the 7 amps provided by the AVR.

1699308687568.png


PCM1690 Datasheet

So my thinking is I can just desolder the resistors on each of the 4 inputs (each input has 2 channels I2S), solder on a wire on the left sides that connects to RPi4 inputs, then take the 4 RPi4 outputs and solder wires to right side of resistor pads, then use CamillaDSP on RPi4 to modify the signals. Then I can take the FL/FR 2 inputs and split them into 4 outputs (FL woofer, FL tweeter, FR woofer, FR tweeter) and use those amplifier channels differently from how they are labeled. Do the same for center channel too.

I found this cool video that describes something similar to turn an AVR into a preprocessor, but I would prefer to skip the SPDIF conversion if possible. I also have 4 data lines and not just 1 like his example.

I don't know anything about I2S, clocks, re-clocking, or really anything else here so I'd like some guidance on the best way to proceed. Ultimately it would be great to remove this DAC and replace it with something higher quality but for now, because of the ease and low cost, doing a simple DSP-in-the-middle hack with CamillaDSP seems like the best choice. There might be a better choice than CamillaDSP but this is what I currently think is the simplest and cheapest approach that gives me what I want. I noticed that some better DACs like ES9039PRO have customizable FIR filters but idk how to interface with that. CamillaDSP provides an easy to use interface so that's a huge plus. RPi is ~$50 right now, ES9039PRO is ~$100, so I'd prefer the new DAC if it came with a UI that is as nice as CamillaDSP.

So, how can I make these I2S inputs and outputs work with CamillaDSP on the RPi4?
 
Oh, it looks like maybe I can use "Dayton Audio DSPB-K DSP Kernel Board" or "WONDOM APM2" instead of CamillaDSP. Looks like each one handles 2 channels in and 4 channels out, so I just need 2 of these $20 boards to handle my FL/FR/CC, plus a $30 programmer. I found this video explaining how to use I2S inputs and outputs with APM2.

@phofman idk how to get the I2S into and out of CamillaDSP. I didn't see anyone discussing how to do this, everything seems to use different ins&outs.
 
idk how to get the I2S into and out of CamillaDSP.
It's a regular alsa soundcard.
I didn't see anyone discussing how to do this, everything seems to use different ins&outs.
For the 2ch I2S of legacy RPis there are many tutorials online. RPi5 is not readily available yet, but most likely there will be boom of articles on this topic in the near future.
 
GPIOs 18 - 27 are defined for first the two I2S, difference is that I2S0 is master, I2S1 is slave, so you can have like one stereo pair as input with remaining six for outputs. The datasheet also mentions I2S2 which can be mapped to GPIOs 28 - 33 (two channels, or perhaps two stereo channel) but it is not mentioned in rp1-peripherals.pdf, the Linux driver (https://github.com/raspberrypi/linux/blob/rpi-6.1.y/drivers/pinctrl/pinctrl-rp1.c) though lists those above 27 GPIOs.