I am considering changing logic, but this is about how I have it now (a bit simplyfied drawn here though).
Relay_1: RIAA
Relay_2: AUX
Relay_3: Analog from DAC
i2s: Chose i2s-input
Relay_4: Relay to control an external board for CD/DVD.
As I had 5VDC anyway for other things and to make use it does not draw to much power I made it like this. Raspberry is only one of the i2s-sources I have. I could use the 3.3v from Raspberry but then it needs to be powered on even if i listen to CD.
I am not sure I thinking correctly now, but maybe it would be easier if I used negative logic all over instead?
View attachment 1082629