xref: /OK3568_Linux_fs/kernel/Documentation/userspace-api/media/rc/lirc-get-rec-resolution.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2*4882a593Smuzhiyun.. c:namespace:: RC
3*4882a593Smuzhiyun
4*4882a593Smuzhiyun.. _lirc_get_rec_resolution:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun*****************************
7*4882a593Smuzhiyunioctl LIRC_GET_REC_RESOLUTION
8*4882a593Smuzhiyun*****************************
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunName
11*4882a593Smuzhiyun====
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunLIRC_GET_REC_RESOLUTION - Obtain the value of receive resolution, in microseconds.
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSynopsis
16*4882a593Smuzhiyun========
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun.. c:macro:: LIRC_GET_REC_RESOLUTION
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun``int ioctl(int fd, LIRC_GET_REC_RESOLUTION, __u32 *microseconds)``
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunArguments
23*4882a593Smuzhiyun=========
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun``fd``
26*4882a593Smuzhiyun    File descriptor returned by open().
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun``microseconds``
29*4882a593Smuzhiyun    Resolution, in microseconds.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunDescription
32*4882a593Smuzhiyun===========
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunSome receivers have maximum resolution which is defined by internal
35*4882a593Smuzhiyunsample rate or data format limitations. E.g. it's common that
36*4882a593Smuzhiyunsignals can only be reported in 50 microsecond steps.
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunThis ioctl returns the integer value with such resolution, with can be
39*4882a593Smuzhiyunused by userspace applications like lircd to automatically adjust the
40*4882a593Smuzhiyuntolerance value.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunReturn Value
43*4882a593Smuzhiyun============
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunOn success 0 is returned, on error -1 and the ``errno`` variable is set
46*4882a593Smuzhiyunappropriately. The generic error codes are described at the
47*4882a593Smuzhiyun:ref:`Generic Error Codes <gen-errors>` chapter.
48