GNOME Bugzilla – Bug 409661
Stereo/surround sound issues with ICH4 laptop sound
Last modified: 2009-08-13 08:19:50 UTC
My laptop has an Intel ICH4 chipset which supports surround sound. Problem is that my laptop do not as such. When playing back 5.1 audio using the GStreamer backend it seems the 'stereo' setting in Totem is ignored and I am getting the output of the two 'stereo' speakers in a surround setting. This means the sound from the center speaker for instance is lost, which means most dialog is gone from the sound. I can provide testclips for anyone with the hardware to look into this issue. Was told to CC Ross on this issue.
Aha, yes, I can replicate this too and confirmed with Christian.
This gst-launch line plays the audio correctly: gst-launch-0.10 -v filesrc location=Dust_to_Glory_720.wmv ! fluasfdemux ! fluwmadec ! audioconvert ! "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000,channels=(int)2" ! alsasink Here is the GST_DEBUG output. http://www.linuxrising.org/files/stereonotsurround.txt.bz2 It should be noted that maybe the Fluendo plugins could be made to negotiate it even without the capsfilter. It seems to me a52dec are able to negotiate the channels on its own.
http://burtonini.com/temp/lost-fragment.avi is a 5 meg snippet from the beginning of Lost, with 5-channel AC3 sound. If played with Xine or filesink ! decodebin ! alsasink you can hear "previously on lost". If played in Totem or with decodebin2, you'll only hear the rear channels.
I tested a lot with Ross, it seems his problem is that if we try to force the caps then audioconvert end up doing the downsampling, causing the center channel to be very quiet. According to MikeS the AC3 decoder need to be the one to do the downsampling to get it right.
Ok, julien looked at a52dec today to figure out why it gets it right and it seems to be a bit coincidental. a52dec assumes that the first negotiated caps are the prefered one (stereo) and thus use that. After some discussion at the office today it was concluded that the element not behaving correctly is alsasink. Alsasink should instead of current behaviour instead expose different caps for different virtual devices. So that for the default alsadevice you get the stereo only caps. Then if people set the alsadevice to one of the multichannel ones through the device attribute you get the caps for that alsadevice. One uncertainty though is whether the surround sound alsa devices accept stereo output, cause even if you set totem do do 5.1 for your divx files you don't want totem to upmix your stereo to virtual surround usually, like when you play music or web radio through totem. In addition to this we should file bugs with the major distro's to try to get them to get their soundcard config tools to write out asoundrc files which do not offer surround sound on these machines.
Ok, after a couple of mails from alsa developers I think the bug is purely ours. Created a alsasink bug for the underlaying issue. Marking as a blocker for this bug.
Lot of people seem to have problems with 5.1 using totem-gstreamer. See https://bugs.launchpad.net/ubuntu/+source/totem/+bug/40732 But I'm not sure if it's related to this bug or if I should open a new one.
> But I'm not sure if it's related to this bug or if I should open a new one. It's all the same issue really, no need for another one :)
I also have issues getting 5.1 to work with totem-gstreamer. vlc, mplayer, and totem-xine work just fine, however... Anybody need some more info?
I tested with: http://samples.mplayerhq.hu/A-codecs/AC3/Canyon-5.1-48khz-448kbit.ac3 Do you see the problem with that one? It seems to work fine here, on an ICH7 chipset, with Pulseaudio for the sound.
Christian, Ross: Could you try with the file Bastien has referenced in comment #10? TIA!
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
FWIW, it seems to work here too. However I'm on a different laptop with different hardware and using pulse instead of alsa. Of course without knowing what it sounds like when "correctly" downmixed I'm guessing. Is there a reference downmix?