[pulseaudio-discuss] Dealing with the ThinkPad hardware mixer

David Henningsson david.henningsson at canonical.com
Mon May 23 22:39:42 PDT 2011

Hi Andrew and thanks for dealing with this issue! I'm sometimes working 
with certifying Lenovo for Canonical/Ubuntu, so this definitely concerns 
me. However I know very little about the thinkpad-acpi driver and would 
like to know more about how it works, and especially the mixer part.

On 2011-05-23 19:21, Andrew Lutomirski wrote:
> Most ThinkPad laptops have an extra mixer that has nothing to do with
> the HDA audio hardware.  The kernel can talk to it through the
> embedded controller and, if it's muted, then there's no sound even if
> the normal controls are all set on.

Does this concern the internal speaker only, or headphones / line out as 
well? Or can that differ between models? I'm assuming it doesn't mute e 
g USB headset or audio out over HDMI.

> These laptops have three special buttons.  The mute button either
> mutes the mixer or toggles the mute state.  The volume up button
> unmutes the mixer (if muted) and sends KEY_VOLUMEUP.  The volume down
> button unmutes the mixer and sends KEY_VOLUMEDOWN.
> On very new models, there's a hardware mute light that indicates the
> status of the hardware mute.
> The thinkpad-acpi driver currently exposes an ALSA mixer and the
> alsamixer utility can talk to it.  But PulseAudio ignores it
> completely.
> What is the kernel supposed to do to get PulseAudio to DTRT?

Seen from my perspective, and maybe along the lines of Colin's reply, I 
think the best would be to try to integrate the hw mute in the HDA card 
at the kernel level (and thus skip card 29 entirely).

> On some,
> but not (I think) all, models, we can disable hardware mixer control
> and make all of the buttons act like ordinary buttons, but that will
> cause the light (if present) to malfunction, and I don't know if all
> models can do this.  So as it stands, PulseAudio would have to
> understand that the mixer is special and watch for ALSA change
> notifications.

So, what can the thinkpad-acpi driver do here? Can it e g control the 
hardware mute status at all, or can that only be done by pressing the keys?

> I'm willing to change the thinkpad-acpi driver to make it work better,
> but I know nothing at all about PulseAudio internals.  What should I
> do?
> (There's an added complexity.  Really old models have mute and volume.
>   I don't own one, so I don't know much about how they work.)

As a maybe unrelated issue, many of these thinkpads also have a 
microphone mute hotkey I was hoping to be able to get to work at some 
point. Assuming we add a new key to linux/input.h, would it be easy for 
you to fix that in the thinkpad-acpi driver? I think it currently 
triggers KEY_UNKNOWN.

David Henningsson, Canonical Ltd.

More information about the pulseaudio-discuss mailing list