[pulseaudio-discuss] [PATCH 1/2] channelmap: Add 2.1 surround

David Henningsson david.henningsson at canonical.com
Mon May 26 22:59:23 PDT 2014


Add surround-21 as a alias to set up a 2.1 channel map.

Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/pulse/channelmap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 72e4130..e1b173a 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -536,6 +536,12 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *rmap, const char *s) {
         map.map[0] = PA_CHANNEL_POSITION_LEFT;
         map.map[1] = PA_CHANNEL_POSITION_RIGHT;
         goto finish;
+    } else if (pa_streq(s, "surround-21")) {
+        map.channels = 3;
+        map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
+        map.map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
+        map.map[2] = PA_CHANNEL_POSITION_LFE;
+        goto finish;
     } else if (pa_streq(s, "surround-40")) {
         map.channels = 4;
         map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
-- 
1.9.1



More information about the pulseaudio-discuss mailing list