[pulseaudio-discuss] Dealing with the ThinkPad hardware mixer

Andrew Lutomirski luto at mit.edu
Mon May 23 13:13:54 PDT 2011


On Mon, May 23, 2011 at 4:00 PM, Tom Gundersen <teg at jklm.no> wrote:
> On Mon, May 23, 2011 at 7:50 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
>> 'Twas brillig, and Andrew Lutomirski at 23/05/11 18:21 did gyre and gimble:
>>> What is the kernel supposed to do to get PulseAudio to DTRT?  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.
>>>
>>> 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?
>>
>> Can you give some more details?
>>
>> e.g. does it show up under the same alsa card as the HDA or is it separate?
>>
>> amixer -c0 (or appropriate number) would be useful to begin with :)
>
> I have a ThinkPad X60 which I think is one of the relevant models. I
> have a mute botton and two volume buttons, but no light. Pressing vol
> up/down unmutes and changes the volume.
>
> As explained by Andy,
> alsamixer -c29
> shows the thinkpad mixer and it works as expected (read-only).
>
> Below are the outputs of amixer for my system (running 2.6.39 fwiw).
> I'd be happy to try patches or help in any other way to make this work
> nicely with PA.

My laptop will behave identically as far as ALSA is concerned.

Tom, if you apply this patch:

http://www.mail-archive.com/platform-driver-x86@vger.kernel.org/msg01884.html

then you may find that some bugs are fixed.  For example, right now I
suspect that hitting mute repeatedly will make PA toggle the software
mute on and off but will leave the mixer muted, leading to confusion
as to why there's no sound.  I also suspect that alsamixer does not
update itself when you press mute (but that if you quit and reload it
you'll see the new state).

If you're using acpi_osi=Linux then you'll see something different.

With that patch, pressing mute will not make PA do anything, which is
better than the current behavior of doing the wrong thing.  alsamixer
should also update itself automatically.  And you can play with
/sys/devices/platform/thinkpad_acpi/volume_autocontrol to change how
the button works.

I want to make PA play well with that patch or a modified version of it.

---Andy



More information about the pulseaudio-discuss mailing list