[PATCH 2/3] alsa-mixer: Use separate profiles for Multichannel Input/Output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This works around bug 80850: a mapping can only have one channel map,
and in case of a 6-out 10-in device, the mapping will be adjusted to
have both 10 and 6 channels, which does not work.

Reported-by: Benjamin Tegge <benjaminosm at googlemail.com>
Suggested-by: Raymond Yau <superquad.vortex2 at gmail.com>
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=80850
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/modules/alsa/alsa-mixer.c                    | 2 ++
 src/modules/alsa/mixer/profile-sets/default.conf | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 2fe2ae4..78eeae2 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -3898,6 +3898,7 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
         { "analog-mono",            N_("Analog Mono") },
         { "analog-stereo",          N_("Analog Stereo") },
         { "multichannel",           N_("Multichannel") },
+        { "multichannel2",          N_("Multichannel") },
         { "analog-surround-21",     N_("Analog Surround 2.1") },
         { "analog-surround-30",     N_("Analog Surround 3.0") },
         { "analog-surround-31",     N_("Analog Surround 3.1") },
@@ -4049,6 +4050,7 @@ static int profile_verify(pa_alsa_profile *p) {
         { "output:analog-mono+input:analog-mono",     N_("Analog Mono Duplex") },
         { "output:analog-stereo+input:analog-stereo", N_("Analog Stereo Duplex") },
         { "output:iec958-stereo+input:iec958-stereo", N_("Digital Stereo Duplex (IEC958)") },
+        { "output:multichannel+input:multichannel2",  N_("Multichannel Duplex") },
         { "off",                                      N_("Off") }
     };
 
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index 2d6720e..4b397cd 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -448,6 +448,15 @@ channel-map = left,right,rear-left,rear-right
 exact-channels = false
 fallback = yes
 priority = 1
+direction = output
+
+[Mapping multichannel2]
+device-strings = hw:%f
+channel-map = left,right,rear-left,rear-right
+exact-channels = false
+fallback = yes
+priority = 1
+direction = input
 
 ; An example for defining multiple-sink profiles
 #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
-- 
1.9.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux