You are not logged in.

#1 2015-04-04 15:04:31

biergaizi
Member
Registered: 2015-02-19
Posts: 13

[Solved] How to keep the channels of stereo audio "as is"?

I'm using a 5.1 surround sound system with ALSA/PulseAudio. I'm using HDMI to transmit to the receiver to power all speakers up. It works for movies without any issue especially after I passed "audio-channels=6" to mpv.  But I notice that when I play a stereo audio, the sound comes from all speakers / channels. For example:

$ aplay -c 2 /dev/urandom
Playing raw data '/dev/urandom' : Unsigned 8 bit, Rate 8000 Hz, Stereo (but all six speakers are working)

Does PulseAudio remix the audio? It's a nice feature for minimal multimedia speakers. But for some audio, it sounds better by just using to 2 channels as it recorded, and my receiver has enough DSP stuff and audio effects to remix the audio and to use all my channels (i.e I don't want to double-remix the audio). It should use the channels as it recorded. Is there a way to keep the channels of stereo audio "as is"?

Thanks for any advice.

Last edited by biergaizi (2015-04-05 05:31:07)

Offline

#2 2015-04-04 15:12:25

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

Re: [Solved] How to keep the channels of stereo audio "as is"?

Maybe this is useful, although it doesn't answer the question of how to route 6-channel audio *differently* to 2-channel audio:

In ~/.mpv/mpv.conf:

ao=alsa:device=default
audio-channels=2

Offline

#3 2015-04-04 17:42:43

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] How to keep the channels of stereo audio "as is"?

This looks promising:

man pulse-daemon.conf wrote:

enable-remixing= If disabled never upmix or downmix channels to different channel maps.  Instead,  do  a  simple  name-based  matching  only.  Defaults to yes.

Offline

#4 2015-04-04 23:14:11

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] How to keep the channels of stereo audio "as is"?

The "enable-remixing" is the setting the OP is looking for. It will disable remixing completely if set to "no", with the drawback that, say, 5.1 audio won't be downmixed to stereo if one only has 2 channels.
Disabling remixing globally seems to have weird side effects, I couldn't get my front connectors working after disabling it.

What I did was splitting my 7.1 device into a 5.1 and a 2.0 virtual devices, leaving the global remixing setting at default. Then I disabled the remixing for the 5.1 virtual device, while letting it remix for the 2.0 one.
So now when I want to remix, I just select my 2.0 device, and if I don't, the 5.1 device (or rather, in my case I actually have a 5.1 and a stereo device connected). The example is on the wiki


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#5 2015-04-05 05:30:38

biergaizi
Member
Registered: 2015-02-19
Posts: 13

Re: [Solved] How to keep the channels of stereo audio "as is"?

It works for me. Thanks everyone smile

Offline

Board footer

Powered by FluxBB