요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. include:: <isonum.txt>
=========================
N-Trig touchscreen Driver
=========================
:Copyright: |copy| 2008-2010 Rafi Rubin <rafi@seas.upenn.edu>
:Copyright: |copy| 2009-2010 Stephane Chatty
This driver provides support for N-Trig pen and multi-touch sensors. Single
and multi-touch events are translated to the appropriate protocols for
the hid and input systems. Pen events are sufficiently hid compliant and
are left to the hid core. The driver also provides additional filtering
and utility functions accessible with sysfs and module parameters.
This driver has been reported to work properly with multiple N-Trig devices
attached.
Parameters
----------
Note: values set at load time are global and will apply to all applicable
devices. Adjusting parameters with sysfs will override the load time values,
but only for that one device.
The following parameters are used to configure filters to reduce noise:
+-----------------------+-----------------------------------------------------+
|activate_slack |number of fingers to ignore before processing events |
+-----------------------+-----------------------------------------------------+
|activation_height, |size threshold to activate immediately |
|activation_width | |
+-----------------------+-----------------------------------------------------+
|min_height, |size threshold below which fingers are ignored |
|min_width |both to decide activation and during activity |
+-----------------------+-----------------------------------------------------+
|deactivate_slack |the number of "no contact" frames to ignore before |
| |propagating the end of activity events |
+-----------------------+-----------------------------------------------------+
When the last finger is removed from the device, it sends a number of empty
frames. By holding off on deactivation for a few frames we can tolerate false
erroneous disconnects, where the sensor may mistakenly not detect a finger that
is still present. Thus deactivate_slack addresses problems where a users might
see breaks in lines during drawing, or drop an object during a long drag.
Additional sysfs items
----------------------
These nodes just provide easy access to the ranges reported by the device.
+-----------------------+-----------------------------------------------------+
|sensor_logical_height, | the range for positions reported during activity |
|sensor_logical_width | |
+-----------------------+-----------------------------------------------------+
|sensor_physical_height,| internal ranges not used for normal events but |
|sensor_physical_width | useful for tuning |
+-----------------------+-----------------------------------------------------+
All N-Trig devices with product id of 1 report events in the ranges of
* X: 0-9600
* Y: 0-7200
However not all of these devices have the same physical dimensions. Most
seem to be 12" sensors (Dell Latitude XT and XT2 and the HP TX2), and
at least one model (Dell Studio 17) has a 17" sensor. The ratio of physical
to logical sizes is used to adjust the size based filter parameters.
Filtering
---------
With the release of the early multi-touch firmwares it became increasingly
obvious that these sensors were prone to erroneous events. Users reported
seeing both inappropriately dropped contact and ghosts, contacts reported
where no finger was actually touching the screen.
Deactivation slack helps prevent dropped contact for single touch use, but does
not address the problem of dropping one of more contacts while other contacts
are still active. Drops in the multi-touch context require additional
processing and should be handled in tandem with tacking.
As observed ghost contacts are similar to actual use of the sensor, but they
seem to have different profiles. Ghost activity typically shows up as small
short lived touches. As such, I assume that the longer the continuous stream
of events the more likely those events are from a real contact, and that the
larger the size of each contact the more likely it is real. Balancing the
goals of preventing ghosts and accepting real events quickly (to minimize
user observable latency), the filter accumulates confidence for incoming
events until it hits thresholds and begins propagating. In the interest in
minimizing stored state as well as the cost of operations to make a decision,
I've kept that decision simple.
Time is measured in terms of the number of fingers reported, not frames since
the probability of multiple simultaneous ghosts is expected to drop off
dramatically with increasing numbers. Rather than accumulate weight as a
function of size, I just use it as a binary threshold. A sufficiently large
contact immediately overrides the waiting period and leads to activation.
Setting the activation size thresholds to large values will result in deciding
primarily on activation slack. If you see longer lived ghosts, turning up the
activation slack while reducing the size thresholds may suffice to eliminate
the ghosts while keeping the screen quite responsive to firm taps.
Contacts continue to be filtered with min_height and min_width even after
the initial activation filter is satisfied. The intent is to provide
a mechanism for filtering out ghosts in the form of an extra finger while
you actually are using the screen. In practice this sort of ghost has
been far less problematic or relatively rare and I've left the defaults
set to 0 for both parameters, effectively turning off that filter.
I don't know what the optimal values are for these filters. If the defaults
don't work for you, please play with the parameters. If you do find other
values more comfortable, I would appreciate feedback.
The calibration of these devices does drift over time. If ghosts or contact
dropping worsen and interfere with the normal usage of your device, try
recalibrating it.
Calibration
-----------
The N-Trig windows tools provide calibration and testing routines. Also an
unofficial unsupported set of user space tools including a calibrator is
available at:
http://code.launchpad.net/~rafi-seas/+junk/ntrig_calib
Tracking
--------
As of yet, all tested N-Trig firmwares do not track fingers. When multiple
contacts are active they seem to be sorted primarily by Y position.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
N-Trig 펜·멀티터치 지원과 잡음 필터 매개변수
1-48N-Trig 드라이버는 펜과 멀티터치 센서를 지원합니다. 단일·다중 접촉 이벤트를 HID 및 Linux input 계층에 맞는 프로토콜로 변환하고, HID 규격을 충분히 따르는 펜 이벤트는 HID 코어가 그대로 처리하게 둡니다. 드라이버는 sysfs와 모듈 매개변수로 접근하는 추가 필터와 유틸리티도 제공합니다.
여러 N-Trig 장치를 동시에 연결한 구성도 정상 동작한 것으로 보고됐습니다. 모듈 로드 시 설정한 값은 모든 해당 장치에 전역 적용되지만, sysfs에서 바꾸면 그 장치에 대해서만 로드 시 값을 덮어씁니다.
접촉 활성화와 해제를 안정화하는 설정입니다.
마지막 손가락을 떼면 장치는 여러 빈 프레임을 보냅니다. 드라이버가 비활성화를 몇 프레임 늦추면, 아직 닿아 있는 손가락을 센서가 순간적으로 놓치는 잘못된 단절을 견딜 수 있습니다. `deactivate_slack`은 그리기 선이 중간에 끊기거나 긴 드래그에서 객체를 놓치는 문제를 줄입니다.
로드 시 전역값과 장치별 sysfs 덮어쓰기를 포함한 처리 순서입니다.
.. include:: <isonum.txt>
=========================
N-Trig touchscreen Driver
=========================
:Copyright: |copy| 2008-2010 Rafi Rubin <rafi@seas.upenn.edu>
:Copyright: |copy| 2009-2010 Stephane Chatty
This driver provides support for N-Trig pen and multi-touch sensors. Single
and multi-touch events are translated to the appropriate protocols for
the hid and input systems. Pen events are sufficiently hid compliant and
are left to the hid core. The driver also provides additional filtering
and utility functions accessible with sysfs and module parameters.
This driver has been reported to work properly with multiple N-Trig devices
attached.
Parameters
----------
Note: values set at load time are global and will apply to all applicable
devices. Adjusting parameters with sysfs will override the load time values,
but only for that one device.
The following parameters are used to configure filters to reduce noise:
+-----------------------+-----------------------------------------------------+
|activate_slack |number of fingers to ignore before processing events |
+-----------------------+-----------------------------------------------------+
|activation_height, |size threshold to activate immediately |
|activation_width | |
+-----------------------+-----------------------------------------------------+
|min_height, |size threshold below which fingers are ignored |
|min_width |both to decide activation and during activity |
+-----------------------+-----------------------------------------------------+
|deactivate_slack |the number of "no contact" frames to ignore before |
| |propagating the end of activity events |
+-----------------------+-----------------------------------------------------+
When the last finger is removed from the device, it sends a number of empty
frames. By holding off on deactivation for a few frames we can tolerate false
erroneous disconnects, where the sensor may mistakenly not detect a finger that
is still present. Thus deactivate_slack addresses problems where a users might
see breaks in lines during drawing, or drop an object during a long drag.
논리·물리 센서 범위와 크기 보정
49-72추가 sysfs 노드는 장치가 보고한 좌표 범위에 쉽게 접근하게 합니다. 논리 범위는 정상 입력 이벤트의 위치 범위이고, 물리 범위는 정상 이벤트에 직접 쓰이지 않지만 크기 기반 필터를 조정하는 데 유용합니다.
논리 좌표와 내부 물리 치수의 용도를 구분합니다.
같은 논리 좌표를 쓰지만 실제 화면 크기가 다른 장치들입니다.
Product ID 1인 모든 N-Trig 장치는 X 0~9600, Y 0~7200을 보고하지만 실제 센서 크기는 같지 않습니다. 드라이버는 물리 크기와 논리 크기의 비율을 사용해 접촉 크기 기반 필터 매개변수를 보정합니다.
같은 논리 좌표계를 서로 다른 실제 패널에 적용하는 방식입니다.
Additional sysfs items
----------------------
These nodes just provide easy access to the ranges reported by the device.
+-----------------------+-----------------------------------------------------+
|sensor_logical_height, | the range for positions reported during activity |
|sensor_logical_width | |
+-----------------------+-----------------------------------------------------+
|sensor_physical_height,| internal ranges not used for normal events but |
|sensor_physical_width | useful for tuning |
+-----------------------+-----------------------------------------------------+
All N-Trig devices with product id of 1 report events in the ranges of
* X: 0-9600
* Y: 0-7200
However not all of these devices have the same physical dimensions. Most
seem to be 12" sensors (Dell Latitude XT and XT2 and the HP TX2), and
at least one model (Dell Studio 17) has a 17" sensor. The ratio of physical
to logical sizes is used to adjust the size based filter parameters.
Ghost 접촉 억제와 신뢰도 누적
73-123초기 멀티터치 펌웨어는 실제 손가락을 놓치는 dropped contact와 손가락이 없는데 접촉을 보고하는 ghost event에 취약했습니다. `deactivate_slack`은 단일 접촉의 단절에는 도움이 되지만 다른 접촉이 유지되는 동안 한 접촉만 사라지는 멀티터치 문제는 해결하지 못합니다. 이런 단절은 추적과 함께 추가 처리해야 합니다.
관찰된 ghost는 실제 접촉과 비슷하지만 대개 크기가 작고 수명이 짧습니다. 필터는 연속 이벤트가 길수록, 접촉 크기가 클수록 실제일 가능성이 높다고 보고 신뢰도를 누적합니다. 신뢰도가 임계값에 도달하면 이벤트 전파를 시작해 ghost 억제와 사용자 체감 지연 사이를 절충합니다.
시간과 크기 신호가 실제 접촉 판정에 쓰이는 방식입니다.
동시 ghost가 여러 개 생길 확률은 손가락 수가 늘수록 급격히 줄 것으로 예상하므로 시간은 프레임 수가 아니라 보고된 손가락 수로 측정합니다. 크기는 함수형 가중치 대신 단순 임계값이며, 충분히 큰 접촉은 `activate_slack` 대기를 건너뜁니다.
크기 임계값을 크게 설정하면 주로 `activate_slack`으로 판단합니다. 오래 지속되는 ghost가 보이면 `activate_slack`을 늘리고 크기 임계값을 낮춰, 단단한 탭에는 빠르게 반응하면서 ghost를 줄일 수 있습니다. 활성 뒤의 `min_height`·`min_width`는 실제 사용 중 추가 손가락처럼 나타나는 ghost를 거르지만 기본값은 둘 다 0이라 사실상 꺼져 있습니다.
최적값은 장치와 사용자에 따라 정해져 있지 않습니다. 기본값이 맞지 않으면 조정하고 결과를 피드백하는 것이 권장됩니다. 장치 보정은 시간이 지나며 변하므로 ghost나 접촉 누락이 심해지면 필터만 조정하기 전에 재보정을 시도해야 합니다.
새 접촉을 즉시 전달하지 않고 실제 가능성을 확인하는 흐름입니다.
Filtering
---------
With the release of the early multi-touch firmwares it became increasingly
obvious that these sensors were prone to erroneous events. Users reported
seeing both inappropriately dropped contact and ghosts, contacts reported
where no finger was actually touching the screen.
Deactivation slack helps prevent dropped contact for single touch use, but does
not address the problem of dropping one of more contacts while other contacts
are still active. Drops in the multi-touch context require additional
processing and should be handled in tandem with tacking.
As observed ghost contacts are similar to actual use of the sensor, but they
seem to have different profiles. Ghost activity typically shows up as small
short lived touches. As such, I assume that the longer the continuous stream
of events the more likely those events are from a real contact, and that the
larger the size of each contact the more likely it is real. Balancing the
goals of preventing ghosts and accepting real events quickly (to minimize
user observable latency), the filter accumulates confidence for incoming
events until it hits thresholds and begins propagating. In the interest in
minimizing stored state as well as the cost of operations to make a decision,
I've kept that decision simple.
Time is measured in terms of the number of fingers reported, not frames since
the probability of multiple simultaneous ghosts is expected to drop off
dramatically with increasing numbers. Rather than accumulate weight as a
function of size, I just use it as a binary threshold. A sufficiently large
contact immediately overrides the waiting period and leads to activation.
Setting the activation size thresholds to large values will result in deciding
primarily on activation slack. If you see longer lived ghosts, turning up the
activation slack while reducing the size thresholds may suffice to eliminate
the ghosts while keeping the screen quite responsive to firm taps.
Contacts continue to be filtered with min_height and min_width even after
the initial activation filter is satisfied. The intent is to provide
a mechanism for filtering out ghosts in the form of an extra finger while
you actually are using the screen. In practice this sort of ghost has
been far less problematic or relatively rare and I've left the defaults
set to 0 for both parameters, effectively turning off that filter.
I don't know what the optimal values are for these filters. If the defaults
don't work for you, please play with the parameters. If you do find other
values more comfortable, I would appreciate feedback.
The calibration of these devices does drift over time. If ghosts or contact
dropping worsen and interfere with the normal usage of your device, try
recalibrating it.
보정 도구와 펌웨어 추적 부재
124-137N-Trig Windows 도구는 보정과 시험 기능을 제공합니다. 비공식이며 지원되지 않는 사용자 공간 도구 모음과 calibrator도 원문 Launchpad 주소에서 제공됩니다.
문서 작성 시점까지 시험한 모든 N-Trig 펌웨어는 손가락별 추적을 수행하지 않았습니다. 여러 접촉이 활성화되면 주로 Y 위치에 따라 정렬되는 것으로 보이므로, 보고 순서를 영구적인 손가락 ID로 해석해서는 안 됩니다.
장치 유지보수 수단과 멀티터치 보고의 한계입니다.
필터 조정과 보정을 구분하는 실무 순서입니다.
Calibration
-----------
The N-Trig windows tools provide calibration and testing routines. Also an
unofficial unsupported set of user space tools including a calibrator is
available at:
http://code.launchpad.net/~rafi-seas/+junk/ntrig_calib
Tracking
--------
As of yet, all tested N-Trig firmwares do not track fingers. When multiple
contacts are active they seem to be sorted primarily by Y position.
요약·해설
ntrig.rst:1-137N-Trig 드라이버는 펜은 HID 코어에 맡기고 멀티터치 접촉은 Linux input 프로토콜로 변환합니다. 초기 펌웨어의 ghost와 접촉 누락을 줄이기 위해 접촉 크기, 연속 보고량, 비활성화 유예를 장치별로 조정합니다.
필터와 센서 한계의 핵심입니다.
센서 보고가 사용자 공간 이벤트가 되는 흐름입니다.