[pulseaudio-discuss] [PATCH] alsa-mixer: Add device.icon-name property for some common ports

David Henningsson david.henningsson at canonical.com
Fri Dec 7 07:44:44 PST 2012


If we expose this information, UIs can use this to make better
decisions about what icon to display.

Related bug: https://bugzilla.gnome.org/show_bug.cgi?id=689635

Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---

Do you think I should push this to 3.0? Just because
 - It is trivial
 - Nobody is using this information yet anyway

 .../alsa/mixer/paths/analog-input-mic.conf.common  |    3 +++
 .../mixer/paths/analog-output-desktop-speaker.conf |    3 +++
 .../mixer/paths/analog-output-headphones-2.conf    |    3 +++
 .../alsa/mixer/paths/analog-output-headphones.conf |    3 +++
 .../mixer/paths/analog-output-speaker-always.conf  |    3 +++
 .../alsa/mixer/paths/analog-output-speaker.conf    |    3 +++
 src/modules/alsa/mixer/paths/hdmi-output-0.conf    |    3 +++
 src/modules/alsa/mixer/paths/hdmi-output-1.conf    |    3 +++
 src/modules/alsa/mixer/paths/hdmi-output-2.conf    |    3 +++
 src/modules/alsa/mixer/paths/hdmi-output-3.conf    |    3 +++
 10 files changed, 30 insertions(+)

diff --git a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
index b1cdbaf..27bbccb 100644
--- a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
@@ -18,6 +18,9 @@
 ;
 ; See analog-output.conf.common for an explanation on the directives
 
+[Properties]
+device.icon_name = audio-input-microphone
+
 [Element Line]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
index dfdecf4..099823e 100644
--- a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
@@ -22,6 +22,9 @@
 priority = 101
 name = analog-output-speaker
 
+[Properties]
+device.icon_name = audio-speakers
+
 [Element Hardware Master]
 switch = mute
 volume = merge
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
index 284713b..6161ff5 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
@@ -22,6 +22,9 @@
 priority = 89
 name = analog-output-headphones
 
+[Properties]
+device.icon_name = audio-headphones
+
 [Element Hardware Master]
 switch = mute
 volume = merge
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index 77a46f1..df0f198 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -22,6 +22,9 @@
 priority = 90
 name = analog-output-headphones
 
+[Properties]
+device.icon_name = audio-headphones
+
 [Jack Front Headphone]
 required-any = any
 
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
index 14d67b0..3ebdc4a 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
@@ -23,6 +23,9 @@
 priority = 100
 name = analog-output-speaker
 
+[Properties]
+device.icon_name = audio-speakers
+
 [Jack Headphone]
 state.plugged = no
 state.unplugged = unknown
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
index a7e3c4c..7b47fc2 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
@@ -22,6 +22,9 @@
 priority = 100
 name = analog-output-speaker
 
+[Properties]
+device.icon_name = audio-speakers
+
 [Jack Headphone]
 state.plugged = no
 state.unplugged = unknown
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-0.conf b/src/modules/alsa/mixer/paths/hdmi-output-0.conf
index a86cdbd..69b39ec 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-0.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-0.conf
@@ -2,5 +2,8 @@
 description = HDMI / DisplayPort
 priority = 59
 
+[Properties]
+device.icon_name = video-display
+
 [Jack HDMI/DP,pcm=3]
 required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-1.conf b/src/modules/alsa/mixer/paths/hdmi-output-1.conf
index d579e4b..01eeeed 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-1.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-1.conf
@@ -2,5 +2,8 @@
 description = HDMI / DisplayPort 2
 priority = 58
 
+[Properties]
+device.icon_name = video-display
+
 [Jack HDMI/DP,pcm=7]
 required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-2.conf b/src/modules/alsa/mixer/paths/hdmi-output-2.conf
index fee57d7..5974511 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-2.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-2.conf
@@ -2,5 +2,8 @@
 description = HDMI / DisplayPort 3
 priority = 57
 
+[Properties]
+device.icon_name = video-display
+
 [Jack HDMI/DP,pcm=8]
 required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-3.conf b/src/modules/alsa/mixer/paths/hdmi-output-3.conf
index 4e6d149..92a7acf 100644
--- a/src/modules/alsa/mixer/paths/hdmi-output-3.conf
+++ b/src/modules/alsa/mixer/paths/hdmi-output-3.conf
@@ -2,5 +2,8 @@
 description = HDMI / DisplayPort 4
 priority = 56
 
+[Properties]
+device.icon_name = video-display
+
 [Jack HDMI/DP,pcm=9]
 required = ignore
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list