Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Remapping 5.1 sound to 2.1 (stereo)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 736

PostPosted: Tue Dec 27, 2022 12:19 am    Post subject: [solved] Remapping 5.1 sound to 2.1 (stereo) Reply with quote

Any suggestions on remapping 5.1 sound to 2.1 (ie. sterio)?

I am attempting to play the December 2022 updated version of Witcher3 and everything works except for the cut-scene voices which are non-existent. A little searching indicates that Witcher3 now expects 5.1 sound and I don't have the other channels. I am using alsa and the USB audio device to control the analog line out on the motherboard.

from 'aplay -l' and skipping the card 1 Nvidia lines. (I have no idea why there is no card 0)

Code:
card 2: Audio [USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [USB Audio], device 3: USB Audio [USB Audio #3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Last edited by jagdpanther on Fri Dec 30, 2022 7:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2581
Location: Here and Away Again

PostPosted: Wed Dec 28, 2022 3:45 pm    Post subject: Reply with quote

Split off of Native Steam client and source game engine into its own topic, as the issue doesn't seem specific to using Steam, and it will probably get more eyes on it this way.

I believe I used something like this to force audio into the correct stereo channels for Dark Souls, which I think does or at least did something similar with no options to change it:

Code:
pcm.correctedSurround
{
   type plug
   slave.pcm "device/pcm name here"

   ttable
   {
      0.0 1    # Front Left
      1.1 1    # Front Right
      2.0 0.5  # Rear Left
      3.1 0.5  # Rear Right
      4.0 1    # Front Center
      4.1 1    # Front Center
      5.0 0.5  # Rear Center
      5.1 0.5  # Rear Center
   }

   hint
   {
      show on # May or may not make this show up as an audio device choice in things.
   }
}

_________________
Kindest of regardses.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6102
Location: Dallas area

PostPosted: Wed Dec 28, 2022 5:07 pm    Post subject: Reply with quote

https://github-wiki-see.page/m/andrew-bibb/mbmp/wiki/Downmix-5.1-to-Stereo-%28ALSA%29
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 736

PostPosted: Fri Dec 30, 2022 7:17 pm    Post subject: Reply with quote

Chiitoo, Anon-E-moose thanks for the replies.

I created a ~/.asoundrc that contains the following that solves the issue:

Code:

defaults.pcm.!card 2
defaults.pcm.!device 0


pcm.correctedSurround
{
   type plug
   #slave.pcm "device/pcm name here"
   slave.pcm "Audio"

   ttable
   {
      0.0 1    # Front Left
      1.1 1    # Front Right
      2.0 0.5  # Rear Left
      3.1 0.5  # Rear Right
      4.0 1    # Front Center
      4.1 1    # Front Center
      5.0 0.5  # Rear Center
      5.1 0.5  # Rear Center
   }

   hint
   {
      show on # May or may not make this show up as an audio device choice in things.
   }
}


Edit: That solves the issue sometimes.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum