diff options
Diffstat (limited to 'Documentation/laptops/thinkpad-acpi.txt')
-rw-r--r-- | Documentation/laptops/thinkpad-acpi.txt | 160 |
1 files changed, 108 insertions, 52 deletions
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index aafcaa634191..75afa1229fd7 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.23 | 3 | Version 0.24 |
4 | April 10th, 2009 | 4 | December 11th, 2009 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -460,6 +460,8 @@ event code Key Notes | |||
460 | For Lenovo ThinkPads with a new | 460 | For Lenovo ThinkPads with a new |
461 | BIOS, it has to be handled either | 461 | BIOS, it has to be handled either |
462 | by the ACPI OSI, or by userspace. | 462 | by the ACPI OSI, or by userspace. |
463 | The driver does the right thing, | ||
464 | never mess with this. | ||
463 | 0x1011 0x10 FN+END Brightness down. See brightness | 465 | 0x1011 0x10 FN+END Brightness down. See brightness |
464 | up for details. | 466 | up for details. |
465 | 467 | ||
@@ -582,46 +584,15 @@ with hotkey_report_mode. | |||
582 | 584 | ||
583 | Brightness hotkey notes: | 585 | Brightness hotkey notes: |
584 | 586 | ||
585 | These are the current sane choices for brightness key mapping in | 587 | Don't mess with the brightness hotkeys in a Thinkpad. If you want |
586 | thinkpad-acpi: | 588 | notifications for OSD, use the sysfs backlight class event support. |
587 | 589 | ||
588 | For IBM and Lenovo models *without* ACPI backlight control (the ones on | 590 | The driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events |
589 | which thinkpad-acpi will autoload its backlight interface by default, | 591 | automatically for the cases were userspace has to do something to |
590 | and on which ACPI video does not export a backlight interface): | 592 | implement brightness changes. When you override these events, you will |
591 | 593 | either fail to handle properly the ThinkPads that require explicit | |
592 | 1. Don't enable or map the brightness hotkeys in thinkpad-acpi, as | 594 | action to change backlight brightness, or the ThinkPads that require |
593 | these older firmware versions unfortunately won't respect the hotkey | 595 | that no action be taken to work properly. |
594 | mask for brightness keys anyway, and always reacts to them. This | ||
595 | usually work fine, unless X.org drivers are doing something to block | ||
596 | the BIOS. In that case, use (3) below. This is the default mode of | ||
597 | operation. | ||
598 | |||
599 | 2. Enable the hotkeys, but map them to something else that is NOT | ||
600 | KEY_BRIGHTNESS_UP/DOWN or any other keycode that would cause | ||
601 | userspace to try to change the backlight level, and use that as an | ||
602 | on-screen-display hint. | ||
603 | |||
604 | 3. IF AND ONLY IF X.org drivers find a way to block the firmware from | ||
605 | automatically changing the brightness, enable the hotkeys and map | ||
606 | them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN, and feed that to | ||
607 | something that calls xbacklight. thinkpad-acpi will not be able to | ||
608 | change brightness in that case either, so you should disable its | ||
609 | backlight interface. | ||
610 | |||
611 | For Lenovo models *with* ACPI backlight control: | ||
612 | |||
613 | 1. Load up ACPI video and use that. ACPI video will report ACPI | ||
614 | events for brightness change keys. Do not mess with thinkpad-acpi | ||
615 | defaults in this case. thinkpad-acpi should not have anything to do | ||
616 | with backlight events in a scenario where ACPI video is loaded: | ||
617 | brightness hotkeys must be disabled, and the backlight interface is | ||
618 | to be kept disabled as well. This is the default mode of operation. | ||
619 | |||
620 | 2. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, | ||
621 | and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process | ||
622 | these keys on userspace somehow (e.g. by calling xbacklight). | ||
623 | The driver will do this automatically if it detects that ACPI video | ||
624 | has been disabled. | ||
625 | 596 | ||
626 | 597 | ||
627 | Bluetooth | 598 | Bluetooth |
@@ -1121,25 +1092,103 @@ WARNING: | |||
1121 | its level up and down at every change. | 1092 | its level up and down at every change. |
1122 | 1093 | ||
1123 | 1094 | ||
1124 | Volume control -- /proc/acpi/ibm/volume | 1095 | Volume control (Console Audio control) |
1125 | --------------------------------------- | 1096 | -------------------------------------- |
1097 | |||
1098 | procfs: /proc/acpi/ibm/volume | ||
1099 | ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" | ||
1100 | |||
1101 | NOTE: by default, the volume control interface operates in read-only | ||
1102 | mode, as it is supposed to be used for on-screen-display purposes. | ||
1103 | The read/write mode can be enabled through the use of the | ||
1104 | "volume_control=1" module parameter. | ||
1105 | |||
1106 | NOTE: distros are urged to not enable volume_control by default, this | ||
1107 | should be done by the local admin only. The ThinkPad UI is for the | ||
1108 | console audio control to be done through the volume keys only, and for | ||
1109 | the desktop environment to just provide on-screen-display feedback. | ||
1110 | Software volume control should be done only in the main AC97/HDA | ||
1111 | mixer. | ||
1112 | |||
1113 | |||
1114 | About the ThinkPad Console Audio control: | ||
1115 | |||
1116 | ThinkPads have a built-in amplifier and muting circuit that drives the | ||
1117 | console headphone and speakers. This circuit is after the main AC97 | ||
1118 | or HDA mixer in the audio path, and under exclusive control of the | ||
1119 | firmware. | ||
1120 | |||
1121 | ThinkPads have three special hotkeys to interact with the console | ||
1122 | audio control: volume up, volume down and mute. | ||
1123 | |||
1124 | It is worth noting that the normal way the mute function works (on | ||
1125 | ThinkPads that do not have a "mute LED") is: | ||
1126 | 1126 | ||
1127 | This feature allows volume control on ThinkPad models which don't have | 1127 | 1. Press mute to mute. It will *always* mute, you can press it as |
1128 | a hardware volume knob. The available commands are: | 1128 | many times as you want, and the sound will remain mute. |
1129 | |||
1130 | 2. Press either volume key to unmute the ThinkPad (it will _not_ | ||
1131 | change the volume, it will just unmute). | ||
1132 | |||
1133 | This is a very superior design when compared to the cheap software-only | ||
1134 | mute-toggle solution found on normal consumer laptops: you can be | ||
1135 | absolutely sure the ThinkPad will not make noise if you press the mute | ||
1136 | button, no matter the previous state. | ||
1137 | |||
1138 | The IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain | ||
1139 | amplifiers driving the speakers and headphone output, and the firmware | ||
1140 | also handles volume control for the headphone and speakers on these | ||
1141 | ThinkPads without any help from the operating system (this volume | ||
1142 | control stage exists after the main AC97 or HDA mixer in the audio | ||
1143 | path). | ||
1144 | |||
1145 | The newer Lenovo models only have firmware mute control, and depend on | ||
1146 | the main HDA mixer to do volume control (which is done by the operating | ||
1147 | system). In this case, the volume keys are filtered out for unmute | ||
1148 | key press (there are some firmware bugs in this area) and delivered as | ||
1149 | normal key presses to the operating system (thinkpad-acpi is not | ||
1150 | involved). | ||
1151 | |||
1152 | |||
1153 | The ThinkPad-ACPI volume control: | ||
1154 | |||
1155 | The preferred way to interact with the Console Audio control is the | ||
1156 | ALSA interface. | ||
1157 | |||
1158 | The legacy procfs interface allows one to read the current state, | ||
1159 | and if volume control is enabled, accepts the following commands: | ||
1129 | 1160 | ||
1130 | echo up >/proc/acpi/ibm/volume | 1161 | echo up >/proc/acpi/ibm/volume |
1131 | echo down >/proc/acpi/ibm/volume | 1162 | echo down >/proc/acpi/ibm/volume |
1132 | echo mute >/proc/acpi/ibm/volume | 1163 | echo mute >/proc/acpi/ibm/volume |
1164 | echo unmute >/proc/acpi/ibm/volume | ||
1133 | echo 'level <level>' >/proc/acpi/ibm/volume | 1165 | echo 'level <level>' >/proc/acpi/ibm/volume |
1134 | 1166 | ||
1135 | The <level> number range is 0 to 15 although not all of them may be | 1167 | The <level> number range is 0 to 14 although not all of them may be |
1136 | distinct. The unmute the volume after the mute command, use either the | 1168 | distinct. To unmute the volume after the mute command, use either the |
1137 | up or down command (the level command will not unmute the volume). | 1169 | up or down command (the level command will not unmute the volume), or |
1138 | The current volume level and mute state is shown in the file. | 1170 | the unmute command. |
1171 | |||
1172 | You can use the volume_capabilities parameter to tell the driver | ||
1173 | whether your thinkpad has volume control or mute-only control: | ||
1174 | volume_capabilities=1 for mixers with mute and volume control, | ||
1175 | volume_capabilities=2 for mixers with only mute control. | ||
1176 | |||
1177 | If the driver misdetects the capabilities for your ThinkPad model, | ||
1178 | please report this to ibm-acpi-devel@lists.sourceforge.net, so that we | ||
1179 | can update the driver. | ||
1180 | |||
1181 | There are two strategies for volume control. To select which one | ||
1182 | should be used, use the volume_mode module parameter: volume_mode=1 | ||
1183 | selects EC mode, and volume_mode=3 selects EC mode with NVRAM backing | ||
1184 | (so that volume/mute changes are remembered across shutdown/reboot). | ||
1139 | 1185 | ||
1140 | The ALSA mixer interface to this feature is still missing, but patches | 1186 | The driver will operate in volume_mode=3 by default. If that does not |
1141 | to add it exist. That problem should be addressed in the not so | 1187 | work well on your ThinkPad model, please report this to |
1142 | distant future. | 1188 | ibm-acpi-devel@lists.sourceforge.net. |
1189 | |||
1190 | The driver supports the standard ALSA module parameters. If the ALSA | ||
1191 | mixer is disabled, the driver will disable all volume functionality. | ||
1143 | 1192 | ||
1144 | 1193 | ||
1145 | Fan control and monitoring: fan speed, fan enable/disable | 1194 | Fan control and monitoring: fan speed, fan enable/disable |
@@ -1405,6 +1454,7 @@ to enable more than one output class, just add their values. | |||
1405 | 0x0008 HKEY event interface, hotkeys | 1454 | 0x0008 HKEY event interface, hotkeys |
1406 | 0x0010 Fan control | 1455 | 0x0010 Fan control |
1407 | 0x0020 Backlight brightness | 1456 | 0x0020 Backlight brightness |
1457 | 0x0040 Audio mixer/volume control | ||
1408 | 1458 | ||
1409 | There is also a kernel build option to enable more debugging | 1459 | There is also a kernel build option to enable more debugging |
1410 | information, which may be necessary to debug driver problems. | 1460 | information, which may be necessary to debug driver problems. |
@@ -1465,3 +1515,9 @@ Sysfs interface changelog: | |||
1465 | and it is always able to disable hot keys. Very old | 1515 | and it is always able to disable hot keys. Very old |
1466 | thinkpads are properly supported. hotkey_bios_mask | 1516 | thinkpads are properly supported. hotkey_bios_mask |
1467 | is deprecated and marked for removal. | 1517 | is deprecated and marked for removal. |
1518 | |||
1519 | 0x020600: Marker for backlight change event support. | ||
1520 | |||
1521 | 0x020700: Support for mute-only mixers. | ||
1522 | Volume control in read-only mode by default. | ||
1523 | Marker for ALSA mixer support. | ||