From 02dc6d84edde7af86e155b224b6aa98080ef2979 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Tue, 31 Mar 2015 14:38:03 +0200 Subject: [PATCH] alsa-mixer: Use separate profiles for Multichannel Input/Output 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 Suggested-by: Raymond Yau BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=80850 Signed-off-by: David Henningsson --- src/modules/alsa/alsa-mixer.c | 6 +++++- src/modules/alsa/mixer/profile-sets/default.conf | 11 ++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 2fe2ae4..3832327 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -3897,7 +3897,10 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) { static const struct description_map well_known_descriptions[] = { { "analog-mono", N_("Analog Mono") }, { "analog-stereo", N_("Analog Stereo") }, - { "multichannel", N_("Multichannel") }, + /* Note: Not translated to "Multichannel Input" - then the source name would be "Multichannel Input Input". + Same for multichannel-output. */ + { "multichannel-input", N_("Multichannel") }, + { "multichannel-output", 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 +4052,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-output+input:multichannel-input", 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..25c1960 100644 --- a/src/modules/alsa/mixer/profile-sets/default.conf +++ b/src/modules/alsa/mixer/profile-sets/default.conf @@ -442,12 +442,21 @@ channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe priority = 1 direction = output -[Mapping multichannel] +[Mapping multichannel-output] device-strings = hw:%f channel-map = left,right,rear-left,rear-right exact-channels = false fallback = yes priority = 1 +direction = output + +[Mapping multichannel-input] +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] -- 2.7.4