GNOME Bugzilla – Bug 528050
confusing mixer controls with intel hda card (Samsung Q45 laptop)
Last modified: 2015-01-19 11:49:56 UTC
On my Samsung Q45 laptop, gnome-volume-control's track list contains duplicate tracks: Capture, Capture 1 and Capture 2. These all toggle the display of a single Capture track. However, alsamixer correctly displays three separate Capture, Capture 1 and Capture 2 tracks. The track list also contains three entries entitled "Input Source", which all toggle the same Input Source track... but again alsamixer displays correctly Input Source, Input Source 1 and Input Source 2. Finally, toggling the visibility of those tracks also toggles the visibility of other, unrelated tracks. Toggling Capture causes Headphone to be toggled, and togglign Headphone causes PCM to be toggled! The controls are only toggled in the track list, however--they remain visible in the main mixer window.
I've put a movie of the weirdness online at <http://robots.org.uk/stuff/linked-controls-rmd.ogv>.
OMG, it's completely fucked up! :) Do you know what Capture/Input x, 1, 2 means? This bug will be tricky to fix for developers who don't have such a complex sound card... It might well be in GstMixer ALSA element as well. Let's review the code!
Indeed, something might be being lost in one of the abstraction layers between the hardware and the gnome mixer. Anyway, it seem that I have three capture devices: $ hal-find-by-property --key alsa.type --string capture /org/freedesktop/Hal/devices/pci_8086_284b_alsa_capture_6 /org/freedesktop/Hal/devices/pci_8086_284b_alsa_capture_2 /org/freedesktop/Hal/devices/pci_8086_284b_alsa_capture_0 Capture seems to let me toggle the volume of what is recorded; input source lets me pick between Front Microphone and Microphone (the former being the laptop's built-in microphone, the latter being the microphone socket). So these 2x3 channels together baiscally let me set up presets I guess. ALSA info: $ amixer info Mixer name : 'Realtek ALC262' Components : 'HDA:10ec0262 HDA:11c11040' Controls : 26 Simple ctrls : 17 $ amixer scontents Simple mixer control 'Headphone',0 Capabilities: pswitch Playback channels: Front Left - Front Right Mono: Front Left: Playback [on] Front Right: Playback [on] Simple mixer control 'PCM',0 Capabilities: pvolume Playback channels: Front Left - Front Right Limits: Playback 0 - 255 Mono: Front Left: Playback 255 [100%] [0.00dB] Front Right: Playback 255 [100%] [0.00dB] Simple mixer control 'Front',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 7 [23%] [-36.00dB] [off] Front Right: Playback 7 [23%] [-36.00dB] [off] Simple mixer control 'Front Mic',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 31 [100%] [12.00dB] [off] Front Right: Playback 31 [100%] [12.00dB] [off] Simple mixer control 'Front Mic Boost',0 Capabilities: volume Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 3 Front Left: 1 [33%] Front Right: 1 [33%] Simple mixer control 'Mic',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 31 [100%] [12.00dB] [on] Front Right: Playback 31 [100%] [12.00dB] [on] Simple mixer control 'Mic Boost',0 Capabilities: volume Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 3 Front Left: 1 [33%] Front Right: 1 [33%] Simple mixer control 'IEC958',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 31 Front Left: Capture 31 [100%] [34.50dB] [off] Front Right: Capture 31 [100%] [34.50dB] [off] Simple mixer control 'Capture',1 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 31 Front Left: Capture 31 [100%] [34.50dB] [off] Front Right: Capture 31 [100%] [34.50dB] [off] Simple mixer control 'Capture',2 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 31 Front Left: Capture 0 [0%] [-12.00dB] [off] Front Right: Capture 0 [0%] [-12.00dB] [off] Simple mixer control 'Caller ID',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Digital',0 Capabilities: cvolume Capture channels: Front Left - Front Right Limits: Capture 0 - 120 Front Left: Capture 60 [50%] [0.00dB] Front Right: Capture 60 [50%] [0.00dB] Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Mic' 'Front Mic' Item0: 'Front Mic' Simple mixer control 'Input Source',1 Capabilities: cenum Items: 'Mic' 'Front Mic' Item0: 'Mic' Simple mixer control 'Input Source',2 Capabilities: cenum Items: 'Mic' 'Front Mic' Item0: 'Front Mic' Simple mixer control 'Off-hook',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] $ amixer contents $ amixer contents numid=3,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=25,iface=MIXER,name='PCM Playback Volume' ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0 : values=255,255 | dBscale-min=42949621.96dB,step=0.20dB,mute=0 numid=9,iface=MIXER,name='Front Mic Boost' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=1,1 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=7,iface=MIXER,name='Front Mic Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=6,iface=MIXER,name='Front Mic Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=31,31 | dBscale-min=42949638.46dB,step=1.50dB,mute=0 numid=2,iface=MIXER,name='Front Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=1,iface=MIXER,name='Front Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=7,7 | dBscale-min=42949626.46dB,step=1.50dB,mute=0 numid=8,iface=MIXER,name='Mic Boost' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=1,1 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=5,iface=MIXER,name='Mic Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=4,iface=MIXER,name='Mic Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=31,31 | dBscale-min=42949638.46dB,step=1.50dB,mute=0 numid=11,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=13,iface=MIXER,name='Capture Switch',index=1 ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=15,iface=MIXER,name='Capture Switch',index=2 ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=10,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=31,31 | dBscale-min=42949660.96dB,step=1.50dB,mute=0 numid=12,iface=MIXER,name='Capture Volume',index=1 ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=31,31 | dBscale-min=42949660.96dB,step=1.50dB,mute=0 numid=14,iface=MIXER,name='Capture Volume',index=2 ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0 : values=0,0 | dBscale-min=42949660.96dB,step=1.50dB,mute=0 numid=19,iface=MIXER,name='IEC958 Playback Con Mask' ; type=IEC958,access=r-------,values=1 : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00] numid=20,iface=MIXER,name='IEC958 Playback Pro Mask' ; type=IEC958,access=r-------,values=1 : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00] numid=21,iface=MIXER,name='IEC958 Playback Default' ; type=IEC958,access=rw------,values=1 : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00] numid=22,iface=MIXER,name='IEC958 Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=off numid=24,iface=MIXER,name='Caller ID Switch' ; type=BOOLEAN,access=rw------,values=1 : values=off numid=26,iface=MIXER,name='Digital Capture Volume' ; type=INTEGER,access=rw---RW-,values=2,min=0,max=120,step=0 : values=60,60 | dBscale-min=42949642.96dB,step=0.50dB,mute=0 numid=16,iface=MIXER,name='Input Source' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Mic' ; Item #1 'Front Mic' : values=1 numid=17,iface=MIXER,name='Input Source',index=1 ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Mic' ; Item #1 'Front Mic' : values=0 numid=18,iface=MIXER,name='Input Source',index=2 ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Mic' ; Item #1 'Front Mic' : values=1 numid=23,iface=MIXER,name='Off-hook Switch' ; type=BOOLEAN,access=rw------,values=1 : values=off
I've solved the third part of my bug. Patch attached to bug #528252.
It appears that "Capture" and "Capture 1" share the same gconf keys. This is because get_gconf_key uses the GstMixerTrack's "untranslated-label" property to construct the key, and this property is "Capture" for all three of the tracks. As for the "Input Source" tracks, both the "untranslated-label" and "label" properties are the same. So I will file bugs against GStreamer about these problems, and this bug should be closed once we can depend on a fixed version of GStreamer. BTW, I think that relying on the label property of the GstMixerTracks is a bad idea... it is not documented anywhere that it is guaranteed to be unique... Also, I wonder how many of these problems are replicated in gnome-control-center (for the selection of the mixer track that is used when the user uses multimedia keys to change the volume) and in gnome-applets (for the mixer applet default track selection).
I've looked at gnome-applets and gnome-sound-properties; they store the value of the "label" property and not the value of "untranslated-label". I think gnome-panel should do the same. The issue of whether "label" is a sensible unique identifier for GstMixerTracks remains.
This will be fixed by gst-plugins-base 0.10.21. GstMixerTrack now has a "index" property which contains the index of the track if there are more than one with the same label.
(In reply to comment #7) > This will be fixed by gst-plugins-base 0.10.21. GstMixerTrack now has a "index" > property which contains the index of the track if there are more than one with > the same label. > Is it in sync with GNOME 2.24? Can we fix it easily? Do you plan to work on that? Thanks a lot slomo
gnome-media has been obsolete since the release of GNOME 3, nearly 4 years ago. Furthermore, the gnome-volume-control program in gnome-media has been replaced by the Sound panel in gnome-control-center. The new Settings panel should not be affected by the bugs you filed, however, please make sure to file new bugs against the gnome-control-center product.