Commit b466301b authored by Frans Pop's avatar Frans Pop Committed by Matthew Garrett

toshiba-acpi: fix multimedia keys on some machines

Some Toshibas only send ACPI events on key down, not key release. Ignore
any release events and send key down and key up events on every ACPI key
down event.
Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
parent 92e00e47
...@@ -814,12 +814,15 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context) ...@@ -814,12 +814,15 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context)
if (hci_result == HCI_SUCCESS) { if (hci_result == HCI_SUCCESS) {
if (value == 0x100) if (value == 0x100)
continue; continue;
else if (value & 0x80) { /* act on key press; ignore key release */
if (value & 0x80)
continue;
key = toshiba_acpi_get_entry_by_scancode key = toshiba_acpi_get_entry_by_scancode
(value & ~0x80); (value);
if (!key) { if (!key) {
printk(MY_INFO "Unknown key %x\n", printk(MY_INFO "Unknown key %x\n",
value & ~0x80); value);
continue; continue;
} }
input_report_key(toshiba_acpi.hotkey_dev, input_report_key(toshiba_acpi.hotkey_dev,
...@@ -828,7 +831,6 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context) ...@@ -828,7 +831,6 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context)
input_report_key(toshiba_acpi.hotkey_dev, input_report_key(toshiba_acpi.hotkey_dev,
key->keycode, 0); key->keycode, 0);
input_sync(toshiba_acpi.hotkey_dev); input_sync(toshiba_acpi.hotkey_dev);
}
} else if (hci_result == HCI_NOT_SUPPORTED) { } else if (hci_result == HCI_NOT_SUPPORTED) {
/* This is a workaround for an unresolved issue on /* This is a workaround for an unresolved issue on
* some machines where system events sporadically * some machines where system events sporadically
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment