[ltp] Re: [PATCH] Set osi=Linux for the ThinkPad X200s

Andrew Lutomirski linux-thinkpad@linux-thinkpad.org
Wed, 25 Nov 2009 14:01:36 -0500


--001517448474198d13047936b0c2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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=3DLinux for the mute
>> button to work. =A0Without 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=3D13934
>
> 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=3DLinux 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 =3D {
 	 * _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 =3D {
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 		},
 	},
+	{
+	.callback =3D dmi_enable_osi_linux,
+	.ident =3D "Lenovo X200s",
+	.matches =3D {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X200s"),
+		},
+	},
 	{}
 };

--001517448474198d13047936b0c2
Content-Type: application/octet-stream; name="acpi_x200s.patch"
Content-Disposition: attachment; filename="acpi_x200s.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g2ggjkwm0

VGhlIFRoaW5rUGFkIFgyMDBzLCBsaWtlIHRoZSBYNjEsIHJlcXVpcmVzIE9TST1MaW51eCBmb3Ig
dGhlIG11dGUKYnV0dG9uIHRvIHdvcmsuICBXaXRob3V0IHRoaXMgcGF0Y2ggKG9yIHRoZSBlcXVp
dmFsZW50IGNvbW1hbmQtbGluZQpwYXJhbWV0ZXIpLCB0aGUgbXV0ZSBidXR0b24gZG9lcyBub3Qg
Z2VuZXJhdGUgYSBrZXlzdHJva2UgYW5kLAppbnN0ZWFkLCBtZXNzZXMgdXAgdGhlIHNvdW5kIGhh
cmR3YXJlLgoKVGVzdGVkIG9uIGFuIFgyMDBzLgoKU2lnbmVkLW9mZi1ieTogQW5keSBMdXRvbWly
c2tpIDxsdXRvQG1pdC5lZHU+CgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2JsYWNrbGlzdC5j
IGIvZHJpdmVycy9hY3BpL2JsYWNrbGlzdC5jCmluZGV4IGU1NmIyYTcuLmVhOWY4OGIgMTAwNjQ0
Ci0tLSBhL2RyaXZlcnMvYWNwaS9ibGFja2xpc3QuYworKysgYi9kcml2ZXJzL2FjcGkvYmxhY2ts
aXN0LmMKQEAgLTIyNCw2ICsyMjQsNyBAQCBzdGF0aWMgc3RydWN0IGRtaV9zeXN0ZW1faWQgYWNw
aV9vc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