1

I am looking for optical Toslink input for Raspberry pi (any model). If I just connect a DLR-1140 receiver to PCM_DIN, would that work?

My goal is to build a sound server. I have a TV that outputs Toslink signal, a sound system that needs analog 6ch input, bluetooth clients and network pulseaudio clients. The main missing piece is the Toslink input.

I already tried a CM106-based USB card, but found out that it does not allow encoded signal into the system (only passthrough is allowed). It cannot decode it either.

1 Answers1

2

It's not as simple as directly connect a S/PDIF or Toslink connector to the Pi. From Can I get audio input through the GPIO, the pins that include PCM_DIN directly take PCM streams, like a WAV file. To get data from a Toslink, you'd need some chip to convert from the IEC 60958 protocol to raw PCM. Something like a LC89091JA "Digital Audio Interface Receiver" might work. (Side note: this sounds like an interesting project for an FPGA.)

Additional reading:

Fred
  • 4,552
  • 18
  • 29
  • 1
    That wouldn't be a problem, because I have already written a software decoder for IEC 958: https://github.com/Shulyaka/pareceive. But I've only been able to test it with a simulated signal so far. – Denis Shulyaka Oct 12 '19 at 12:00
  • I forgot, any 6 channel audio over Toslink is likely to be Dolby DTS (or similar) encoded. I'm not sure if you can turn that into PCM for the Pi to read and then decode the DTS in software to regular 6 channel audio. In general Linux support for DTS in hardware is pretty much non-existent. I'd suggest finding a DTS decoder (like a Creative Extigy) and then reading in analog audio for each channel as that'd be far simpler. (Unless you're particularly looking for a challenge.) – Fred Oct 12 '19 at 12:13
  • Well, I believe I can decode that in software as well, if I'm able to read it – Denis Shulyaka Oct 12 '19 at 18:41