요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Module option
sonypi.rst:47-114minor·camera·fnkeyinit·verbose·compat·mask·useinput option을 정리합니다.
Module 사용
sonypi.rst:115-127modprobe alias와 `/dev/sonypi` device node 생성을 안내합니다.
Bug와 위험
sonypi.rst:128-158Fn key, 성능, backlight 제한과 영구 손상 가능성을 경고합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==================================================
Sony Programmable I/O Control Device Driver Readme
==================================================
- Copyright (C) 2001-2004 Stelian Pop <[email protected]>
- Copyright (C) 2001-2002 Alcôve <www.alcove.com>
- Copyright (C) 2001 Michael Ashley <[email protected]>
- Copyright (C) 2001 Junichi Morita <[email protected]>
- Copyright (C) 2000 Takaya Kinjo <[email protected]>
- Copyright (C) 2000 Andrew Tridgell <[email protected]>
This driver enables access to the Sony Programmable I/O Control Device which
can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be
limited to new FX series laptops, at least the FX501 and the FX702) lack a
sonypi device and are not supported at all by this driver.
It will give access (through a user space utility) to some events those laptops
generate, like:
- jogdial events (the small wheel on the side of Vaios)
- capture button events (only on Vaio Picturebook series)
- Fn keys
- bluetooth button (only on C1VR model)
- programmable keys, back, help, zoom, thumbphrase buttons, etc.
(when available)
Those events (see linux/sonypi.h) can be polled using the character device node
/dev/sonypi (major 10, minor auto allocated or specified as an option).
A simple daemon which translates the jogdial movements into mouse wheel events
can be downloaded at: <http://popies.net/sonypi/>
Another option to intercept the events is to get them directly through the
input layer.
This driver supports also some ioctl commands for setting the LCD screen
brightness and querying the batteries charge information (some more
commands may be added in the future).
This driver can also be used to set the camera controls on Picturebook series
(brightness, contrast etc), and is used by the video4linux driver for the
Motion Eye camera.
Please note that this driver was created by reverse engineering the Windows
driver and the ACPI BIOS, because Sony doesn't agree to release any programming
specs for its laptops. If someone convinces them to do so, drop me a note.
Driver options:
---------------
Several options can be passed to the sonypi driver using the standard
module argument syntax (<param>=<value> when passing the option to the
module or sonypi.<param>=<value> on the kernel boot line when sonypi is
statically linked into the kernel). Those options are:
=============== =======================================================
minor: minor number of the misc device /dev/sonypi,
default is -1 (automatic allocation, see /proc/misc
or kernel logs)
camera: if you have a PictureBook series Vaio (with the
integrated MotionEye camera), set this parameter to 1
in order to let the driver access to the camera
fnkeyinit: on some Vaios (C1VE, C1VR etc), the Fn key events don't
get enabled unless you set this parameter to 1.
Do not use this option unless it's actually necessary,
some Vaio models don't deal well with this option.
This option is available only if the kernel is
compiled without ACPI support (since it conflicts
with it and it shouldn't be required anyway if
ACPI is already enabled).
verbose: set to 1 to print unknown events received from the
sonypi device.
set to 2 to print all events received from the
sonypi device.
compat: uses some compatibility code for enabling the sonypi
events. If the driver worked for you in the past
(prior to version 1.5) and does not work anymore,
add this option and report to the author.
mask: event mask telling the driver what events will be
reported to the user. This parameter is required for
some Vaio models where the hardware reuses values
used in other Vaio models (like the FX series who does
not have a jogdial but reuses the jogdial events for
programmable keys events). The default event mask is
set to 0xffffffff, meaning that all possible events
will be tried. You can use the following bits to
construct your own event mask (from
drivers/char/sonypi.h)::
SONYPI_JOGGER_MASK 0x0001
SONYPI_CAPTURE_MASK 0x0002
SONYPI_FNKEY_MASK 0x0004
SONYPI_BLUETOOTH_MASK 0x0008
SONYPI_PKEY_MASK 0x0010
SONYPI_BACK_MASK 0x0020
SONYPI_HELP_MASK 0x0040
SONYPI_LID_MASK 0x0080
SONYPI_ZOOM_MASK 0x0100
SONYPI_THUMBPHRASE_MASK 0x0200
SONYPI_MEYE_MASK 0x0400
SONYPI_MEMORYSTICK_MASK 0x0800
SONYPI_BATTERY_MASK 0x1000
SONYPI_WIRELESS_MASK 0x2000
useinput: if set (which is the default) two input devices are
created, one which interprets the jogdial events as
mouse events, the other one which acts like a
keyboard reporting the pressing of the special keys.
=============== =======================================================
Module use:
-----------
In order to automatically load the sonypi module on use, you can put those
lines a configuration file in /etc/modprobe.d/::
alias char-major-10-250 sonypi
options sonypi minor=250
This supposes the use of minor 250 for the sonypi device::
# mknod /dev/sonypi c 10 250
Bugs:
-----
- several users reported that this driver disables the BIOS-managed
Fn-keys which put the laptop in sleeping state, or switch the
external monitor on/off. There is no workaround yet, since this
driver disables all APM management for those keys, by enabling the
ACPI management (and the ACPI core stuff is not complete yet). If
you have one of those laptops with working Fn keys and want to
continue to use them, don't use this driver.
- some users reported that the laptop speed is lower (dhrystone
tested) when using the driver with the fnkeyinit parameter. I cannot
reproduce it on my laptop and not all users have this problem.
This happens because the fnkeyinit parameter enables the ACPI
mode (but without additional ACPI control, like processor
speed handling etc). Use ACPI instead of APM if it works on your
laptop.
- sonypi lacks the ability to distinguish between certain key
events on some models.
- some models with the nvidia card (geforce go 6200 tc) uses a
different way to adjust the backlighting of the screen. There
is a userspace utility to adjust the brightness on those models,
which can be downloaded from
https://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2
- since all development was done by reverse engineering, there is
*absolutely no guarantee* that this driver will not crash your
laptop. Permanently.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Sony Programmable I/O driver 개요
1-46Copyright: Stelian Pop, Alcôve, Michael Ashley, Junichi Morita, Takaya Kinjo, Andrew Tridgell
이 driver는 많은 Sony Vaio laptop에 있는 Sony Programmable I/O Control Device에 접근할 수 있게 합니다. FX501과 FX702를 포함한 일부 최신 FX series에는 sonypi device가 없어 전혀 지원하지 않습니다.
user-space utility를 통해 jogdial, Vaio Picturebook의 capture button, Fn key, C1VR의 Bluetooth button, programmable·back·help·zoom·thumbphrase button 등의 event에 접근할 수 있습니다.
`linux/sonypi.h`에 정의된 event는 character device `/dev/sonypi`에서 poll할 수 있습니다. major는 10이고 minor는 자동 할당하거나 option으로 지정합니다. jogdial 움직임을 mouse-wheel event로 바꾸는 단순 daemon은 다음 위치에서 받을 수 있습니다.
event를 input layer에서 직접 받는 방법도 있습니다.
driver는 LCD screen brightness 설정과 battery charge 정보 조회를 위한 ioctl command도 지원하며 향후 command가 더 추가될 수 있습니다.
Picturebook series의 camera control(brightness, contrast 등)도 설정할 수 있고 Motion Eye camera용 video4linux driver가 사용합니다.
Sony가 laptop programming specification 공개에 동의하지 않아 Windows driver와 ACPI BIOS를 reverse engineering하여 만든 driver입니다.
Driver option과 event mask
47-114표준 module argument 문법을 사용합니다. module option은 `<param>=<value>`, kernel에 static link된 경우 boot line에서 `sonypi.<param>=<value>`를 사용합니다.
| option | 설명 |
|---|---|
| minor | `/dev/sonypi` misc device의 minor 번호입니다. 기본값 `-1`은 자동 할당이며 `/proc/misc` 또는 kernel log에서 확인합니다. |
| camera | integrated MotionEye camera가 있는 PictureBook series라면 `1`로 설정하여 driver가 camera에 접근하게 합니다. |
| fnkeyinit | C1VE·C1VR 등에서 Fn-key event가 enable되지 않을 때 `1`로 설정합니다. 필요한 경우에만 사용하십시오. 일부 Vaio는 이 option을 잘 처리하지 못하며 ACPI와 충돌하므로 ACPI 없이 빌드한 kernel에서만 제공합니다. |
| verbose | `1`은 받은 unknown event를, `2`는 받은 모든 event를 출력합니다. |
| compat | sonypi event enable용 compatibility code를 사용합니다. version 1.5 전에는 동작했지만 지금 동작하지 않을 때 추가하고 작성자에게 보고합니다. |
| mask | user에게 보고할 event mask입니다. 기본값 `0xffffffff`는 가능한 모든 event를 시도합니다. |
| useinput | 기본적으로 enable됩니다. jogdial을 mouse event로 해석하는 input device와 특수 key를 keyboard처럼 보고하는 input device를 만듭니다. |
`drivers/char/sonypi.h`에 있는 event-mask bit는 다음과 같습니다.
| symbol | value |
|---|---|
| SONYPI_JOGGER_MASK | 0x0001 |
| SONYPI_CAPTURE_MASK | 0x0002 |
| SONYPI_FNKEY_MASK | 0x0004 |
| SONYPI_BLUETOOTH_MASK | 0x0008 |
| SONYPI_PKEY_MASK | 0x0010 |
| SONYPI_BACK_MASK | 0x0020 |
| SONYPI_HELP_MASK | 0x0040 |
| SONYPI_LID_MASK | 0x0080 |
| SONYPI_ZOOM_MASK | 0x0100 |
| SONYPI_THUMBPHRASE_MASK | 0x0200 |
| SONYPI_MEYE_MASK | 0x0400 |
| SONYPI_MEMORYSTICK_MASK | 0x0800 |
| SONYPI_BATTERY_MASK | 0x1000 |
| SONYPI_WIRELESS_MASK | 0x2000 |
Module 자동 load와 device node
115-127사용할 때 `sonypi` module을 자동 load하려면 `/etc/modprobe.d/`의 configuration file에 다음 줄을 넣을 수 있습니다.
alias char-major-10-250 sonypi
options sonypi minor=250
이는 sonypi device에 minor 250을 사용한다고 가정합니다. device node는 다음과 같이 만듭니다.
# mknod /dev/sonypi c 10 250
Bug와 위험 경고
128-158여러 사용자는 이 driver가 sleep 진입이나 external monitor on/off를 수행하는 BIOS 관리 Fn key를 disable한다고 보고했습니다. driver가 해당 key의 APM 관리를 모두 끄고 아직 불완전한 ACPI 관리를 enable하기 때문에 workaround가 없습니다. Fn key가 잘 동작하고 계속 사용해야 하는 laptop에서는 이 driver를 사용하지 마십시오.
일부 사용자는 `fnkeyinit` parameter로 driver를 사용할 때 dhrystone으로 측정한 laptop 속도가 낮아진다고 보고했습니다. 모든 사용자에게 생기지는 않으며, `fnkeyinit`이 추가 ACPI 제어 없이 ACPI mode를 enable하기 때문에 발생합니다. laptop에서 동작한다면 APM 대신 ACPI를 사용하십시오.
일부 모델에서 `sonypi`는 특정 key event를 구분할 수 없습니다.
NVIDIA GeForce Go 6200 TC card가 있는 일부 모델은 screen backlight 조정 방식이 다릅니다. 해당 모델의 brightness용 user-space utility는 다음 위치에 있습니다.
모든 개발이 reverse engineering으로 이루어졌으므로 이 driver가 laptop을 crash시키지 않는다는 보장은 전혀 없습니다. 영구적인 손상도 가능합니다.
Device와 event
sonypi.rst:1-46character device, input event, camera·battery ioctl과 reverse engineering 배경입니다.