I have made stereo audio to 7.1 expansion/subwoofer control with raspberry pi 3 and Digi+IO. I'm using alsa capture from SPDIF and I output processed 8-channel data to HDMI. I have modified original HDMI driver to support multichannel output.
System works great when input format does not change, but sometimes alsa stream jams when format changes. I woud like to flexibly adapt into different speeds and formats as well as receive and decode raw 5.1 bitstream when it is present. I'm already using ffmpeg audio libraries, so I can play 5.1 or dts streams from disk.
I'm considering to receive raw SPDIF bitstream instead of using alsa driver but before digging too deeply into that, I'd like hear if someone else has done it before or knows what is the best way to do it.
Maybe modifying the existing driver or using digi+io diretly through I2C.