]> code.delx.au - pulseaudio/commitdiff
alsa-mixer: Add possibility to configure ELD device
authorDavid Henningsson <david.henningsson@canonical.com>
Tue, 19 Feb 2013 12:25:48 +0000 (13:25 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 19 Feb 2013 18:14:40 +0000 (20:14 +0200)
The alsa mixer kcontrol has "device index" 3, 7, 8, and 9.
We need to configure this properly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-mixer.h
src/modules/alsa/mixer/paths/analog-output.conf.common
src/modules/alsa/mixer/paths/hdmi-output-0.conf
src/modules/alsa/mixer/paths/hdmi-output-1.conf
src/modules/alsa/mixer/paths/hdmi-output-2.conf
src/modules/alsa/mixer/paths/hdmi-output-3.conf

index f2e68d38175265b20437d0a14598281ceebf3ac4..137c9ebcb0bae36d6de19fb70c9140e65558a5d8 100644 (file)
@@ -2390,6 +2390,7 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
         { "description",         pa_config_parse_string,            NULL, "General" },
         { "name",                pa_config_parse_string,            NULL, "General" },
         { "mute-during-activation", pa_config_parse_bool,           NULL, "General" },
+        { "eld-device",          pa_config_parse_int,               NULL, "General" },
 
         /* [Option ...] */
         { "priority",            option_parse_priority,             NULL, NULL },
@@ -2422,11 +2423,13 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
     p->name = pa_xstrndup(n, strcspn(n, "."));
     p->proplist = pa_proplist_new();
     p->direction = direction;
+    p->eld_device = -1;
 
     items[0].data = &p->priority;
     items[1].data = &p->description;
     items[2].data = &p->name;
     items[3].data = &mute_during_activation;
+    items[4].data = &p->eld_device;
 
     if (!paths_dir)
         paths_dir = get_default_paths_dir();
index 5b710a3a242dfe4e06640195a1c593267b512d2a..b3f7455e7f65e85a73fa1eb81c9dd1b183395280 100644 (file)
@@ -182,6 +182,7 @@ struct pa_alsa_path {
     char *name;
     char *description;
     unsigned priority;
+    int eld_device;
     pa_proplist *proplist;
 
     pa_bool_t probed:1;
index 01835fbc83f832590e3c4211162dbc423c13655f..73d09f81d5006e0883bbd9ef6437bb746d9605b3 100644 (file)
@@ -59,6 +59,8 @@
 ; mute-during-activation = yes | no      # If this path supports hardware mute, should the hw mute be used while activating this
 ;                                        # path? In some cases this can reduce extra noises during port switching, while in other
 ;                                        # cases this can increase such noises. Default: no.
+; eld-device = ...                       # If this is an HDMI port, here's where to specify the device number for the ELD mixer
+;                                        # control. The default is to not make use of ELD information.
 ;
 ; [Properties]                           # Property list for this path. The list is merged into the port property list.
 ; <key> = <value>                        # Each property is defined on its own line.
index 69b39eca14edec68ab6246ac5a5291a7a0dfd4d7..331014709a3e4f86c700fd119b5667440195176b 100644 (file)
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort
 priority = 59
+eld-device = 3
 
 [Properties]
 device.icon_name = video-display
index 01eeeed5864281981b18a724f2946b4d1919bd6b..d81ee789ca4e3ea8de9977fcb3d72d425ac0c7cc 100644 (file)
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 2
 priority = 58
+eld-device = 7
 
 [Properties]
 device.icon_name = video-display
index 597451127e584a30206bdb8c8e4521f13d9f7759..349812fc2e2bb9a8a8e38d5cdf60365c72343a71 100644 (file)
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 3
 priority = 57
+eld-device = 8
 
 [Properties]
 device.icon_name = video-display
index 92a7acf9a33a9dfd11a2668c3f138f2e90a374f4..81463c9463e8812b0c27d470c251c1c748dbb6ae 100644 (file)
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 4
 priority = 56
+eld-device = 9
 
 [Properties]
 device.icon_name = video-display