You are not logged in.

#1 2014-11-15 05:05:07

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Several 5.1 Surround Issues

So I have a few issues here, and I only care about getting 1 answer.  I'd like to point out that none of the issues I am getting exist in Windows.  I guess pick whichever of the following you feel most comfortable with:
1.  Games that are not playing in 5.1 analog surround
2.  No surround playback in HDMI
3.  No surround playback in SPDIF


1.  Games that are not playing in 5.1 analog surround
Since ALSA is probably the most painful thing I've ever tried to configure, I installed pulseaudio to set up my analog surround setup.  This has pretty much worked fine - I can use "speaker-test -c 6" and AC3 files in VLC, and I can hear all the channels play the audio they're supposed to.  The game "Amnesia: A Machine for Pigs" also appears to get surround working, though I had to delete the libopenal.so.1 that it ships with (otherwise it's quadrophonic stereo).

However, I've noticed that's pretty much the only game I own that is playing in true 5.1 surround.  From what I heard, Valve games on linux are known to not work in 5.1, and according to one of the developers of Witcher 2, it is a proven fact that they do not have surround working, but it is being looked into.

However, Borderlands 2 is the next priority on my list, and that appears to only have quadrophonic stereo.  It played with full 5.1 surround in Windows.  Surround sound is the ONLY thing preventing me from ditching this game on Windows.
There are other games that seem to have the same issue as BL2 but they are a lower priority to me.


2.  No surround playback in HDMI
I am using the open source radeon drivers, but according to pulseaudio, I get ACT, DTS, EAC3, and MPEG support via HDMI audio.  I can play stereo audio files just fine.  However, if I try playing a .ac3 file in VLC, nothing happens.  According to pavucontrol, there is no sound playing whatsoever.  I can try selecting the device from the audio menu, and it just ignores this.  I tried stopping PA and select ALSA HDMI0 from the audio source in VLC and still doesn't play anything (except stereo files).
I can't remember how I did it, but there was a way where I got my receiver to acknowledge the 5.1 surround channels, but, it still didn't play any audio.

But before I even attempt to fix this, does anybody know for a fact if you get TRUE (meaning, not quadrophonic stereo) surround with games via HDMI?  I don't care about setting this up if only VLC is the only program I have that can take advantage of this.


3.  No surround playback in SPDIF
Just to clarify, if PA is uninstalled, I can get surround playback, but only in VLC.  With PA installed I can play stereo audio just fine but .ac3 files in VLC will not play, and much like my HDMI experience, pavucontrol says there is no sound playing.

I already know that in Linux there's basically no chance of getting SPDIF to work with most games, since there is no option for live DD/DTS encoding.  But, there's a chance that some games do support this, yet I'll never know if PA keeps "muting" AC3 tracks.  Also, my surround receiver supports Pro Logic, Dolby Digital, and other features that really help enhance stereo audio.  You can't get these features in analog.  That being said, I would like to be able to have SPDIF and 5.1 analog output simultaneously, and I can switch between the two based on my current needs.

Last edited by schmidtbag (2014-11-15 05:09:39)

Offline

#2 2014-11-15 09:24:43

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Several 5.1 Surround Issues

schmidtbag wrote:

quadrophonic stereo

See post and technical explanation:

One drawback of surround sound which can lead to problems is that the channel assignment is not standardised (except in the sense that the great thing about standards is that there are so many to choose from). Four channels can represent either 3.1 surround sound (left/right + centre + subwoofer) or 4.0 surround sound (front left/right + surround left/right). Similarly, there are two different conventions for 5.1 surround sound, one upward compatible to 3.1 and one to 4.0. In the first case, the channel order is front left, front right, centre, LFE (low frequency effects = subwoofer), surround left, surround right; in the latter case front left, front right, surround left, surround right, centre, LFE. The latter configuration is the standard under Linux, while the former is common on computer illiterate systems (guess which OS that is...). But reportedly some games assume M$ channel order even under Linux, with the effect that voices of characters behind the player come out of the centre speaker. I do not know about 7.1 channel assignment, but I expect there are the same two configurations, with rear left and right being the last two channels in either case.

Offline

#3 2014-11-15 14:12:32

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Several 5.1 Surround Issues

So, are you suggesting I need to edit .asoundrc for specific applications?  I installed PA so I could avoid configuring ALSA.

But, I'd like to point out that it so far does not appear to be a mixup of channels.  In a game like Borderlands 2, both right speakers play the same sound at the same volume regardless of whether the sound is in front or back of me.

Offline

#4 2014-11-15 22:16:24

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Several 5.1 Surround Issues

schmidtbag wrote:

does not appear to be a mixup of channels.  In a game like Borderlands 2, both right speakers play the same sound at the same volume regardless of whether the sound is in front or back of me.

Yes, I know, that's exactly what I'm referring to. I called it "duplicated stereo". And the other quote doesn't make it crystal clear... so let me make it clearer - the symptoms you describe are exactly what happened to me in Doom3, and what the .asoundrc tweak I posted fixes.

It happened in other Linux games too, e.g. Serious Sam 3.

This problem does not appear in dhewm3, because dhewm3 uses openal for surround-sound smile

Offline

#5 2014-11-16 04:25:38

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Several 5.1 Surround Issues

I see, that is both interesting and annoying at the same time, because I REALLY hate editing .asoundrc.  So now what I'd like to know is: do I really have to create a separate profile in .asoundrc for each game where surround sound does not work properly, and if so, do I still need to keep PA installed?

Offline

#6 2014-11-16 09:56:34

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Several 5.1 Surround Issues

Ideally, what you'd do is:

1. Verify that the "ttable" fix I mentioned, fixes the sound in the games.
2. File bug reports for the games.

Shouldn't need pulseaudio, although I can't say for certain.

"Profile"? You mean PCM definitions? No, there's no need for duplicate, identical PCM definitions.

Offline

#7 2014-11-16 10:49:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: Several 5.1 Surround Issues

You don't have to use plain alsa for this, pulseaudio should provide enough facilities for this, look specifically at:

http://www.freedesktop.org/wiki/Softwar … #index12h3 - You probably don't need to create a alsa sink for this specific usecase, direct remap on the alsa card should work

https://wiki.archlinux.org/index.php/Pu … nd_systems

I think (I haven't tested this myself) module-remap-sink should provide you with a sink that you can put the reversed channel order into and then push any games that sound "wrong" over to that without affecting the standard setup.

Last edited by V1del (2014-11-16 12:06:38)

Offline

#8 2014-11-16 17:34:01

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Several 5.1 Surround Issues

The problem is, I'm not sure how to do the things either of you are mentioning.

@brebs:
I took a look at that asoundrc file you wrote and it seems to have a something for just about everything you need, whether it's skype, doom, movies, etc.  The thing is, I don't know how to get applications to know which configuration to use.  So I can copy that ttable you have for doom but I don't know how to get any applications to use it, especially if PA might be overriding it.  There could be a whole other section I need that is part of your asoundrc and I wouldn't know what it is, or if even that alone will work properly.  I don't have doom3 so I can't use that as proof for the test.

@V1del:
This falls under the same situation as brebs' suggestion - I could attempt to set up a module-remap-sink but I don't know how to tell a specific application to use it.  I don't want all applications to use it because not all of them have this issue.


Sorry - I don't mean to be a pain about this but I have only once ever got any success out of a asoundrc configuration, and that success went away after a minor ALSA update.  PA gives me plenty of issues but there are ways to "force" it to do what you want.  But messing with asoundrc feels like searching for a needle in a haystack.

Offline

#9 2014-11-16 18:19:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: Several 5.1 Surround Issues

easiest way is to use pavucontrol you can push each applications individually to their own sinks, different soundcards are their own sinks, but you can also do a virtual one as you'd do with a remap sink, e.g. I have a usb headset but I only want it used on a specific stream, happens to be skype here, so my default sink is the internal soundcard which outputs to my speakers and each time a new sound comes up it gets initially thrown to the speakers. Now I go and switch it over to the headset. This only affects that one application, others aren't affected by this. This choice gets saved, so as soon as the same application outputs sound again it goes through my headset.

Last edited by V1del (2014-11-16 18:20:26)

Offline

#10 2014-11-16 20:29:34

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Several 5.1 Surround Issues

Ah I didn't know it actually saved the choice.  I knew you could use pavucontrol to change which sink an application could use but I didn't know it remembered this.  Unfortunately, the link you sent me to relies on ALSA sinks, which I believe are only defined in asoundrc.  So unless there is a way to re-route channels in PA without asoundrc, it looks like no matter what I do I have to configure that mess.

I find it really mind boggling how screwed up linux audio is beyond wearing a pair of headphones with a mic.  I could never find an up-to-date comprehensive form of documentation for ALSA.  Pulseadio seems to be adequately documented, but whenever it says "well you need to do ___ in ALSA" you're pretty much screwed since they don't tell you how to do that, and if they do, the method is out of date and ALSA won't accept it.

Offline

#11 2014-11-16 23:11:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: Several 5.1 Surround Issues

It doesn't rely on ALSA sinks (technically it does as pulseaudio plugs on top of alsa, but you shouldn't need to use any alsa configuration because you can do the necessary steps via pulse), as in no asoundrc fiddling required, you just use the name identifiers to know on which card you want to base your channel map on use the names property from

pacmd list-cards

Not to sound like a bland ass, but it seems a lot of your problems come from not wanting to touch any configuration file ever. There exists good alsa documentation as well as pulse but if you don't want to do anything outside of provided GUIs your options are only going to go that far.

Offline

#12 2014-11-17 00:11:20

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Several 5.1 Surround Issues

According to pulseadio, it would not start up because it said that ALSA sinks were missing.  I followed the guide as written and just changed the channel output.  I'll have to take a closer look I guess.

I've configured plenty of things without a GUI; I am using Arch after all.  I have already meddled with config files for pulseaudio.  But ALSA is the ONLY thing I have worked with in linux where I wouldn't be able get a proper configuration if you paid me to.  There are other things that are a nightmare to configure, such as samba, xorg, or lcdproc, but I CAN still make progress with those.  I have yet to find any good, complete, comprehensive, and MODERN documentation on how to configure ALSA.  I am not the only one who has this issue - ALSA is notorious for being difficult to configure.

Offline

#13 2014-11-17 19:42:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: Several 5.1 Surround Issues

Could you post what you tried and eventual error logs so that we can try to help you? from my understanding something like this should suffice

load-module module-remap-sink sink_name=swap51 master=alsa_output.pci-0000_01_08.0.analog-surround-51 ###adjust this with the correct name from pacmd list-cards### channels=6 master_channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe channel_map=front-left, front-right, centre, lfe , rear-left, rear-right

I think something along those lines should do the trick (play around a bit, if this wasn't correct switch the master_channel_map and the channel_map or lay out both the Windows way.)

Just fyi the alsa-sink stuff is when you disable the automatic detection and instead create the corresponding sinks for your physical cards manually, I don't think this is inherently necessary for now. (But again nothing to do with asoundrc, you shouldn't have to configure anything in alsa if you intend to use pulse, except for the default pulse plug so that alsa-only applications can route through pulse)

Last edited by V1del (2014-11-17 19:42:50)

Offline

Board footer

Powered by FluxBB