X86 platform drivers
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	ibm-acpi-devel@lists.sourceforge.net,
	Len Brown <len.brown@intel.com>,
	Jerone Young <jerone.young@canonical.com>,
	David Henningsson <david.henningsson@canonical.com>,
	Takashi Iwai <tiwai@suse.de>, Grant Diffey <gdiffey@gmail.com>,
	ALSA development <alsa-devel@alsa-project.org>,
	platform-driver-x86@vger.kernel.org,
	Andy Lutomirski <luto@MIT.EDU>
Subject: Re: [PATCH 1/2] thinkpad-acpi: Try to use full software mute control
Date: Thu, 16 Oct 2014 15:31:30 -0300	[thread overview]
Message-ID: <20141016183130.GA15835@khazad-dum.debian.net> (raw)
In-Reply-To: <72f375b46a34702fc9f8be419fa83c219fbc28c5.1413481880.git.luto@amacapital.net>

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

  reply	other threads:[~2014-10-16 18:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 18:02 [PATCH 0/2] Disable the ThinkPad HW mute/level control when possible Andy Lutomirski
2014-10-16 18:02 ` [PATCH 1/2] thinkpad-acpi: Try to use full software mute control Andy Lutomirski
2014-10-16 18:31   ` Henrique de Moraes Holschuh [this message]
2014-10-16 18:40     ` Andy Lutomirski
2014-10-16 18:54       ` Henrique de Moraes Holschuh
2014-10-16 19:34         ` Andy Lutomirski
2014-10-16 19:58           ` Henrique de Moraes Holschuh
2014-10-18  0:09             ` Andy Lutomirski
2014-10-25 16:13         ` Andy Lutomirski
2014-10-25 21:46           ` Henrique de Moraes Holschuh
2014-10-16 18:02 ` [PATCH 2/2] acpi: Remove _OSI(Linux) for ThinkPads Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141016183130.GA15835@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=gdiffey@gmail.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=jerone.young@canonical.com \
    --cc=len.brown@intel.com \
    --cc=luto@MIT.EDU \
    --cc=luto@amacapital.net \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox