12V trigger when audio on I2S bus

I'd like to add 12V trigger to a Khadas tone board when the DAC is receiving audio over SPDIF. I'm planning to use a standard optoisolated relay board for the 12V trigger; I just need a way to trigger the relay.

Right now, I have access to the I2S bus from a 30 pin FPC connector. My question is, how can I trigger a low voltage relay when audio is coming over the I2S bus? I started poking around w/ my DMM and don't see any major voltage changes when the music is playing or paused. I'm looking for a solution in the $5 worth of parts range.

Thanks for your thoughts.
 
The tone board does seem to expose gpio2 of the DAC chip on a test point so with a small register change (in software) you might be able to use the automute or lock status to get high/low voltage trigger on the test point.
 
Last edited:
I reckon a low-pass filter fed by the I2S data line should be able to do the trick. When there's no data flowing, the 'D' line will be all zeroes, when there's some data there will be a fair proportion of '1's (twos complement data format). So a resistor, cap and comparator set to the right threshold should work.

One caveat is - some sources when paused just repeat the last sample sent before the 'pause' command. So that won't be recognized as no signal.
 
I am weak at hardware and software, but worse at hardware so I bought a little Arduino microcontroller w/ hardware I2S and lots of analog and digital GPIO. I think that I can get this reading I2S data using an I2S library and the hardware I2S pins. HOWEVER, I would need to sacrifice SPI to do so, therefore I'd rather use the GPIO pins, if at all possible, since I am not trying to decode audio (just detect it).

I've started to poke around a bit (heh) with the signals to see what I can read on a GPIO pin. I can read the pulses on the SPDIF cable directly, but since it is multiplexed I can't tell what is audio and what is clock.

Next I used a breakout board to access the 30 pin FPC that is supposed to carry I2S data. I can definitely read what I believe are the and WS (~45 kHz) and SCK (significantly faster) but they appear to be running all the time even if I disconnect the SPDIF cable. I can't find the SD line just by poking around.

The pinout for the I2S interface is below:

1d60093e6a8c55160f2bd06368a4a0a8c8a287e2.png


Any microcontroller and I2S experts lurking out there in the ether?