Seeing as it opens /dev/mem, has various mailbox calls and bcm_host_get_sdram_address(), it looks to be a fairly low level hacking thing.SPDIF on Pi : https://github.com/mill1000/raspdif
I've no idea if this works though.
An alternative would be to use the PIO on a Pi5, but again that is a work in progress.
Or attach a PICO to convert I2S to SPDIF - cheaper than an audio HAT
I'm almost certain it won't work on a Pi5, and may be limited to some subset of other Pis.
Quite a nice trick, but not implemented in a very hardware independent manner. The pipe via /tmp/spdif_fifo is a bit icky too.
I suspect it could be implemented cleanly as a kernel driver given a bit of effort. ALSA has an iec958 encapsulation plugin anyway, so no need to sort the preamble stuff within the driver.
Statistics: Posted by 6by9 — Mon Aug 18, 2025 3:15 pm