Page 1 of 1

Surround sound with ALSA on VLC 2.0.1

Posted: 13 Mar 2012 18:50
by Rémi Denis-Courmont
Hello,

As of VLC 2.0.1, the intended channel mapping must be configured explicitly. By default, this is stereo because that is the safest and most common value. If you want surround output (or monophonic) you must edit the ALSA preferences in VLC (Tools -> Preferences -> All -> Audio -> Output modules -> ALSA!) and select the appropriate channel mapping and save. Then you can start playing.

Even though ALSA pseudo-devices (surrond51, surround71, etc) correspond in principle to a certain channel mapping, there is no reliable way from VLC code to determine the intended audio output channel mapping when using ALSA. The root of the problem is, the ALSA surround pseudo-device do not necessarily enforce their channel mapping, or not correctly. As an example, surround40 will accept 7.1 audio streams without but silently discards the extra 4 channels... Attempts in VLC 2.0.0 to automatically detect the correct channel mapping from the audio output device partly failed and caused much grief.

If you think this immensely sucks, then you are most welcome to switch over to PulseAudio where everything is done automatically.


N.B.: This is irrelevant for digital pass-through (S/PDIF). In that case, you need to enable the S/PDIF option as in previous versions and you do not need to care about the channel mapping.

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 18 Jun 2012 23:42
by shaban55
Hello,
and I am so happy that I found this explanation. Since the automatic upgrade to 2.01 on opensuse 12.1 my automatic selection between stereo for mp3, flac, whatever else and 5.1 surround for ac3/mkv was suddenly gone. I spent a lot of time to solve it but fruitless. Now I know! I don't see this a s a real progress. Why something which worked nicely was changed? I play everything through an optical SDIF and it had worked flawlessly. Now after applying your advice I can play at least the stereo files again, but the ac3 files just produce a terrible noise.

I have stayed with ALSA because it worked. Pulseaudio always mixed everything up, so I kept it deactivated.

Is there a possibility to downgrade to the previous version? I cannot find it anywhere in a version for opensuse.

(BtW, I also use Skype in version 3.8.xxx, because since version 4 it just eats up the resources of my modest laptop)

Help much appreciated! I am looking forward to listen to 5.1 sound on Linux again ( Windows XP works as usual)
Shaban55

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 18 Nov 2012 15:41
by Azrael5
thanks for suggestion

after doing the changing, every time dvd video make a step in the process of viewing I got message which audio resource s occupied CARD=D2X,DEV=0 ...

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 02 Dec 2013 18:17
by La VloZ
Hello all :)

I'm on slackware with ALSA :)
The problem is i don't find (Tools -> Preferences -> All -> Audio -> Output modules -> ALSA) on my distro !!!!!
What is the problem??

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 10 Dec 2013 15:21
by Jean-Baptiste Kempf
Your package is incomplete.

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 16 Jun 2017 20:51
by smhealey
edit:

I see this is from 5 years ago, there is no further update or work around for this Pulseaudio cause additional headaches.

It would be awesome if VLC supported Bitstream HDMI pass-through to the AVR and let the AVR just do all the work :D

Or if VLC had an interface to manually map/reassign the channels.

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 16 Jun 2017 23:23
by Rémi Denis-Courmont
With PulseAudio, VLC automatically negotiates bitstream pass-through. No configuration is necessary - on VLC side.

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 19 Jun 2017 17:48
by smhealey
I am currently running Ubuntu LTS 16.04.2 and pulseaudio 8.0 (Qnap NAS ts-453a i am not sure if it is possible or that I know how to update to pulseaudio v10 or if this would resolve my issue). There is an issue with my pulseaudio only sending 2.1 PCM to the AVR. Until i figure out how to upgrade it to newer version I am having more progress working with ALSA.

I did just update to to VLC 3 daily and found that this version VLC now properly passes ALSA (DTS 5.1 and DD 5.1) channel mapping properly to my AVR. Although. PCM 5.1 channel mapping is still incorrect.

Re: Surround sound with ALSA on VLC 2,0,1

Posted: 05 Dec 2017 00:53
by Jean-Baptiste Kempf
I did just update to to VLC 3 daily and found that this version VLC now properly passes ALSA (DTS 5.1 and DD 5.1) channel mapping properly to my AVR. Although. PCM 5.1 channel mapping is still incorrect.
File a bugreport on this.