All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Set osi=Linux for the ThinkPad X200s
@ 2009-11-09 16:47 Andrew Lutomirski
  2009-11-09 16:54 ` Matthew Garrett
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Andrew Lutomirski @ 2009-11-09 16:47 UTC (permalink / raw)
  To: linux-thinkpad, ACPI Devel Maling List

The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
button to work.  Without this patch (or the equivalent command-line
parameter), the mute button does not generate a keystroke and,
instead, messes up the sound hardware.

Tested on an X200s.

Signed-off-by: Andy Lutomirski <luto@mit.edu>

---

This is probably 2.6.33 material.

The X200 and X200T probably have the same problem.  Can someone test
them and submit similar patches?

Oddly enough, Windows has the same problem as Linux, where the mute
button does bad things until you install a special driver.

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index e56b2a7..ea9f88b 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -224,6 +224,7 @@ static struct dmi_system_id acpi_osi_dmi_table[]
__initdata = {
 	 * _OSI(Linux) helps sound
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"),
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"),
+	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
 	 * _OSI(Linux) has Linux specific hooks
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 	 * _OSI(Linux) is a NOP:
@@ -254,6 +255,14 @@ static struct dmi_system_id acpi_osi_dmi_table[]
__initdata = {
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 		},
 	},
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Lenovo X200s",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
+		},
+	},
 	{}
 };

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 16:47 [PATCH] Set osi=Linux for the ThinkPad X200s Andrew Lutomirski
@ 2009-11-09 16:54 ` Matthew Garrett
  2009-11-09 17:49   ` Andrew Lutomirski
  2009-11-10  9:19 ` [ltp] " Henrique de Moraes Holschuh
  2009-11-25  4:50 ` Len Brown
  2 siblings, 1 reply; 20+ messages in thread
From: Matthew Garrett @ 2009-11-09 16:54 UTC (permalink / raw)
  To: Andrew Lutomirski; +Cc: linux-thinkpad, ACPI Devel Maling List

On Mon, Nov 09, 2009 at 11:47:30AM -0500, Andrew Lutomirski wrote:
> The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
> button to work.  Without this patch (or the equivalent command-line
> parameter), the mute button does not generate a keystroke and,
> instead, messes up the sound hardware.

No. How does this work on Windows? Note that we *have* a special driver 
for Thinkpads, and it's entirely acceptable to require it in order to 
have sensible behaviour. We do not want to encourage vendors to 
special-case Linux.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 16:54 ` Matthew Garrett
@ 2009-11-09 17:49   ` Andrew Lutomirski
  2009-11-09 17:54     ` Matthew Garrett
  0 siblings, 1 reply; 20+ messages in thread
From: Andrew Lutomirski @ 2009-11-09 17:49 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-thinkpad, ACPI Devel Maling List, ibm-acpi

On Mon, Nov 9, 2009 at 11:54 AM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Mon, Nov 09, 2009 at 11:47:30AM -0500, Andrew Lutomirski wrote:
>> The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
>> button to work.  Without this patch (or the equivalent command-line
>> parameter), the mute button does not generate a keystroke and,
>> instead, messes up the sound hardware.
>
> No. How does this work on Windows? Note that we *have* a special driver
> for Thinkpads, and it's entirely acceptable to require it in order to
> have sensible behaviour. We do not want to encourage vendors to
> special-case Linux.

The Thinkpad mixer is really weird AFAICT.  I have no idea how the
mute button works in Windows with the driver, but I'm not sure that it
looks like a key press -- I think it does something to the mixer and
the driver detects it.

cc: Henrique: can we fix this in thinkpad-acpi?

I actually think the "Linux" behavior makes more sense -- the volume
up and down buttons already work on all operating systems, and with
this patch the mute button works the same way.

There's precedent for this hack, and regardless of what we want to
convince Lenovo to do, making existing hardware work is nice:
http://bugzilla.kernel.org/show_bug.cgi?id=9907

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 17:49   ` Andrew Lutomirski
@ 2009-11-09 17:54     ` Matthew Garrett
  2009-11-10  9:24       ` [ltp] " Henrique de Moraes Holschuh
  0 siblings, 1 reply; 20+ messages in thread
From: Matthew Garrett @ 2009-11-09 17:54 UTC (permalink / raw)
  To: Andrew Lutomirski; +Cc: linux-thinkpad, ACPI Devel Maling List, ibm-acpi

On Mon, Nov 09, 2009 at 12:49:56PM -0500, Andrew Lutomirski wrote:

> The Thinkpad mixer is really weird AFAICT.  I have no idea how the
> mute button works in Windows with the driver, but I'm not sure that it
> looks like a key press -- I think it does something to the mixer and
> the driver detects it.

When you hit the mixer button, does the ACPI interrupt count increase? 
If so, we're certainly in a position to do something with it.

> I actually think the "Linux" behavior makes more sense -- the volume
> up and down buttons already work on all operating systems, and with
> this patch the mute button works the same way.
>
> There's precedent for this hack, and regardless of what we want to
> convince Lenovo to do, making existing hardware work is nice:
> http://bugzilla.kernel.org/show_bug.cgi?id=9907

But it does nothing to solve the underlying issue, and then we get to 
apply the same patch again for the next Thinkpad product cycle. If we 
fix it properly, we don't need to bother.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 16:47 [PATCH] Set osi=Linux for the ThinkPad X200s Andrew Lutomirski
  2009-11-09 16:54 ` Matthew Garrett
@ 2009-11-10  9:19 ` Henrique de Moraes Holschuh
  2009-11-25  4:50 ` Len Brown
  2 siblings, 0 replies; 20+ messages in thread
From: Henrique de Moraes Holschuh @ 2009-11-10  9:19 UTC (permalink / raw)
  To: Andrew Lutomirski; +Cc: linux-thinkpad, ACPI Devel Maling List

On Mon, 09 Nov 2009, Andrew Lutomirski wrote:
> The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
> button to work.  Without this patch (or the equivalent command-line

In the X61, The MUTE button always work.  It *changes* the way it works
based on OSI(Linux), though.  It should be the same on the X200s.  That
doesn't mean OSI(Linux) is a bad idea for the X200s, it might be the right
thing to do.

> parameter), the mute button does not generate a keystroke and,
> instead, messes up the sound hardware.

Now, that's new.  Messes up the sound hardware?  I was told by Lenovo
ThinkPad users that MUTE toggled bit 6 of EC register 0x30, like every other
ThinkPad have done for over a decade...

-- 
  "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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 17:54     ` Matthew Garrett
@ 2009-11-10  9:24       ` Henrique de Moraes Holschuh
  2009-11-10 12:42         ` Matthew Garrett
  2009-11-10 13:32         ` Andrew Lutomirski
  0 siblings, 2 replies; 20+ messages in thread
From: Henrique de Moraes Holschuh @ 2009-11-10  9:24 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Mon, 09 Nov 2009, Matthew Garrett wrote:
> When you hit the mixer button, does the ACPI interrupt count increase? 
> If so, we're certainly in a position to do something with it.

It is supposed to go over the KDC.  But I would be _really_ interested on
any events related to volume key presses on the X200s.  I expect it is
issuing one of the ACPI volume notification events with OSI(Linux), and none
without.

> But it does nothing to solve the underlying issue, and then we get to 
> apply the same patch again for the next Thinkpad product cycle. If we 
> fix it properly, we don't need to bother.

If I get a full description of behaviour, etc.  I can simply ask Lenovo
about it.

AFAIK, the native volume control through windows is being done in a
different way, nowadays.  I'd need to know, without OSI(Linux), where the
events are going.  That'd be enough to know when to read EC 0x30 and check
if it is now mute/unmute.

-- 
  "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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-10  9:24       ` [ltp] " Henrique de Moraes Holschuh
@ 2009-11-10 12:42         ` Matthew Garrett
  2009-11-10 13:32         ` Andrew Lutomirski
  1 sibling, 0 replies; 20+ messages in thread
From: Matthew Garrett @ 2009-11-10 12:42 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Tue, Nov 10, 2009 at 07:24:18AM -0200, Henrique de Moraes Holschuh wrote:

