Re: [PATCH 1/2] thinkpad-acpi: Try to use full software mute control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Oct 2014, Andy Lutomirski wrote:
> ThinkPads have hardware volume controls and three buttons to control
> them.  (These are separate from the standard mixer.)  By default,
> the buttons are:
> 
>  - Mute: Mutes the hardware volume control and generates KEY_MUTE.
>  - Up: Unmutes, generates KEY_VOLUMEUP, and increases volume if
>    applicable.  (Newer thinkpads only have hardware mute/unmute.)
>  - Down: Unmutes, generates KEY_VOLUMEDOWN, and decreases volume
>    if applicable.

On IBM ThinkPads, the "generates KEY_foo" thing is controlable by the
driver.  In fact, thinkpad_acpi defaults to NOT send these, all breakage
is entirely the fault of userspace that enables it instead of doing OSD
out of the extra mixer, and then fails to deal with the side-effects.

On Lenovo ThinkPads, it depends on BIOS/EC version for the X60/T60.  Later
versions will behave like the X61/T61. Since family 200 you can tell the
EC to switch modes (latch, toggle, none), but Lenovo didn't test it well
enough.

> This behavior is unfortunate, since modern userspace will also
> handle the hotkeys and change the other mixer.  If the software

Like I said, we disable that by default, and userspace enables them back
because they want to use it as a keyboard.  We could override it entirely
on the IBM thinkpads, and refuse to issue any key events no matter what, I
suppose.

> This should also allow us to remove _OSI(Linux) for all ThinkPads.

No, it doesn't.  Only after an exaustive search for what _OSI(Linux)
changes across a brickload of thinkpad ACPI dumps could we say that for
sure.

> For future reference: It turns out that we can ask ACPI for one of
> three behaviors directly on very new models.  They are "latch" (the
> default), "none" (no automatic control), and "toggle" (mute unmutes
> when muted).  All of the modes besides "none" seem to be a bit buggy,
> though, and there is no known way to get any notification that the
> hardware state has changed other than listening for a mute button
> press on the i8042 port.

Yeah.

> + * The EC or perhaps SMM firmware can optionally automatically change
> + * the volume in response to user input.  Unfortunately, this rarely

It is the EC, which also emulates the i8042 KBC.

I don't see any problems with the code, will have to test it in a IBM
thinkpad, though (I have one).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux