2016-05-20 10:28:15 +00:00
|
|
|
.\" Copyright (c) 2015-2016, Alec Leamas
|
2015-12-15 07:19:10 +00:00
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public
|
|
|
|
.\" License along with this manual; if not, see
|
|
|
|
.\" <http://www.gnu.org/licenses/>.
|
|
|
|
.\" %%%LICENSE_END
|
ldd.1, localedef.1, add_key.2, chroot.2, clone.2, fork.2, futex.2, get_mempolicy.2, get_robust_list.2, getitimer.2, getpriority.2, ioctl.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, kcmp.2, kill.2, lookup_dcookie.2, mmap.2, mount.2, open.2, pciconfig_read.2, perf_event_open.2, prctl.2, process_vm_readv.2, ptrace.2, quotactl.2, recv.2, setfsgid.2, setfsuid.2, sysinfo.2, umask.2, umount.2, unshare.2, utimensat.2, wait.2, assert.3, fmax.3, fmin.3, getauxval.3, inet_pton.3, malloc_hook.3, memmem.3, mkdtemp.3, mktemp.3, printf.3, strcasecmp.3, strcat.3, strtoul.3, strxfrm.3, console_codes.4, console_ioctl.4, lirc.4, tty.4, vcs.4, charmap.5, elf.5, locale.5, proc.5, repertoiremap.5, utmp.5, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, cp1251.7, cp1252.7, credentials.7, feature_test_macros.7, iso_8859-1.7, iso_8859-15.7, iso_8859-5.7, koi8-r.7, koi8-u.7, man-pages.7, mount_namespaces.7, namespaces.7, netlink.7, pid_namespaces.7, unix.7, user_namespaces.7, utf-8.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-17 16:07:58 +00:00
|
|
|
.TH LIRC 4 2016-07-17 "Linux" "Linux Programmer's Manual"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SH NAME
|
|
|
|
lirc \- lirc devices
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.P
|
2015-12-15 11:33:02 +00:00
|
|
|
The
|
|
|
|
.B /dev/lirc*
|
|
|
|
character devices provide a low-level
|
2015-12-15 07:19:10 +00:00
|
|
|
bi-directional interface to infra-red (IR) remotes.
|
|
|
|
When receiving data, the driver works in two different modes depending
|
|
|
|
on the underlying hardware.
|
|
|
|
.P
|
|
|
|
Some hardware (typically TV-cards) decodes the IR signal internally
|
|
|
|
and just provides decoded button presses as integer values.
|
|
|
|
Drivers for this kind of hardware work in
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR LIRC_MODE_LIRCCODE
|
|
|
|
mode.
|
2015-12-15 07:19:10 +00:00
|
|
|
Such hardware usually does not support sending IR signals.
|
|
|
|
Furthermore, it usually only works with a specific remote which is
|
|
|
|
bundled with, for example, a TV-card.
|
|
|
|
.P
|
|
|
|
Other hardware provides a stream of pulse/space durations.
|
|
|
|
Such drivers work in
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR LIRC_MODE_MODE2
|
|
|
|
mode.
|
2015-12-15 07:19:10 +00:00
|
|
|
Sometimes, this kind of hardware also supports
|
|
|
|
sending IR data.
|
|
|
|
Such hardware can be used with (almost) any kind of remote.
|
|
|
|
.P
|
|
|
|
The \fBLIRC_GET_REC_MODE\fR ioctl (see below) allows probing for the
|
|
|
|
mode.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SS Reading input with the LIRC_MODE_MODE2 drivers
|
|
|
|
.P
|
|
|
|
In the \fBLIRC_MODE_MODE2 mode\fR, the data returned by
|
|
|
|
.BR read (2)
|
|
|
|
provides 32-bit values representing a space or a pulse duration, by
|
|
|
|
convention typed as
|
|
|
|
.IR lirc_t .
|
2015-12-15 11:33:02 +00:00
|
|
|
The time of the duration (microseconds) is encoded in the lower 24 bits.
|
2015-12-15 07:19:10 +00:00
|
|
|
The upper 8 bit reflects the type of package:
|
|
|
|
.TP 4
|
|
|
|
.BR LIRC_MODE2_SPACE .
|
|
|
|
Value reflects a space duration (microseconds).
|
|
|
|
.TP 4
|
|
|
|
.BR LIRC_MODE2_PULSE .
|
|
|
|
Value reflects a pulse duration (microseconds).
|
|
|
|
.TP 4
|
|
|
|
.BR LIRC_MODE2_FREQUENCY .
|
2015-12-15 11:33:02 +00:00
|
|
|
Value reflects a frequency (Hz); see the
|
2015-12-30 19:46:39 +00:00
|
|
|
.B LIRC_SET_MEASURE_CARRIER_MODE
|
2015-12-15 07:19:10 +00:00
|
|
|
ioctl.
|
|
|
|
.TP 4
|
|
|
|
.BR LIRC_MODE2_TIMEOUT .
|
2015-12-15 11:33:02 +00:00
|
|
|
The package reflects a timeout; see the
|
2015-12-15 07:19:10 +00:00
|
|
|
.B LIRC_SET_REC_TIMEOUT_REPORTS
|
|
|
|
ioctl.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SS Reading input with the
|
|
|
|
.B LIRC_MODE_LIRCCODE
|
|
|
|
drivers
|
|
|
|
.P
|
|
|
|
In the \fBLIRC_MODE_LIRCCODE\fR
|
|
|
|
mode, the data returned by
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR read (2)
|
2015-12-15 07:19:10 +00:00
|
|
|
reflects decoded button presses.
|
|
|
|
The length of each packet can be retrieved using
|
|
|
|
the \fBLIRC_GET_LENGTH\fR ioctl.
|
|
|
|
Reads must be done in blocks matching
|
|
|
|
the bit count returned by the \fBLIRC_GET_LENGTH\fR ioctl, rounded
|
|
|
|
up so it matches full bytes.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SS Sending data
|
|
|
|
.P
|
|
|
|
When sending data, only the \fBLIRC_MODE_PULSE\fR
|
|
|
|
mode is supported.
|
|
|
|
The data written to the character device using
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR write (2)
|
2015-12-15 07:19:10 +00:00
|
|
|
is a pulse/space sequence of integer values.
|
|
|
|
Pulses and spaces are only marked implicitly by their position.
|
|
|
|
The data must start and end with a pulse, thus it must always include
|
|
|
|
an odd number of samples.
|
|
|
|
The
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR write (2)
|
2015-12-15 07:19:10 +00:00
|
|
|
function blocks until the data has been transmitted by the
|
|
|
|
hardware.
|
|
|
|
If more data is provided than the hardware can send, the
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR write (2)
|
2015-12-15 07:19:10 +00:00
|
|
|
call fails with the error
|
|
|
|
.BR EINVAL
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2016-05-20 10:28:15 +00:00
|
|
|
.SH IOCTL COMMANDS
|
|
|
|
.P
|
|
|
|
The complete list of ioctl commands is maintained in the kernel
|
|
|
|
documentation, see SEE ALSO.
|
2016-05-26 21:23:25 +00:00
|
|
|
The ioctl commands presented here is a subset of the kernel
|
|
|
|
documentation.
|
2016-05-20 10:28:15 +00:00
|
|
|
.P
|
|
|
|
The LIRC device's ioctl definition is bound by the ioctl function
|
|
|
|
definition of struct file_operations, leaving us with an unsigned
|
2016-05-26 21:23:25 +00:00
|
|
|
int for the ioctl command and an unsigned long for the argument.
|
|
|
|
For the purposes of ioctl portability across 32-bit and 64-bit architectures,
|
2016-05-20 10:28:15 +00:00
|
|
|
these values are capped to their 32-bit sizes.
|
2015-12-15 07:19:10 +00:00
|
|
|
.P
|
|
|
|
.nf
|
2015-12-15 11:33:02 +00:00
|
|
|
#include <lirc/include/media/lirc.h> /* But see BUGS */
|
2015-12-15 07:19:10 +00:00
|
|
|
int ioctl(int fd, int cmd, ...);
|
|
|
|
.fi
|
|
|
|
.P
|
|
|
|
The following ioctls can be used to probe or change specific lirc
|
|
|
|
hardware settings.
|
|
|
|
Many require a third argument, usually an
|
|
|
|
.IR int .
|
|
|
|
referred to below as
|
2015-12-15 11:33:02 +00:00
|
|
|
.IR val .
|
2015-12-15 07:19:10 +00:00
|
|
|
.P
|
|
|
|
In general, each driver should have a default set of settings.
|
|
|
|
The driver implementation is expected to re-apply the default settings
|
2016-09-16 10:42:20 +00:00
|
|
|
when the device is closed by user space, so that every application
|
2015-12-15 07:19:10 +00:00
|
|
|
opening the device can rely on working with the default settings
|
|
|
|
initially.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SS Always Supported Commands
|
|
|
|
.P
|
|
|
|
\fI/dev/lirc*\fR devices always support the following commands:
|
|
|
|
.TP 4
|
|
|
|
.BR LIRC_GET_FEATURES " (\fIvoid\fP)"
|
2015-12-15 11:33:02 +00:00
|
|
|
Returns a bit mask of combined features bits; see FEATURES.
|
|
|
|
Some drivers have dynamic features which are not updated until after an
|
|
|
|
.I init()
|
|
|
|
command.
|
2016-05-20 10:28:15 +00:00
|
|
|
If a driver does not announce support of certain features, calling of
|
|
|
|
the corresponding ioctls is undefined.
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
2015-12-15 12:08:02 +00:00
|
|
|
.BR LIRC_GET_REC_MODE
|
|
|
|
Return the receive mode, which will be one of:
|
2015-12-15 07:19:10 +00:00
|
|
|
.RS 4
|
|
|
|
.TP
|
|
|
|
.BR LIRC_MODE_MODE2 " (\fIvoid\fP)"
|
2015-12-15 12:08:02 +00:00
|
|
|
The driver returns a sequence of pulse/space durations.
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
|
|
|
.BR LIRC_MODE_LIRCCODE
|
2015-12-15 12:08:02 +00:00
|
|
|
The driver returns integer values, each of which represents a decoded
|
2015-12-15 07:19:10 +00:00
|
|
|
button press.
|
|
|
|
.RE
|
|
|
|
.P
|
|
|
|
If a device returns an error code for
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR LIRC_GET_REC_MODE ,
|
2015-12-15 07:19:10 +00:00
|
|
|
it is safe to assume it is not a lirc device.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SS Optional Commands
|
|
|
|
.P
|
|
|
|
Some lirc devices support commands listed below.
|
|
|
|
Unless otherwise stated, these fail with the error \fBENOIOCTLCMD\fR
|
|
|
|
or with the error \fBENOSYS\fR if the operation
|
|
|
|
isn't supported, or with the error \fBEINVAL\fR if the operation
|
|
|
|
failed.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_MODE " (\fIint\fP)"
|
|
|
|
Set the receive mode.
|
|
|
|
.IR val
|
|
|
|
is either
|
|
|
|
.BR LIRC_MODE_LIRCCODE
|
|
|
|
or
|
|
|
|
.BR LIRC_MODE_MODE2 .
|
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_LENGTH " (\fIvoid\fP)"
|
|
|
|
Return the length of the returned codes for
|
2015-12-30 19:46:39 +00:00
|
|
|
.BR LIRC_MODE_LIRCCODE -type
|
2015-12-15 07:19:10 +00:00
|
|
|
drivers, otherwise fail with the error
|
|
|
|
.BR ENOIOCTLCMD .
|
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_SEND_MODE " (\fIvoid\fP)"
|
2015-12-15 11:33:02 +00:00
|
|
|
Return the send mode.
|
2016-01-28 07:55:22 +00:00
|
|
|
Currently, only
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_MODE_PULSE
|
|
|
|
is supported.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_SEND_MODE " (\fIint\fP)"
|
|
|
|
Set the send mode.
|
|
|
|
Currently serves no purpose since only
|
|
|
|
.BR LIRC_MODE_PULSE
|
|
|
|
is supported.
|
|
|
|
.TP
|
2016-05-20 10:28:15 +00:00
|
|
|
.BR LIRC_GET_SEND_CARRIER " (\fIvoid\fP)"
|
|
|
|
Get the modulation frequency (Hz).
|
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_SEND_CARRIER " (\fIint\fP)"
|
2015-12-15 11:33:02 +00:00
|
|
|
Set the modulation frequency.
|
|
|
|
The argument is the frequency (Hz).
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
2016-05-20 10:28:15 +00:00
|
|
|
.BR LIRC_GET_SEND_CARRIER " (\fIvoid\fP)"
|
|
|
|
Get the modulation frequency used when decoding (Hz).
|
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR SET_SEND_DUTY_CYCLE " (\fIint\fP)"
|
|
|
|
Set the carrier duty cycle.
|
2015-12-15 11:33:02 +00:00
|
|
|
.I val
|
|
|
|
is a number in the range [0,100] which
|
|
|
|
describes the pulse width as a percentage of the total cycle.
|
2015-12-15 07:19:10 +00:00
|
|
|
Currently, no special meaning is defined for 0 or 100, but the values
|
|
|
|
are reserved for future use.
|
2016-05-20 10:28:15 +00:00
|
|
|
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_MIN_TIMEOUT " (\fIvoid\fP)", " "\
|
|
|
|
LIRC_GET_MAX_TIMEOUT " (\fIvoid\fP)"
|
|
|
|
Some devices have internal timers that can be used to detect when
|
|
|
|
there's no IR activity for a long time.
|
|
|
|
This can help
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR lircd (8)
|
2015-12-15 07:19:10 +00:00
|
|
|
in detecting that an IR signal is finished and can speed up the
|
|
|
|
decoding process.
|
2015-12-15 11:33:02 +00:00
|
|
|
These operations
|
|
|
|
return integer values with the minimum/maximum timeout that can be
|
2015-12-15 07:19:10 +00:00
|
|
|
set (microseconds).
|
2015-12-15 11:33:02 +00:00
|
|
|
Some devices have a fixed timeout.
|
|
|
|
For such drivers,
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_GET_MIN_TIMEOUT
|
|
|
|
and
|
|
|
|
.BR LIRC_GET_MAX_TIMEOUT
|
|
|
|
will return the same value.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_TIMEOUT " (\fIint\fP)"
|
2015-12-15 12:08:02 +00:00
|
|
|
Set the integer value for IR inactivity timeout (microseconds).
|
2015-12-15 07:19:10 +00:00
|
|
|
To be accepted, the value must be within the limits defined by
|
|
|
|
.BR LIRC_GET_MIN_TIMEOUT
|
|
|
|
and
|
|
|
|
.BR LIRC_GET_MAX_TIMEOUT .
|
|
|
|
A value of 0 (if supported by the hardware) disables all hardware
|
|
|
|
timeouts and data should be reported as soon as possible.
|
|
|
|
If the exact value cannot be set, then the next possible value
|
|
|
|
.I greater
|
|
|
|
than the given value should be set.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_TIMEOUT_REPORTS " (\fIint\fP)"
|
2015-12-15 12:08:02 +00:00
|
|
|
Enable
|
2015-12-15 07:19:10 +00:00
|
|
|
.RI ( val
|
2015-12-15 12:08:02 +00:00
|
|
|
is 1) or disable
|
2015-12-15 11:33:02 +00:00
|
|
|
.RI ( val
|
2015-12-15 07:19:10 +00:00
|
|
|
is 0) timeout packages in
|
|
|
|
.BR LIRC_MODE_MODE2 .
|
|
|
|
By default, timeout reports should be turned off.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_CARRIER " (\fIint\fP)"
|
|
|
|
Set the receive carrier frequency (Hz).
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_CARRIER_RANGE " (\fIint\fP)"
|
2015-12-15 11:33:02 +00:00
|
|
|
After opening device, the first use of this operation
|
|
|
|
sets the lower bound of the carrier range,
|
|
|
|
and the second use sets the upper bound (Hz).
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
2015-12-30 19:46:39 +00:00
|
|
|
.BR LIRC_SET_MEASURE_CARRIER_MODE " (\fIint\fP)"
|
2015-12-15 12:08:02 +00:00
|
|
|
Enable
|
2015-12-15 07:19:10 +00:00
|
|
|
.RI ( val
|
2015-12-15 12:08:02 +00:00
|
|
|
is 1) or disable
|
2015-12-15 11:33:02 +00:00
|
|
|
.RI ( val
|
|
|
|
is 0) the measure mode.
|
2015-12-15 07:19:10 +00:00
|
|
|
If enabled, from the next key press on, the driver will send
|
|
|
|
.BR LIRC_MODE2_FREQUENCY
|
2015-12-15 11:33:02 +00:00
|
|
|
packets.
|
|
|
|
By default this should be turned off.
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_REC_RESOLUTION " (\fIvoid\fP)"
|
2015-12-15 12:08:02 +00:00
|
|
|
Return the driver resolution (microseconds).
|
2015-12-15 07:19:10 +00:00
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_MIN_FILTER_PULSE " (\fIvoid\fP)", " " \
|
|
|
|
LIRC_GET_MAX_FILTER_PULSE " (\fIvoid\fP)"
|
|
|
|
Some devices are able to filter out spikes in the incoming signal
|
|
|
|
using given filter rules.
|
|
|
|
These ioctls return the hardware capabilities that describe the bounds
|
|
|
|
of the possible filters.
|
|
|
|
Filter settings depend on the IR protocols that are expected.
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR lircd (8)
|
|
|
|
derives the settings from all protocols definitions found in its
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR lircd.conf (5)
|
|
|
|
config file.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_GET_MIN_FILTER_SPACE " (\fIvoid\fP)", " " \
|
|
|
|
LIRC_GET_MAX_FILTER_SPACE " (\fIvoid\fP)"
|
|
|
|
See
|
|
|
|
.BR LIRC_GET_MIN_FILTER_PULSE .
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_FILTER " (\fIint\fP)"
|
|
|
|
Pulses/spaces shorter than this (microseconds) are filtered out by
|
|
|
|
hardware.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_REC_FILTER_PULSE " (\fIint\fP)", " " \
|
|
|
|
LIRC_SET_REC_FILTER_SPACE " (\fIint\fP)"
|
|
|
|
Pulses/spaces shorter than this (microseconds) are filtered out by
|
|
|
|
hardware.
|
|
|
|
If filters cannot be set independently for pulse/space, the
|
|
|
|
corresponding ioctls must return an error and
|
|
|
|
.BR LIRC_SET_REC_FILTER
|
|
|
|
should be used instead.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_TRANSMITTER_MASK
|
2015-12-15 12:08:02 +00:00
|
|
|
Enable the set of transmitters specified in
|
|
|
|
.IR val ,
|
|
|
|
which contains a bit mask where each enabled transmitter is a 1.
|
2015-12-15 11:33:02 +00:00
|
|
|
The first transmitter is encoded by the least significant bit, and so on.
|
2015-12-15 07:19:10 +00:00
|
|
|
When an invalid bit mask is given, for example a bit is set even
|
2015-12-15 11:33:02 +00:00
|
|
|
though the device does not have so many transmitters,
|
|
|
|
this operation returns the
|
2015-12-15 07:19:10 +00:00
|
|
|
number of available transmitters and does nothing otherwise.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_SET_WIDEBAND_RECEIVER " (\fIint\fP)"
|
2015-12-15 11:33:02 +00:00
|
|
|
Some devices are equipped with a special wide band receiver which is
|
2015-12-15 07:19:10 +00:00
|
|
|
intended to be used to learn the output of an existing remote.
|
|
|
|
This ioctl can be used to enable
|
|
|
|
.RI ( val
|
|
|
|
equals 1) or disable
|
|
|
|
.RI ( val
|
|
|
|
equals 0) this functionality.
|
|
|
|
This might be useful for devices that otherwise have narrow band
|
|
|
|
receivers that prevent them to be used with certain remotes.
|
|
|
|
Wide band receivers may also be more precise.
|
|
|
|
On the other hand its disadvantage usually is reduced range of
|
|
|
|
reception.
|
|
|
|
.IP
|
|
|
|
Note: wide band receiver may be implicitly enabled if you enable
|
|
|
|
carrier reports.
|
2015-12-15 11:33:02 +00:00
|
|
|
In that case, it will be disabled as soon as you disable carrier reports.
|
2015-12-15 07:19:10 +00:00
|
|
|
Trying to disable a wide band receiver while carrier reports are active
|
|
|
|
will do nothing.
|
|
|
|
.TP
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR LIRC_SETUP_START " (\fIvoid\fP), " LIRC_SETUP_END " (\fIvoid\fP)"
|
|
|
|
Setting of several driver parameters can be optimized by bracketing
|
|
|
|
the actual ioctl calls
|
|
|
|
.BR LIRC_SETUP_START
|
|
|
|
and
|
|
|
|
.BR LIRC_SETUP_END .
|
2015-12-15 07:19:10 +00:00
|
|
|
When a driver receives a
|
|
|
|
.BR LIRC_SETUP_START
|
2015-12-15 11:33:02 +00:00
|
|
|
ioctl, it can choose to not commit further setting changes to the
|
2015-12-15 07:19:10 +00:00
|
|
|
hardware until a
|
|
|
|
.BR LIRC_SETUP_END
|
|
|
|
is received.
|
|
|
|
But this is open to the driver implementation and every driver
|
|
|
|
must also handle parameter changes which are not encapsulated by
|
|
|
|
.BR LIRC_SETUP_START
|
|
|
|
and
|
|
|
|
.BR LIRC_SETUP_END .
|
|
|
|
Drivers can also choose to ignore these ioctls.
|
|
|
|
.TP
|
|
|
|
.BR LIRC_NOTIFY_DECODE " (\fIvoid\fP)"
|
|
|
|
This ioctl is called by
|
2015-12-15 11:33:02 +00:00
|
|
|
.BR lircd (8)
|
2015-12-15 07:19:10 +00:00
|
|
|
whenever a successful decoding of an incoming IR signal is possible.
|
|
|
|
This can be used by supporting hardware to give visual user
|
|
|
|
feedback, for example by flashing an LED.
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SH FEATURES
|
|
|
|
.P
|
|
|
|
The features returned by
|
2015-12-15 11:33:02 +00:00
|
|
|
The
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_GET_FEATURES
|
2015-12-15 11:33:02 +00:00
|
|
|
ioctl returns a bit mask describing features of the driver.
|
|
|
|
The following bits may be returned in the mask:
|
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_REC_RAW
|
|
|
|
The driver is capable of receiving using
|
|
|
|
.BR LIRC_MODE_RAW .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_REC_PULSE
|
|
|
|
The driver is capable of receiving using
|
|
|
|
.BR LIRC_MODE_PULSE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_REC_MODE2
|
|
|
|
The driver is capable of receiving using
|
|
|
|
.BR LIRC_MODE_MODE2 .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_REC_LIRCCODE
|
|
|
|
The driver is capable of receiving using
|
|
|
|
.BR LIRC_MODE_LIRCCODE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_SEND_CARRIER
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports changing the modulation frequency using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_SEND_CARRIER .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_SEND_DUTY_CYCLE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports changing the duty cycle using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_SEND_DUTY_CYCLE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_TRANSMITTER_MASK
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports changing the active transmitter(s) using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_TRANSMITTER_MASK .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_REC_CARRIER
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports setting the receive carrier frequency using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_REC_CARRIER .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_REC_DUTY_CYCLE_RANGE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_REC_CARRIER_RANGE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_REC_CARRIER_RANGE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_GET_REC_RESOLUTION
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_GET_REC_RESOLUTION .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_REC_TIMEOUT
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_REC_TIMEOUT .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SET_REC_FILTER
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_REC_FILTER .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_MEASURE_CARRIER
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports measuring of the modulation frequency using
|
2015-12-30 19:46:39 +00:00
|
|
|
.BR LIRC_SET_MEASURE_CARRIER_MODE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_USE_WIDEBAND_RECEIVER
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports learning mode using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_SET_WIDEBAND_RECEIVER .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_NOTIFY_DECODE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_NOTIFY_DECODE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SEND_RAW
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports sending using
|
2015-12-30 19:46:39 +00:00
|
|
|
.BR LIRC_MODE_RAW .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SEND_PULSE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports sending using
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_MODE_PULSE .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SEND_MODE2
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports sending using
|
2015-12-30 19:46:39 +00:00
|
|
|
.BR LIRC_MODE_MODE2 .
|
2015-12-15 11:33:02 +00:00
|
|
|
.TP
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRC_CAN_SEND_LIRCCODE
|
2015-12-15 11:33:02 +00:00
|
|
|
The driver supports sending.
|
|
|
|
(This is uncommon, since
|
2015-12-15 07:19:10 +00:00
|
|
|
.BR LIRCCODE
|
2015-12-15 11:57:32 +00:00
|
|
|
drivers reflect hardware like TV-cards which usually dos not support
|
2015-12-15 07:19:10 +00:00
|
|
|
sending.)
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SH BUGS
|
2015-12-15 11:33:02 +00:00
|
|
|
Using these devices requires the kernel source header file
|
|
|
|
.IR lirc.h .
|
2016-05-26 21:23:25 +00:00
|
|
|
This file is not available before kernel release 4.6.
|
|
|
|
Users of older kernels could use the file bundled in
|
2015-12-15 11:33:02 +00:00
|
|
|
.UR http://www.lirc.org
|
|
|
|
.UE .
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2015-12-15 07:19:10 +00:00
|
|
|
.SH SEE ALSO
|
2015-12-15 11:57:32 +00:00
|
|
|
.BR lircd (8)
|
2015-12-15 07:19:10 +00:00
|
|
|
.P
|
|
|
|
https://www.kernel.org/doc/htmldocs/media_api/lirc_dev.html
|