> It is supposed to go over the KDC.  But I would be _really_ interested on
> any events related to volume key presses on the X200s.  I expect it is
> issuing one of the ACPI volume notification events with OSI(Linux), and none
> without.

It appears over the KDC when OSI(Linux) is passed, and doesn't 
otherwise.

> AFAIK, the native volume control through windows is being done in a
> different way, nowadays.  I'd need to know, without OSI(Linux), where the
> events are going.  That'd be enough to know when to read EC 0x30 and check
> if it is now mute/unmute.

Yeah. There's clearly some way to hook this (given that it works in 
Windows when the Thinkpad-specific driver is installed) - I'll try to 
find a recent machine to test.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-10  9:24       ` [ltp] " Henrique de Moraes Holschuh
  2009-11-10 12:42         ` Matthew Garrett
@ 2009-11-10 13:32         ` Andrew Lutomirski
  2009-11-10 14:14           ` Matthew Garrett
  2009-11-10 17:49           ` Henrique de Moraes Holschuh
  1 sibling, 2 replies; 20+ messages in thread
From: Andrew Lutomirski @ 2009-11-10 13:32 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Matthew Garrett, linux-thinkpad, ACPI Devel Maling List

On Tue, Nov 10, 2009 at 4:24 AM, Henrique de Moraes Holschuh
<hmh@hmh.eng.br> wrote:
> On Mon, 09 Nov 2009, Matthew Garrett wrote:
>> When you hit the mixer button, does the ACPI interrupt count increase?
>> If so, we're certainly in a position to do something with it.
>
> It is supposed to go over the KDC.  But I would be _really_ interested on
> any events related to volume key presses on the X200s.  I expect it is
> issuing one of the ACPI volume notification events with OSI(Linux), and none
> without.

On brief inspection, with OSI(Linux), mute generates no ACPI
interrupts.  Without OSI(Linux), I see an ACPI interrupt only when the
mixer (the one in /proc/acpi/ibm/volume) changes as a result of
muting.  So pushing mute once generates an interrupt, but then there
are no more interrupts until I push volume up.

>
>> But it does nothing to solve the underlying issue, and then we get to
>> apply the same patch again for the next Thinkpad product cycle. If we
>> fix it properly, we don't need to bother.
>
> If I get a full description of behaviour, etc.  I can simply ask Lenovo
> about it.
>
> AFAIK, the native volume control through windows is being done in a
> different way, nowadays.  I'd need to know, without OSI(Linux), where the
> events are going.  That'd be enough to know when to read EC 0x30 and check
> if it is now mute/unmute.

What's the point of the IBM mixer (/proc/acpi/ibm/volume)?  We have a
perfectly good mixer in the form of ALSA, which already knows how to
mute and unmute the sound and even comes with nice user interfaces
these days.

With OSI(Linux) off, pressing mute turns off the sound with no UI
response whatsoever, fiddling with the ALSA mixer (or PulseAudio, for
that matter) has no effect, and the only ways to get sound back are to
play with /proc/acpi/ibm/volume or to press a different hardware
volume key.  But pressing that different hardware volume key *also*
changes the ALSA mixer because it generates a keypress.  In my book,
that means that the mute button messes up the sound hardware.

Do we really want every thinkpad to need a special UI to indicate the
state of the extra hardware muting function?

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-10 13:32         ` Andrew Lutomirski
@ 2009-11-10 14:14           ` Matthew Garrett
  2009-11-10 17:49           ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 20+ messages in thread
From: Matthew Garrett @ 2009-11-10 14:14 UTC (permalink / raw)
  To: Andrew Lutomirski
  Cc: Henrique de Moraes Holschuh, linux-thinkpad, ACPI Devel Maling List

On Tue, Nov 10, 2009 at 08:32:17AM -0500, Andrew Lutomirski wrote:

> What's the point of the IBM mixer (/proc/acpi/ibm/volume)?  We have a
> perfectly good mixer in the form of ALSA, which already knows how to
> mute and unmute the sound and even comes with nice user interfaces
> these days.

I posted a patch a while back that adds ALSA mixer support to the 
Thinkpad driver.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-10 13:32         ` Andrew Lutomirski
  2009-11-10 14:14           ` Matthew Garrett
@ 2009-11-10 17:49           ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 20+ messages in thread
From: Henrique de Moraes Holschuh @ 2009-11-10 17:49 UTC (permalink / raw)
  To: Andrew Lutomirski; +Cc: Matthew Garrett, linux-thinkpad, ACPI Devel Maling List

On Tue, 10 Nov 2009, Andrew Lutomirski wrote:
> On Tue, Nov 10, 2009 at 4:24 AM, Henrique de Moraes Holschuh
> <hmh@hmh.eng.br> wrote:
> > On Mon, 09 Nov 2009, Matthew Garrett wrote:
> >> When you hit the mixer button, does the ACPI interrupt count increase?
> >> If so, we're certainly in a position to do something with it.
> >
> > It is supposed to go over the KDC.  But I would be _really_ interested on
> > any events related to volume key presses on the X200s.  I expect it is
> > issuing one of the ACPI volume notification events with OSI(Linux), and none
> > without.
> 
> On brief inspection, with OSI(Linux), mute generates no ACPI
> interrupts.  Without OSI(Linux), I see an ACPI interrupt only when the
> mixer (the one in /proc/acpi/ibm/volume) changes as a result of
> muting.  So pushing mute once generates an interrupt, but then there
> are no more interrupts until I push volume up.

This makes sense.  Mute is for muting, volume up/down is for unmuting and
volume control.  Likely, after the unmute happened, futher presses of
volume up/down will go through the KDC and be reported as normal key
presses.

We just need to track down where that ACPI interrupt is going, then.

> What's the point of the IBM mixer (/proc/acpi/ibm/volume)?  We have a
> perfectly good mixer in the form of ALSA, which already knows how to
> mute and unmute the sound and even comes with nice user interfaces
> these days.

I need to finish cleaning up volume, so that I will haver enough courage to
export it as an ALSA mixer.  I am working on that right now, actually, and
now that I figured out why I had this queasy feeling that caused me to never
merge ALSA support and I am in the process of fixing the code in question,
the ALSA mixer should finally get merged for real.

> volume key.  But pressing that different hardware volume key *also*
> changes the ALSA mixer because it generates a keypress.  In my book,
> that means that the mute button messes up the sound hardware.

Please test WITHOUT OSI(Linux).  When you press volume up/down to UNMUTE,
does it still send the key over the KDC as well?  It should "eat" that
keypress and not report it anywere...

> Do we really want every thinkpad to need a special UI to indicate the
> state of the extra hardware muting function?

We want an ALSA mixer, and it will happen, now that I am rewriting the
volume code into something that won't give me nightmares.  The other
difficult stuff has been taken care of already (such as decoupling firmware
events from userspace-visible events).

Just remember one thing: thinkpad-acpi is _OLD_.  It used to be called
ibm-acpi, and it has been around since 2.6.12.  It has private interfaces
for a lot of stuff because it predates the generic interfaces for quite a
bit. I don't know if we had ALSA on 2.6.12, but I do know we were not big on
ALSA or generic interfaces back then.

-- 
  "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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-09 16:47 [PATCH] Set osi=Linux for the ThinkPad X200s Andrew Lutomirski
  2009-11-09 16:54 ` Matthew Garrett
  2009-11-10  9:19 ` [ltp] " Henrique de Moraes Holschuh
@ 2009-11-25  4:50 ` Len Brown
  2009-11-25 17:30   ` Jerone Young
                     ` (2 more replies)
  2 siblings, 3 replies; 20+ messages in thread
