]> code.delx.au - pulseaudio/commitdiff
alsa: cover "Desktop Speaker" mixer elements
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Feb 2010 21:23:39 +0000 (22:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 21 Feb 2010 16:47:01 +0000 (17:47 +0100)
As exposed by really old Microsoft USB sound systems

src/modules/alsa/alsa-mixer.c
src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf [new file with mode: 0644]
src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
src/modules/alsa/mixer/paths/analog-output-headphones.conf
src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
src/modules/alsa/mixer/paths/analog-output-mono.conf
src/modules/alsa/mixer/paths/analog-output-speaker.conf
src/modules/alsa/mixer/paths/analog-output.conf
src/modules/alsa/mixer/profile-sets/default.conf

index 8bbd1f5c9154c0e94cd268eec3ceac18532dabe0..cb814aff0e3019c9fbbd70fc323657b8349e3dbb 100644 (file)
@@ -1784,7 +1784,8 @@ static int path_verify(pa_alsa_path *p) {
         { "analog-output-lfe-on-mono",  N_("Analog Output (LFE)") },
         { "analog-output-mono",         N_("Analog Mono Output") },
         { "analog-output-headphones-2", N_("Analog Headphones 2") },
-        { "analog-output-speaker",      N_("Analog Speaker") }
+        { "analog-output-speaker",      N_("Analog Speakers") }
+        { "analog-output-desktop-speaker", N_("Analog Speakers 2") }
     };
 
     pa_alsa_element *e;
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
new file mode 100644 (file)
index 0000000..9f18b25
--- /dev/null
@@ -0,0 +1,98 @@
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+; Path for mixers that have a 'Desktop Speaker' control
+;
+; See analog-output.conf.common for an explanation on the directives
+
+[General]
+priority = 100
+
+[Element Hardware Master]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
+[Element Master]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
+[Element Master Mono]
+switch = off
+volume = off
+
+; This profile path is intended to control the desktop speaker, not
+; the headphones. But it should not hurt if we leave the headphone
+; jack enabled nonetheless.
+[Element Headphone]
+switch = mute
+volume = zero
+
+[Element Headphone2]
+switch = mute
+volume = zero
+
+[Element Speaker]
+switch = off
+volume = off
+
+[Element Desktop Speaker]
+required = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
+[Element Front]
+switch = mute
+volume = merge
+override-map.1 = all-front
+override-map.2 = front-left,front-right
+
+[Element Rear]
+switch = mute
+volume = merge
+override-map.1 = all-rear
+override-map.2 = rear-left,rear-right
+
+[Element Surround]
+switch = mute
+volume = merge
+override-map.1 = all-rear
+override-map.2 = rear-left,rear-right
+
+[Element Side]
+switch = mute
+volume = merge
+override-map.1 = all-side
+override-map.2 = side-left,side-right
+
+[Element Center]
+switch = mute
+volume = merge
+override-map.1 = all-center
+override-map.2 = all-center,all-center
+
+[Element LFE]
+switch = mute
+volume = merge
+override-map.1 = lfe
+override-map.2 = lfe,lfe
+
+.include analog-output.conf.common
index f2fd31c7fa6aafccfd99079993cc5eff98c023e5..580c798626fd200f2f46e8c2424eff3cac3e32c2 100644 (file)
@@ -55,6 +55,10 @@ override-map.2 = all-left,all-right
 switch = off
 volume = off
 
+[Element Desktop Speaker]
+switch = off
+volume = off
+
 [Element Front]
 switch = off
 volume = off
index 2131cfe81e2f9a6481fff71ac2023d9cf98229d8..79ebc7fd219396ac8ca2909d21277aef8fbd7ba8 100644 (file)
@@ -55,6 +55,10 @@ volume = zero
 switch = off
 volume = off
 
+[Element Desktop Speaker]
+switch = off
+volume = off
+
 [Element Front]
 switch = off
 volume = off
index 0a43e2715fbac6d4fd043634f0a57cba37be9a89..67ee32f755dd17487a878a0c645070e1e7247d40 100644 (file)
@@ -58,6 +58,10 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right
 
+[Element Desktop Speaker]
+switch = off
+volume = off
+
 [Element Front]
 switch = off
 volume = off
index 542edc401d177e00a7c743917514f407aa7441e5..13a2d6aa9a8723bd996bdf7b36908bf98ee7f889 100644 (file)
@@ -55,6 +55,10 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right
 
+[Element Desktop Speaker]
+switch = off
+volume = off
+
 [Element Front]
 switch = off
 volume = off
index aea785345981cd83715693cbf8f09b29ee5fb8da..b133a2ee104ad54c9c3d8f2ce6185b5e159afa1d 100644 (file)
@@ -55,6 +55,10 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right
 
+[Element Desktop Speaker]
+switch = off
+volume = off
+
 [Element Front]
 switch = mute
 volume = merge
index d7c1223b9a16e6b9b8dfb081de01b92fd772fc24..50fc88eac4a1850dadc57dee36182ab46e21124f 100644 (file)
@@ -53,6 +53,10 @@ volume = zero
 switch = mute
 volume = off
 
+[Element Desktop Speaker]
+switch = mute
+volume = off
+
 [Element Front]
 switch = mute
 volume = merge
index 046938fcab021a9160c4765862ab9404e3e02ef0..5d352f1cacd2d74157e4958d3244f25830f52760 100644 (file)
@@ -62,42 +62,42 @@ auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
 paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 1
 
 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
 paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 10
 
 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
 priority = 7
 direction = output
 
 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
 priority = 8
 direction = output
 
 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
 priority = 7
 direction = output
 
 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
 priority = 8
 direction = output
 
@@ -105,7 +105,7 @@ direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
 priority = 7
 direction = output