xref: /linux/Documentation/userspace-api/media/rc/lirc-get-rec-resolution.rst (revision 5f536f4a221b831bc2fb666d4cdb0e0892e72dc4)
1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2*5f536f4aSMauro Carvalho Chehab.. c:namespace:: RC
354f38fcaSMauro Carvalho Chehab
454f38fcaSMauro Carvalho Chehab.. _lirc_get_rec_resolution:
554f38fcaSMauro Carvalho Chehab
654f38fcaSMauro Carvalho Chehab*****************************
754f38fcaSMauro Carvalho Chehabioctl LIRC_GET_REC_RESOLUTION
854f38fcaSMauro Carvalho Chehab*****************************
954f38fcaSMauro Carvalho Chehab
1054f38fcaSMauro Carvalho ChehabName
1154f38fcaSMauro Carvalho Chehab====
1254f38fcaSMauro Carvalho Chehab
1354f38fcaSMauro Carvalho ChehabLIRC_GET_REC_RESOLUTION - Obtain the value of receive resolution, in microseconds.
1454f38fcaSMauro Carvalho Chehab
1554f38fcaSMauro Carvalho ChehabSynopsis
1654f38fcaSMauro Carvalho Chehab========
1754f38fcaSMauro Carvalho Chehab
18*5f536f4aSMauro Carvalho Chehab.. c:macro:: LIRC_GET_REC_RESOLUTION
19*5f536f4aSMauro Carvalho Chehab
20*5f536f4aSMauro Carvalho Chehab``int ioctl(int fd, LIRC_GET_REC_RESOLUTION, __u32 *microseconds)``
2154f38fcaSMauro Carvalho Chehab
2254f38fcaSMauro Carvalho ChehabArguments
2354f38fcaSMauro Carvalho Chehab=========
2454f38fcaSMauro Carvalho Chehab
2554f38fcaSMauro Carvalho Chehab``fd``
2654f38fcaSMauro Carvalho Chehab    File descriptor returned by open().
2754f38fcaSMauro Carvalho Chehab
2854f38fcaSMauro Carvalho Chehab``microseconds``
2954f38fcaSMauro Carvalho Chehab    Resolution, in microseconds.
3054f38fcaSMauro Carvalho Chehab
3154f38fcaSMauro Carvalho ChehabDescription
3254f38fcaSMauro Carvalho Chehab===========
3354f38fcaSMauro Carvalho Chehab
3454f38fcaSMauro Carvalho ChehabSome receivers have maximum resolution which is defined by internal
3554f38fcaSMauro Carvalho Chehabsample rate or data format limitations. E.g. it's common that
3654f38fcaSMauro Carvalho Chehabsignals can only be reported in 50 microsecond steps.
3754f38fcaSMauro Carvalho Chehab
3854f38fcaSMauro Carvalho ChehabThis ioctl returns the integer value with such resolution, with can be
3954f38fcaSMauro Carvalho Chehabused by userspace applications like lircd to automatically adjust the
4054f38fcaSMauro Carvalho Chehabtolerance value.
4154f38fcaSMauro Carvalho Chehab
4254f38fcaSMauro Carvalho ChehabReturn Value
4354f38fcaSMauro Carvalho Chehab============
4454f38fcaSMauro Carvalho Chehab
4554f38fcaSMauro Carvalho ChehabOn success 0 is returned, on error -1 and the ``errno`` variable is set
4654f38fcaSMauro Carvalho Chehabappropriately. The generic error codes are described at the
4754f38fcaSMauro Carvalho Chehab:ref:`Generic Error Codes <gen-errors>` chapter.
48