From: Len Brown @ 2009-11-25  4:50 UTC (permalink / raw)
  To: Andrew Lutomirski, jerone.young; +Cc: linux-thinkpad, ACPI Devel Maling List

On Mon, 9 Nov 2009, Andrew Lutomirski wrote:

> The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
> button to work.  Without this patch (or the equivalent command-line
> parameter), the mute button does not generate a keystroke and,
> instead, messes up the sound hardware.
> 
> Tested on an X200s.
> 
> Signed-off-by: Andy Lutomirski <luto@mit.edu>

I just applied the analogous T400/T500 patch from
http://bugzilla.kernel.org/show_bug.cgi?id=13934

and I'd apply this one too if it were not malformed.


Jerome,
Perhaps you can post the patches from the canonical list
so we can take care of these "all at once"?

Somebody tell Lenovo (again) that they are being bad.

thanks,
-Len Brown, Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25  4:50 ` Len Brown
@ 2009-11-25 17:30   ` Jerone Young
  2009-11-25 18:24     ` Len Brown
  2009-11-25 19:01   ` Andrew Lutomirski
  2009-11-30  5:47   ` Jerone Young
  2 siblings, 1 reply; 20+ messages in thread
From: Jerone Young @ 2009-11-25 17:30 UTC (permalink / raw)
  To: Len Brown; +Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

I had a set of patches for the different thinkpad lines could test.
Couldn't verify though with Thinkpads like the T400s needed this.

Here are direct links from the archive:

https://lists.ubuntu.com/archives/kernel-team/2009-August/007065.html
https://lists.ubuntu.com/archives/kernel-team/2009-August/007068.html
https://lists.ubuntu.com/archives/kernel-team/2009-August/007064.html
https://lists.ubuntu.com/archives/kernel-team/2009-August/007066.html
https://lists.ubuntu.com/archives/kernel-team/2009-August/007067.html


			Jerone


On Tue, 2009-11-24 at 23:50 -0500, Len Brown wrote:
> On Mon, 9 Nov 2009, Andrew Lutomirski wrote:
> 
> > The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
> > button to work.  Without this patch (or the equivalent command-line
> > parameter), the mute button does not generate a keystroke and,
> > instead, messes up the sound hardware.
> > 
> > Tested on an X200s.
> > 
> > Signed-off-by: Andy Lutomirski <luto@mit.edu>
> 
> I just applied the analogous T400/T500 patch from
> http://bugzilla.kernel.org/show_bug.cgi?id=13934
> 
> and I'd apply this one too if it were not malformed.
> 
> 
> Jerome,
> Perhaps you can post the patches from the canonical list
> so we can take care of these "all at once"?
> 
> Somebody tell Lenovo (again) that they are being bad.
> 
> thanks,
> -Len Brown, Intel Open Source Technology Center
> 
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25 17:30   ` Jerone Young
@ 2009-11-25 18:24     ` Len Brown
  2009-11-25 19:56       ` Jerone Young
  2009-11-26  5:07       ` Matthew Garrett
  0 siblings, 2 replies; 20+ messages in thread
From: Len Brown @ 2009-11-25 18:24 UTC (permalink / raw)
  To: Jerone Young; +Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Wed, 25 Nov 2009, Jerone Young wrote:

> I had a set of patches for the different thinkpad lines could test.
> Couldn't verify though with Thinkpads like the T400s needed this.
> 
> Here are direct links from the archive:
> 
> https://lists.ubuntu.com/archives/kernel-team/2009-August/007065.html
> https://lists.ubuntu.com/archives/kernel-team/2009-August/007068.html
> https://lists.ubuntu.com/archives/kernel-team/2009-August/007064.html
> https://lists.ubuntu.com/archives/kernel-team/2009-August/007066.html
> https://lists.ubuntu.com/archives/kernel-team/2009-August/007067.html


Have these been verified as necessary to make sound work on
the specified models, or are these speculative patches?

I'd rather apply only patches that are verified as necessary upstream.

Also, I don't know how to apply html without editing -- so if
you can extract the patches from your tree and e-mail them
as plain text, that would be less tedious.

thanks,
-Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25  4:50 ` Len Brown
  2009-11-25 17:30   ` Jerone Young
@ 2009-11-25 19:01   ` Andrew Lutomirski
  2009-11-30  5:47   ` Jerone Young
  2 siblings, 0 replies; 20+ messages in thread
From: Andrew Lutomirski @ 2009-11-25 19:01 UTC (permalink / raw)
  To: Len Brown; +Cc: jerone.young, linux-thinkpad, ACPI Devel Maling List

[-- Attachment #1: Type: text/plain, Size: 2106 bytes --]

On Tue, Nov 24, 2009 at 11:50 PM, Len Brown <lenb@kernel.org> wrote:
> On Mon, 9 Nov 2009, Andrew Lutomirski wrote:
>
>> The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
>> button to work.  Without this patch (or the equivalent command-line
>> parameter), the mute button does not generate a keystroke and,
>> instead, messes up the sound hardware.
>>
>> Tested on an X200s.
>>
>> Signed-off-by: Andy Lutomirski <luto@mit.edu>
>
> I just applied the analogous T400/T500 patch from
> http://bugzilla.kernel.org/show_bug.cgi?id=13934
>
> and I'd apply this one too if it were not malformed.

I'll try again.  I've also attached a file containing exactly the same
thing as below (other than the '---') in case my mailer is having
problems.  I just checked that the patch still applies to Linus' tree.

--Andy

The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
button to work.  Without this patch (or the equivalent command-line
parameter), the mute button does not generate a keystroke and,
instead, messes up the sound hardware.

Tested on an X200s.

Signed-off-by: Andy Lutomirski <luto@mit.edu>

---

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index e56b2a7..ea9f88b 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -224,6 +224,7 @@ static struct dmi_system_id acpi_osi_dmi_table[]
__initdata = {
 	 * _OSI(Linux) helps sound
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"),
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"),
+	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
 	 * _OSI(Linux) has Linux specific hooks
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 	 * _OSI(Linux) is a NOP:
@@ -254,6 +255,14 @@ static struct dmi_system_id acpi_osi_dmi_table[]
__initdata = {
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 		},
 	},
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Lenovo X200s",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
+		},
+	},
 	{}
 };

[-- Attachment #2: acpi_x200s.patch --]
[-- Type: application/octet-stream, Size: 1217 bytes --]

The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
button to work.  Without this patch (or the equivalent command-line
parameter), the mute button does not generate a keystroke and,
instead, messes up the sound hardware.

Tested on an X200s.

Signed-off-by: Andy Lutomirski <luto@mit.edu>

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index e56b2a7..ea9f88b 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -224,6 +224,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 	 * _OSI(Linux) helps sound
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"),
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"),
+	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
 	 * _OSI(Linux) has Linux specific hooks
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 	 * _OSI(Linux) is a NOP:
@@ -254,6 +255,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 		},
 	},
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Lenovo X200s",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
+		},
+	},
 	{}
 };
 

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25 18:24     ` Len Brown
@ 2009-11-25 19:56       ` Jerone Young
  2009-11-26  5:07       ` Matthew Garrett
  1 sibling, 0 replies; 20+ messages in thread
From: Jerone Young @ 2009-11-25 19:56 UTC (permalink / raw)
  To: Len Brown; +Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Wed, 2009-11-25 at 13:24 -0500, Len Brown wrote:
> On Wed, 25 Nov 2009, Jerone Young wrote:
> 
> > I had a set of patches for the different thinkpad lines could test.
> > Couldn't verify though with Thinkpads like the T400s needed this.
> > 
> > Here are direct links from the archive:
> > 
> > https://lists.ubuntu.com/archives/kernel-team/2009-August/007065.html
> > https://lists.ubuntu.com/archives/kernel-team/2009-August/007068.html
> > https://lists.ubuntu.com/archives/kernel-team/2009-August/007064.html
> > https://lists.ubuntu.com/archives/kernel-team/2009-August/007066.html
> > https://lists.ubuntu.com/archives/kernel-team/2009-August/007067.html
> 
> 
> Have these been verified as necessary to make sound work on
> the specified models, or are these speculative patches?

Yes they have all been verified for the mute key to work. Actually I
missed the 0 patch that expalins everythig here:

https://lists.ubuntu.com/archives/kernel-team/2009-August/007080.html

Can find some of the verification in this LP bug:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281732


> 
> I'd rather apply only patches that are verified as necessary upstream.
> 
> Also, I don't know how to apply html without editing -- so if
> you can extract the patches from your tree and e-mail them
> as plain text, that would be less tedious.

hmm .. don't have a tree anymore. Though they where in the ubuntu kernel
tree at one point. Best to just copy and past the diffs from the links.

> 
> thanks,
> -Len Brown, Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25 18:24     ` Len Brown
  2009-11-25 19:56       ` Jerone Young
@ 2009-11-26  5:07       ` Matthew Garrett
  2009-11-26  6:00         ` Andrew Lutomirski
  2009-11-26 13:43         ` Jerone Young
  1 sibling, 2 replies; 20+ messages in thread
From: Matthew Garrett @ 2009-11-26  5:07 UTC (permalink / raw)
  To: Len Brown
  Cc: Jerone Young, Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Wed, Nov 25, 2009 at 01:24:50PM -0500, Len Brown wrote:

> Have these been verified as necessary to make sound work on
> the specified models, or are these speculative patches?

To clarify - these patches do *nothing* to make sound work. They change 
the behaviour of the mute key from changing the hardware state of the 
mixer and not sending a key event to instead sending a key event and 
requring that software perform the change. The behavioural change is 
primarily cosmetic rather than functional. I'm not convinced that this 
is a sensible thing to do at this point in the release cycle, given that 
we have no testing of what other behavioural changes the firmware may 
make.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-26  5:07       ` Matthew Garrett
@ 2009-11-26  6:00         ` Andrew Lutomirski
  2009-11-26 17:02           ` Stefan Monnier
  2009-11-26 13:43         ` Jerone Young
  1 sibling, 1 reply; 20+ messages in thread
From: Andrew Lutomirski @ 2009-11-26  6:00 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, Jerone Young, linux-thinkpad, ACPI Devel Maling List

On Thu, Nov 26, 2009 at 12:07 AM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Wed, Nov 25, 2009 at 01:24:50PM -0500, Len Brown wrote:
>
>> Have these been verified as necessary to make sound work on
>> the specified models, or are these speculative patches?
>
> To clarify - these patches do *nothing* to make sound work. They change
> the behaviour of the mute key from changing the hardware state of the
> mixer and not sending a key event to instead sending a key event and
> requring that software perform the change. The behavioural change is
> primarily cosmetic rather than functional. I'm not convinced that this
> is a sensible thing to do at this point in the release cycle, given that
> we have no testing of what other behavioural changes the firmware may
> make.

It's a functional change in the sense that the mixer is not usefully
supported right now (it's a file in /proc/acpi/ibm which is
nonstandard and which no one should reasonably be expected to know
about), it's useless (the standard HDA mixer works just fine), and
without this change the mute button breaks sound for everyone except
power users (who else is supposed to know to twiddle
/proc/acpi/ibm/volume or press "sound up" to get sound back when the
ALSA controls are already unmuted and set to maximum volume).

I'll grant that, with this change, Linux works differently from
Windows, but I'm not sure that's a good argument for leaving this
change out.  IMO in an ideal world, Lenovo would stop looking at
OSI(Linux) and would also eliminate their weird mixer interface
completely.  At least with this change we can continue ignoring the
weird mixer interface until we have proper ALSA integration.

--Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-26  5:07       ` Matthew Garrett
  2009-11-26  6:00         ` Andrew Lutomirski
@ 2009-11-26 13:43         ` Jerone Young
  1 sibling, 0 replies; 20+ messages in thread
From: Jerone Young @ 2009-11-26 13:43 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

On Thu, 2009-11-26 at 05:07 +0000, Matthew Garrett wrote:
> On Wed, Nov 25, 2009 at 01:24:50PM -0500, Len Brown wrote:
> 
> > Have these been verified as necessary to make sound work on
> > the specified models, or are these speculative patches?
> 
> To clarify - these patches do *nothing* to make sound work. They change 
> the behaviour of the mute key from changing the hardware state of the 
> mixer and not sending a key event to instead sending a key event and 
> requring that software perform the change. 

It's more then cosmetic. On my X301 .. the headphone jack will not mute
without this if you do not have osi=Linux.

	
			Jerone

> The behavioural change is 
> primarily cosmetic rather than functional. I'm not convinced that this 
> is a sensible thing to do at this point in the release cycle, given that 
> we have no testing of what other behavioural changes the firmware may 
> make.
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-26  6:00         ` Andrew Lutomirski
@ 2009-11-26 17:02           ` Stefan Monnier
  0 siblings, 0 replies; 20+ messages in thread
From: Stefan Monnier @ 2009-11-26 17:02 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-thinkpad

> without this change the mute button breaks sound for everyone except
> power users (who else is supposed to know to twiddle
> /proc/acpi/ibm/volume or press "sound up" to get sound back when the

Most/all the laptops I've seen until now behave like that: the "mute"
button never unmutes.

And as a user, after muting or changing the sound-level with
those special keys, I find that the most obvious way to undo or refine
such a change would be performed with those keys as well.


        Stefan


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] Set osi=Linux for the ThinkPad X200s
  2009-11-25  4:50 ` Len Brown
  2009-11-25 17:30   ` Jerone Young
  2009-11-25 19:01   ` Andrew Lutomirski
@ 2009-11-30  5:47   ` Jerone Young
  2 siblings, 0 replies; 20+ messages in thread
