alsa: Add support for sound cards with 4-channel input.
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 1 May 2012 17:09:12 +0000 (20:09 +0300)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Fri, 11 May 2012 11:25:29 +0000 (16:55 +0530)
Changes in v2:
 - Call the mapping a generic 4-channel input mapping
   instead of a 4-channel mic array mapping. The mapping
   will be used also by sound cards that have two stereo
   input jacks, so in those cases talking about mic arrays
   is wrong.
 - Added a comment about using the "hw" device name.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=45813
src/modules/alsa/alsa-mixer.c
src/modules/alsa/mixer/profile-sets/default.conf

index abb12ee..8b54f75 100644 (file)
@@ -3888,6 +3888,7 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
         { "analog-surround-61",     N_("Analog Surround 6.1") },
         { "analog-surround-70",     N_("Analog Surround 7.0") },
         { "analog-surround-71",     N_("Analog Surround 7.1") },
+        { "analog-4-channel-input", N_("Analog 4-channel Input") },
         { "iec958-stereo",          N_("Digital Stereo (IEC958)") },
         { "iec958-passthrough",     N_("Digital Passthrough  (IEC958)") },
         { "iec958-ac3-surround-40", N_("Digital Surround 4.0 (IEC958/AC3)") },
index 5ac322b..28c8650 100644 (file)
@@ -148,6 +148,15 @@ paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
 priority = 7
 direction = output
 
+[Mapping analog-4-channel-input]
+# Alsa doesn't currently provide any better device name than "hw" for 4-channel
+# input. If this causes trouble at some point, then we will need to get a new
+# device name standardized in alsa.
+device-strings = hw:%f
+channel-map = aux0,aux1,aux2,aux3
+priority = 1
+direction = input
+
 [Mapping iec958-stereo]
 device-strings = iec958:%f
 channel-map = left,right