summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-07-25 15:16:41 +0200
committerDavid Henningsson <david.henningsson@canonical.com>2014-08-01 18:05:49 +0200
commit48edd0a00f455df075efcf1986103e5f507c816f (patch)
treeb69c38086971400ec8b7042e94f3b0ea18a24b30
parentc15107eaf6045711d799a71204a8f94a1c424182 (diff)
alsa: Add a multichannel fallback mapping
In case all other profiles fail, try this fallback mapping as well. It allows the device to specify the channel count, so it can be used for devices that only supports being opened in multichannel mode. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/modules/alsa/alsa-mixer.c1
-rw-r--r--src/modules/alsa/mixer/profile-sets/default.conf11
2 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 9aa28a399..b4f4bbd83 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -3859,6 +3859,7 @@ 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") },
{ "analog-surround-21", N_("Analog Surround 2.1") },
{ "analog-surround-30", N_("Analog Surround 3.0") },
{ "analog-surround-31", N_("Analog Surround 3.1") },
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index ebe23247a..8b67e3326 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -107,7 +107,7 @@ device-strings = hw:%f
channel-map = mono
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
-priority = 1
+priority = 2
[Mapping analog-stereo]
device-strings = front:%f hw:%f
@@ -165,7 +165,7 @@ direction = output
# device name standardized in alsa.
device-strings = hw:%f
channel-map = aux0,aux1,aux2,aux3
-priority = 1
+priority = 2
direction = input
[Mapping iec958-stereo]
@@ -452,6 +452,13 @@ channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output
+[Mapping multichannel]
+device-strings = hw:%f
+channel-map = left,right,rear-left,rear-right
+exact-channels = false
+fallback = yes
+priority = 1
+
; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar