PulseAudio doesn't allow AC3 output through S/PDIF

Bug #520157 reported by Id2ndR
140
This bug affects 28 people
Affects Status Importance Assigned to Milestone
PulseAudio
Fix Released
Unknown
pulseaudio (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: pulseaudio

Version: lucid
Hardware : sound card with an optical (or coaxial) output connected to an external amplifier with Dolby Digital or DTS decoder

First step : check that you can correctly send a DTS sound to you amplifier with ALSA . For example :
1/ Find your IEC958 (S/PDIF) Digital Audio Output : $ aplay -L
2/ Download a sample DTS (or Dolby) file at http://www.sr.se/multikanal/english/e_index.stm (the smallest one is at the bottom)
2/ Try to play this file directly through ALSA : $ aplay -D <iec958_device> <surround_file.wav> (example : $ aplay -D iec958:CARD=Aureon51MkII,DEV=0 SURROUNDTEST_011212.wav)

Current status :
- gnome-volume-control allows to use digital stereo output
- a digital stereo output is produced even when gnome-volume-control is set to analog output (so pulseaudio is configured this way too).

Expected status :
- gnome-volume-control should allow to use digital AC3 output
- no digital stereo should be produced when analog output is set in gnome-volume-control
- AC3 output of VLC should be sended instead of the digital stereo output of pulseaudio

More tests to be describe/to do :
- configuration of asound to encode the sound of application through ac3 in asound.conf (this may help : http://pulseaudio.org/ticket/655 and http://pulseaudio.org/ticket/570) and test application that use 5.1 output throught pulseaudio
- configure multimedia backend like gstreamer to pass-through AC3 directly to alsa
- use AC3 output in VLC

Changed in pulseaudio:
status: Unknown → New
Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: New → Triaged
Revision history for this message
tomeq_ (t-glowacki) wrote :

I have exactly the same problem here. I'm unable to produce any AC3/DTS output out of S/PDIF interface. Only PCM digital stereo.The same thing happened in 9.04 an 9.10 release.

$ aplay -l
**** Lista PLAYBACK urządzeń ****
karta 0: Intel [HDA Intel], urządzenie 0: AD198x Analog [AD198x Analog]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0
karta 0: Intel [HDA Intel], urządzenie 1: AD198x Digital [AD198x Digital]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0

$ lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04

Revision history for this message
Id2ndR (id2ndr) wrote :

Just for information to those who encounter this trouble: you can get AC3/DTS output working on VLC and SMplayer by using ALSA directly:
- VLC : chose "use S/PDIF if possible" and "Alsa" as output. If you've got several sound card, then chose "show settings" -> "ALL" at the bottom, chose Audio->output modules->ALSA and then chose the correct sound card.
- SMplayer : open preferences->General->Audio. Then chose the correct alsa sound card (not just alsa) and enable "AC3/DTS passtrough S/PDIF".

I can't get it working with Totem even choosing ALSA output on gstreamer-properties because gstreamer output still is redirected to pulseaudio doing this.

Revision history for this message
tomeq_ (t-glowacki) wrote :

Unfortunately your method doesn't work and never worked before, since I remember.

SMplayer ends up with an mplayer error "[format] Sample format big-endian AC3 not yet supported" no matter what you change in mplayer config (like disabling audio equalizer).

VLC is crashing my... amplituner. I'm getting no sound and speakers setup icons on the amp flashing constantly :)

Revision history for this message
Id2ndR (id2ndr) wrote :

Maybe you can try with an other media (dvd or file) that use DTS or Dolby sound instead of AC3. In my case my external amplifier doesn't support AC3 but support the two others.

Revision history for this message
madbiologist (me-again) wrote :

Does gst-plugins-good0.10 0.10.22-1 (available in Debian testing) fix this?

I contains the following new feature:

* directsoundsink: Implement SPDIF support for AC3

Note that if you want to try this you will first need to update GStreamer core/base to >= 0.10.29

Revision history for this message
tomeq_ (t-glowacki) wrote :

It's not amp's fault, it supports AC3. It decodes the same streams on Win7 on the same PC flawlessly.... Still cannot get any DD/AC3/DTS whatever you name it "surround sound" from my files using any of available players...

I'll try gst-plugins-good0.10 0.10.22-1 but this is far from optimal solution...

Revision history for this message
Groening (vonbehren-c) wrote :

I have the same problem, neither AC3, DTS nor DD works through IEC958!
"aplay -D iec958:CARD=SB,DEV=0 DEMO2_DTS.wav" does though...

Revision history for this message
Groening (vonbehren-c) wrote :

installed this ppa without changes : ppa:gstreamer-developers/ppa
(https://launchpad.net/~gstreamer-developers/+archive/ppa)

no changes at all using gst-plugins-good0.10 v 0.10.23-4~lucid1 so I switched back

Revision history for this message
Samuli Kärkkäinen (skarkkai-ubuntu-launchpad) wrote :

In case someone is having this problem with mplayer, it can be worked around as following at least on my Ubuntu 10.04:

mplayer -ao alsa -ac hwac3 file.avi

Revision history for this message
David Guest (david-guest) wrote :

This is still an issue in 10.10 as well. As other people have commented, you can use ALSA directly and it will work. This still needs to be fixed though.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 520157] Re: PulseAudio doesn't allow AC3 output through S/PDIF

Work is going on upstream to address this issue, but is not considered stable/ready enough yet for maverick. WIth any luck, natty should have this functionality.

Changed in pulseaudio (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Jason Osbourne (it-blows) wrote :

Hi! This is my first time posting here (hope this is in the right thread).

I'm currently running Ubuntu 10.04.

aplay -l lists:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708B Analog [VT1708B Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 1: VT1708B Digital [VT1708B Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However, when I go into system>preferences>sound>hardware tab
My only surround options are Analog.
"Digital Stereo Duplex (IEC958)" works fine (over SPDIF), I just have no Digital Surround Options to choose from.

Revision history for this message
tomeq_ (t-glowacki) wrote :

I did some testing on 10.10. No surround sound on S/PDIF no matter what I've tried. VLC gives static noise instead of surround sound. mplayer with -ao alsa -ac hwac3 gives nothing, just silence, using Alsa directly in any media player with possibility of S/PDIF passthrough gives silence. Only using pulseaudio defaults gives just stereo output and system sounds working, but on very low volume level.

Everything unmuted, set to 100%, tried and checked two times.....

Revision history for this message
pascal (pascal-pascallen) wrote :

For mp3 to work directly with alsa add this in /etc/asound.conf
pcm.!default {
type plug
slave {
pcm "iec958"
rate 48000
format S16_LE
}
}
Resamples the stream to 48000 khz and puts it in "little indian" format so the receiver can pick it up.
In smplayer choose "AC3/DTS pass-through S/PDIF.
SMplayer should play all soundformats now.

Rhytmbox should play.

No sounds threw pulse.
IEC958 in pulse is shit.

Skype won't work. Uses pulse audio. Which dislikes a digital stream to your receiver.
No system sound either. Nice and quiet.
Don't think support will be implemented for a long time to.

Revision history for this message
Kevin (kkd) wrote :

Here is what works for me:

Use pasuspender to temporarily stop pulseaudio and let vlc/mplayer access the sound card directly.

pasuspender -- vlc yourfile.avi

Revision history for this message
madbiologist (me-again) wrote :

Is this problem still occurring on Ubuntu 11.04 "Natty Narwhal"?

tags: added: lucid maverick
Revision history for this message
tomeq_ (t-glowacki) wrote :

As far as I testedrecently it is still there, and still no support for digital multichannel output in sound control panel.

madbiologist (me-again)
tags: added: natty
Changed in pulseaudio:
status: New → Confirmed
Changed in pulseaudio:
status: Confirmed → Fix Released
Revision history for this message
madbiologist (me-again) wrote :

The pulseaudio part of this bug has been fixed in Ubuntu 11.10 "Oneiric Ocelot" thanks to the update to pulseaudio 1:1.0-0ubuntu1.

Currently, the only client to support passthrough output is the GStreamer PulseAudio plugin. This will be available in the next release (0.10.31) of gst-plugins-good. Once this is installed, you should be able to have passthrough output just work with Totem and most other players that use playbin2.

See http://pulseaudio.org/wiki/Passthrough for more info on passthrough configuration.

Revision history for this message
David Henningsson (diwic) wrote :

AC3 Passthrough was initial supported in Ubuntu 11.10, and with 12.04 we can also set it up using pavucontrol. I am however a little unaware of which client applications that supports this new functionality.

Changed in pulseaudio (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.