Audio volume control keys control microphone volume instead of PCM volume

Bug #174292 reported by Սահակ
6
Affects Status Importance Assigned to Milestone
GStreamer
Fix Released
High
control-center (Fedora)
Fix Released
Medium
gnome-control-center (Ubuntu)
Invalid
Unknown
Ubuntu Desktop Bugs
gst-plugins-base0.10 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

When pressing "Volume up" and "Volume button" buttons on the keyboard, the microphone's volume level is changing, instead of PCM volume level. Volume Applet is also displaying microphone's volume level, instead of pcm volume level. This is on a ThinkPad X61

Changed in control-center:
status: Unknown → Confirmed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for your report and investigation.

Changed in gnome-desktop:
assignee: nobody → desktop-bugs
importance: Undecided → Unknown
status: New → Triaged
Revision history for this message
Shanmuhanathan T (shanmuha) wrote :

Please goto System->Preferences->Sound

In there, in Devices tab (the first tab), select the tracks and device which you want to control with the keyboard keys. In your case, ensure that PCM track is selected.

This should solve your problem.
Regards,
Shanmu.

Revision history for this message
Սահակ (petrosyan) wrote :

Shanmu, it does indeed fix my problem. However this bug should stay open until PCM and not microphone track is selected there by default.

Revision history for this message
Aatheus (aatheus) wrote :

I have the same problem in Ubuntu Gutsy 32-bit on my Thinkpad T61.

Revision history for this message
Paul Campbell (campbep5) wrote :

Can also confirm this is the case on Ubuntu Gusty 32 bit using a Sony Vaio S4XP laptop. So its not just thinkpads affected.

Revision history for this message
Jerone Young (jerone) wrote :

This is definetly a Gnome issue. As KDE has no problem at all detecting the PCM. The problem here is that with the Thinkpad T61 & some other newer laptops the sound card no longer has a hardware mixer (otherwise know as "Master"), now they only have "PCM".

KDE seems to be able to handle this fine. I confirmed this by booting up Kubuntu 7.10 live cd on my Thinkpad T61 and when I pressed the up and down volume keys, they changed the volume of "PCM". Just worked out of the box.

I have been looking through the Gnome code base and I see places where if it does not detect "Master" it should fall back and try "PCM" , but this does not appear to work.

Jerone Young (jerone)
Changed in gnome-control-center:
status: Triaged → Confirmed
Revision history for this message
Jerone Young (jerone) wrote :

Ok after doing some serious looking the source of the problem is NOT gnome-control-center but Gstreamer alsa plugin. The last comment on the Redhat bugzilla was a good lead.

The problem is it not looking at PCM as a fall back for the master. So all that needed to be added was the code for it. I have not tested this yet (but I will).

This patch adds PCM as a fallback as the master volume for gstreamer alsa plugin.

Signed-off-by: Jerone Young <email address hidden>

diff -r 4a0fdea649ff ext/alsa/gstalsamixer.c
--- a/ext/alsa/gstalsamixer.c Wed Dec 26 11:31:46 2007 -0600
+++ b/ext/alsa/gstalsamixer.c Wed Dec 26 11:36:10 2007 -0600
@@ -154,6 +154,16 @@ gst_alsa_mixer_find_master_mixer (GstAls
     element = snd_mixer_elem_next (element);
   }

+ /* If not, check if we have a playback mixer labelled as 'PCM' */
+ element = snd_mixer_first_elem(handle);
+ for (i = 0; i < count; i++) {
+ if (snd_mixer_selem_has_playback_volume (element) &&
+ strcmp (snd_mixer_selem_get_name (element), "PCM") == 0) {
+ return element;
+ }
+ element = snd_mixer_elem_next (element);
+ }
+
   /* If not, check if we have a playback mixer with both volume and switch */
   element = snd_mixer_first_elem (handle);
   for (i = 0; i < count; i++) {

Revision history for this message
Jerone Young (jerone) wrote :

Ok tested and the patch works! The patch I pasted in on the last post got screwed up. I'll post the patch to the bugzilla as an attachment. The patch applies to gst-plugins-base-0.10.14 package.

Changed in control-center:
status: Confirmed → In Progress
Revision history for this message
Jerone Young (jerone) wrote :

I have filed a bugzilla in the gnome bugzilla so that gstreamer upstream is aware (and hopefully will take time to include the fix):

http://bugzilla.gnome.org/show_bug.cgi?id=506928

Revision history for this message
Jerone Young (jerone) wrote :

My patch was committed to upstream gstreamer. So I guess the fix in ubuntu will be to include gstreamer 0.10.16 when it is released or to include the patch with currently distributed packages.

Revision history for this message
Sebastien Bacher (seb128) wrote :

not a gnome-control-center issue

Changed in gnome-control-center:
status: Confirmed → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work there, the bug will be fixed with the next update or we will backport the change before hardy if there is no new version

Changed in gst-plugins-base0.10:
importance: Undecided → Low
status: New → Fix Committed
Changed in gstreamer:
status: Unknown → Fix Released
Revision history for this message
Jerone Young (jerone) wrote :

There is now a even better fix for this bug in ALSA 1.0.16-rc2 that actually adds a virtual master for the AD1984 driver and truly fixes this issue. This will make 2.6.25 .. but ubuntu would need to put this driver in there 2.6.24.

Changed in control-center:
status: In Progress → Fix Released
Jerone Young (jerone)
Changed in gst-plugins-base0.10:
status: Fix Committed → Fix Released
Changed in gstreamer:
importance: Unknown → High
Changed in control-center (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.