[pulseaudio-discuss] [PATCH 2/3] alsa-mixer: Add possibility to configure ELD device

David Henningsson david.henningsson at canonical.com
Fri Feb 15 04:42:14 PST 2013


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 at canonical.com>
---
 src/modules/alsa/alsa-mixer.c                   |    3 +++
 src/modules/alsa/alsa-mixer.h                   |    1 +
 src/modules/alsa/mixer/paths/hdmi-output-0.conf |    1 +
 src/modules/alsa/mixer/paths/hdmi-output-1.conf |    1 +
 src/modules/alsa/mixer/paths/hdmi-output-2.conf |    1 +
 src/modules/alsa/mixer/paths/hdmi-output-3.conf |    1 +
 6 files changed, 8 insertions(+)

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 761aae1..a282d4b 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -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();
diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
index 2e3c115..6a425eb 100644
--- a/src/modules/alsa/alsa-mixer.h
+++ b/src/modules/alsa/alsa-mixer.h
@@ -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;
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-0.conf b/src/modules/alsa/mixer/paths/hdmi-output-0.conf
index 69b39ec..3310147 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-0.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-0.conf
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort
 priority = 59
+eld-device = 3
 
 [Properties]
 device.icon_name = video-display
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-1.conf b/src/modules/alsa/mixer/paths/hdmi-output-1.conf
index 01eeeed..d81ee78 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-1.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-1.conf
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 2
 priority = 58
+eld-device = 7
 
 [Properties]
 device.icon_name = video-display
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-2.conf b/src/modules/alsa/mixer/paths/hdmi-output-2.conf
index 5974511..349812f 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-2.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-2.conf
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 3
 priority = 57
+eld-device = 8
 
 [Properties]
 device.icon_name = video-display
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-3.conf b/src/modules/alsa/mixer/paths/hdmi-output-3.conf
index 92a7acf..81463c9 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-3.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-3.conf
@@ -1,6 +1,7 @@
 [General]
 description = HDMI / DisplayPort 4
 priority = 56
+eld-device = 9
 
 [Properties]
 device.icon_name = video-display
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list