gnome-volume-control: USB headset volume buttons affect laptop speakers, not headset speakers

Bug #378334 reported by Stephen Warren
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: gnome-media

I have a Plantronics USB headset with speakers, microphone, and buttons for volume up/down and mute.

When I plug this headset into my laptop, and use the volume control buttons on the headset, it controls the volume on the PC speakers, not the headset playback volume like it should.

Similarly, the mute button on the headset doesn't seem to control any mute option for any device that shows up on gnome-volume-control (although I do see it activating the red mute LED on the headset). It's possible this button is handled internally by the USB headset itself, to mute the mic. Because of bug 378333, I can't record from the mic to validate if this is the case though.

affects: gnome-media (Ubuntu) → alsa-lib (Ubuntu)
Daniel T Chen (crimsun)
affects: alsa-lib (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
status: New → Fix Released
Revision history for this message
Stephen Warren (srwarren) wrote :

What are the details of the fix; which version of which package do I need? Thanks.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 378334] Re: gnome-volume-control: USB headset volume buttons affect laptop speakers, not headset speakers

Karmic/Lucid

Revision history for this message
Stephen Warren (srwarren) wrote :

I'm on Karmic and most of the symptoms above are still present.

[swarren@esk ~]$ dpkg -l|grep alsa
ii alsa-base 1.0.20+dfsg-1ubuntu5 ALSA driver configuration files
ii alsa-utils 1.0.20-2ubuntu6 ALSA utilities
ii bluez-alsa 4.51-0ubuntu2 Bluetooth audio support
ii gstreamer0.10-alsa 0.10.25-2ubuntu1.2 GStreamer plugin for ALSA
ii libesd-alsa0 0.2.41-5 Enlightened Sound Daemon (ALSA) - Shared lib
ii libsdl1.2debian-alsa 1.2.13-4ubuntu4 Simple DirectMedia Layer (with X11 and ALSA
ii python-alsaaudio 0.5-2 Alsa bindings for Python

I ran pavucontrol to verify this:

On the "Output Devices" tab, I see the volume sliders for the "Internal Audio Analog Stereo" move when I press the volume buttons on the USB device. I'd expect the sliders ot "USB DSP v4 Audio Interface Analog Stereo" to move instead. Note: If I use the "Sound Preferences" app (from right-click the volume control icon in the top menu bar), then I see that the USB device's volume buttons actually affect the currently selected sound output device. The dedicated volume buttons on my laptop behave the same way; either controlling the laptop speakers or USB device depending on what "Sound Preferences" selected as the output device. I suppose that could be correct according to an Ubuntu/Pulse policy decision, although it's not really what I'd expect.

On the "Input Devices" tab, I watch the VU meter for the USB device's mic while tapping it. The mute button on the USB device does affect recording, although it doesn't update the state of pavucontrol's GUI; i.e. when I use the GUI to mute, various controls get grayed out, and the mute button stays "pushed" in, but that doesn't happen when using the mute button on the USB device.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Please try a current Lucid daily-live.

Revision history for this message
Stephen Warren (srwarren) wrote :

Lucid live 1/31 behaves identically to Karmic.

Changed in pulseaudio (Ubuntu):
status: Fix Released → New
Revision history for this message
Daniel T Chen (crimsun) wrote :

Please provide a verbose log (cf. wiki/PulseAudio/Log).

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
James Henstridge (jamesh) wrote :

Hi Stephen,

if your Plantronics headset is anything like my Logitech one, it presents itself to the system as both a sound device and a keyboard device. When I press the volume buttons on the headset, it generates volume up/down keyboard events.

Probably the easiest way to test this is to pick System -> Preferences -> Keyboard Shortcuts, click on one of the actions and then press the volume up or down buttons on the headset. If that registers as XF86AudioLowerVolume/RaiseVolume, then your headset is probably like mine.

In that case, the underlying problem is that the volume up/down keypresses from the real keyboard are not being distinguished from those of the headset. Fixing this would require:
 1. detecting which keyboard the volume up/down keypress came from.
 2. associating keyboards with pulseaudio devices
 3. update the correct mixer.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Mark's latest commits (merged into Takashi's tree this afternoon) address (1) partially.

Revision history for this message
James Henstridge (jamesh) wrote :

Daniel: Are you referring to the following?

http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commit;h=ebb812cb8df48e299b3d4ab75cbb0042384ef70d

That patch seems to be about letting sound drivers report certain conditions as input layer key events.

With my headset (and I assume Stephen's too), there is a separate USB HID endpoint exposed by the device that is bound by the usbhid driver. So these key events are completely independent of alsa (I suspect that if I compiled a kernel with no sound support, the key events would still be generated).

Revision history for this message
Stephen Warren (srwarren) wrote :

James, yes, my USB headset does appear to be generating keyboard events just like you describe.

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

The volume control used to work fine under Karmic, but upgrading to the Lucid beta broke it. If I plug in my Logitech USB headset, the audio switches to the headset, but the volume control continues to affect the Internal Audio device. When I go to the Sound Preferences, the Output shows the Internal Audio device is selected. When I click on USB Headset in the Sound Preferences, the volume control starts working for it again. If I unplug and replug my USB headset, the volume control once again remains on the Internal Audio device although the audio goes to the USB headset.

tags: added: lucid-upgrade-testing
Revision history for this message
Stephen Warren (srwarren) wrote :
Changed in pulseaudio (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel T Chen (crimsun) wrote :

Are you sure this isn't a bug in gnome-media?

Revision history for this message
Daniel T Chen (crimsun) wrote :

Comment 13 was in response to comment 11.

Stephen, your issue is a bit more convoluted and involves tasking PA with sending HID events.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
god (humper) wrote :

confirm with plantronics dsp headset and 10.10

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.