[pulseaudio-discuss] How to decode and loop-back and iec958/spdif bitstream?

Denis Shulyaka shulyaka at gmail.com
Thu Aug 17 14:34:08 UTC 2017


Hi Benjamin,

*Sun Mar 8 11:22:30 PDT 2015* *Alexander E. Patrakov* <patrakov at
gmail.com>
<pulseaudio-discuss%40lists.freedesktop.org?Subject=Re%3A%20%5Bpulseaudio-discuss%5D%20How%20to%20decode%20and%20loop-back%20and%0A%09iec958/spdif%20bitstream%3F&In-Reply-To=%3C54FC9366.4080908%40gmail.com%3E>
:

> 08.03.2015 23:00, Benjamin Tegge wrote:
> >* Hello,
> *>>* I want to feed a 5.1 stream (dca or a52) from another device through a
> *>* iec958/spdif connection to my computer and play the audio through
> *>* loopback on the computer, I don't want to do pass-through. The C-Media
> *>* CM106-based device used with PulseAudio and the loopback module on
> *>* Ubuntu 14.04 (PulseAudio 4.0) work in stereo, but 5.1 does not.
> *>>* I wanted to set this up for quite some time, but was puzzled how all the
> *>* parts come together:
> *>* - There is iecset from the alsa tools to configure iec958 ports
> *>* (audio/data, consumer/pro), but this is just for outgoing connections,
> *>* right?
> *>* - Are there decoding functions in PulseAudio or would I have to use an
> *>* external program like ffmpeg/avconv to demux and decode the spdif
> *>* bitstream to PCM? I already found
> *>* https://www.ffmpeg.org/ffmpeg-devices.html#pulse <https://www.ffmpeg.org/ffmpeg-devices.html#pulse> and tried that, but
> *>* couldn't get 5.1 to work.
> *>
> PulseAudio contains no decoders, so you would need to use an external
> tool. Also, PulseAudio does not support receiving compressed formats
> over spdif. Possibly this pipeline could work as a proof of concept:
>
> arecord -f dat -D spdif:1 | ffmpeg -f spdif -i - -f pulse default
>
> or:
>
> ffmpeg -f alsa -acodec ac3 -i spdif:1 -f pulse default
>
> (not tested, because I don't have anything with spdif-input capability)
>
> --
> Alexander E. Patrakov
>
>
Were you able to make it work?

I'm trying to do the same thing now, but it looks like CM106 does not allow
me to record a compressed format and I get a complete silence instead. I
even wrote a small app to do the decoding (
https://github.com/Shulyaka/pareceive) which does not work because of this
fact.

Best regards,
Denis Shulyaka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20170817/ff7ad7be/attachment.html>


More information about the pulseaudio-discuss mailing list