From: Jerone Young @ 2009-11-30  5:47 UTC (permalink / raw)
  To: Len Brown; +Cc: Andrew Lutomirski, linux-thinkpad, ACPI Devel Maling List

I found in the patches are in the Ubuntu karmic kernel git tree, that
should make things easier. Here are links from git web to them. You can
pull them from the tree also.

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-karmic.git;a=blob;f=drivers/acpi/blacklist.c;hb=992429cc3eb4277e07811a690cf04905bdc8b756
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-karmic.git;a=blob;f=drivers/acpi/blacklist.c;hb=4c0863e159b64424e9d02f846b23705b88785468
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-karmic.git;a=blob;f=drivers/acpi/blacklist.c;hb=b7d5194f5e19b7d91808ea8f3dc31819d22f220a
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-karmic.git;a=blob;f=drivers/acpi/blacklist.c;hb=f989a47a3f344d0a26ab96038a5221f021a2735e
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-karmic.git;a=blob;f=drivers/acpi/blacklist.c;hb=8843ac2d4fdc6f616157c1e86e4826dedfca7f60


They were reverted in the final tree since they had not made it
upstream.

				Jerone


On Tue, 2009-11-24 at 23:50 -0500, Len Brown wrote:
> On Mon, 9 Nov 2009, Andrew Lutomirski wrote:
> 
> > The ThinkPad X200s, like the X61, requires OSI=Linux for the mute
> > button to work.  Without this patch (or the equivalent command-line
> > parameter), the mute button does not generate a keystroke and,
> > instead, messes up the sound hardware.
> > 
> > Tested on an X200s.
> > 
> > Signed-off-by: Andy Lutomirski <luto@mit.edu>
> 
> I just applied the analogous T400/T500 patch from
> http://bugzilla.kernel.org/show_bug.cgi?id=13934
> 
> and I'd apply this one too if it were not malformed.
> 
> 
> Jerome,
> Perhaps you can post the patches from the canonical list
> so we can take care of these "all at once"?
> 
> Somebody tell Lenovo (again) that they are being bad.
> 
> thanks,
> -Len Brown, Intel Open Source Technology Center
> 
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-11-30  5:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09 16:47 [PATCH] Set osi=Linux for the ThinkPad X200s Andrew Lutomirski
2009-11-09 16:54 ` Matthew Garrett
2009-11-09 17:49   ` Andrew Lutomirski
2009-11-09 17:54     ` Matthew Garrett
2009-11-10  9:24       ` [ltp] " Henrique de Moraes Holschuh
2009-11-10 12:42         ` Matthew Garrett
2009-11-10 13:32         ` Andrew Lutomirski
2009-11-10 14:14           ` Matthew Garrett
2009-11-10 17:49           ` Henrique de Moraes Holschuh
2009-11-10  9:19 ` [ltp] " Henrique de Moraes Holschuh
2009-11-25  4:50 ` Len Brown
2009-11-25 17:30   ` Jerone Young
2009-11-25 18:24     ` Len Brown
2009-11-25 19:56       ` Jerone Young
2009-11-26  5:07       ` Matthew Garrett
2009-11-26  6:00         ` Andrew Lutomirski
2009-11-26 17:02           ` Stefan Monnier
2009-11-26 13:43         ` Jerone Young
2009-11-25 19:01   ` Andrew Lutomirski
2009-11-30  5:47   ` Jerone Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.