[pulseaudio-discuss] Dealing with the ThinkPad hardware mixer

Andrew Lutomirski luto at mit.edu
Tue May 24 12:19:30 PDT 2011

On Tue, May 24, 2011 at 2:54 PM, Tom Gundersen <teg at jklm.no> wrote:
> On Tue, May 24, 2011 at 8:49 PM, Andrew Lutomirski <luto at mit.edu> wrote:
>> On Tue, May 24, 2011 at 10:13 AM, Tom Gundersen <teg at jklm.no> wrote:
>>> I don't know much about this, but since there might be differences
>>> between different models, I'll add my two cents. I have a ThinkPad
>>> X60.
>>> On Tue, May 24, 2011 at 7:39 AM, David Henningsson
>>> <david.henningsson at canonical.com> wrote:
>>>> 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.
>>> The buttons affect both the speakers and headset. When the headest is
>>> connected the speaker is muted (I don't know if this is done in
>>> software or in hardware, but I always assumed it was done in hardware
>>> as it always worked this way). I never tried usb headset, and don't
>>> have HDMI.
>>>>> 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?
>>> At least on my laptop alsamixer can not set the volume/mute of -c29,
>>> this can only be done by the buttons.
>> thinkpad_acpi.volume_control=1 will enable it.  I don't know why the
>> default is the way it is.
> Thanks for the hint!
>> If you run my patch, then you'll have a file
>> /sys/devices/platform/thinkpad_acpi/volume_autocontrol that configures
>> whether the mute button just mutes the mixer ("latch"), toggles the
>> mixer state ("toggle"), or sends KEY_MUTE ("none").  Without the
>> patch, depending on your model and your acpi_osi parameter, you might
>> have the button mute the mixer *and* send KEY_MUTE or just send
>> KEY_MUTE.  The former behavior is not so nice.  (My patch also
>> prevents typematic repeat of the mute button, which is just silly.)
>> http://permalink.gmane.org/gmane.linux.drivers.platform.x86.devel/1941
> Do you have a public git repo or something like that? I make a mess
> when trying to copy your patch from the webinterface (sorry if there
> is a nice way to do this that I do not know about).

No, and I can't find a patchwork instance that would have picked it up
either.  So I attached it.  (As a free bonus, there's another patch
that makes the microphone mute button generate a keycode.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-KEY_MICMUTE-and-enable-it-on-Lenovo-X220.patch
Type: application/octet-stream
Size: 2145 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110524/8649386e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-thinkpad-acpi-Improve-hardware-volume-controls.patch
Type: application/octet-stream
Size: 14314 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110524/8649386e/attachment-0001.obj>

More information about the pulseaudio-discuss mailing list