mirror of https://gitee.com/openkylin/linux.git
media: lirc: lirc mode ioctls deal with current mode
The ioctl change the current mode or return the current mode; they do not tell you which modes are possible (use the lirc features ioctl for that). Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
02d742f4b2
commit
e3cd973429
|
@ -10,15 +10,15 @@ ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
|
||||||
Name
|
Name
|
||||||
====
|
====
|
||||||
|
|
||||||
LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set supported receive modes.
|
LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
========
|
========
|
||||||
|
|
||||||
.. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 rx_modes)
|
.. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 *mode)
|
||||||
:name: LIRC_GET_REC_MODE
|
:name: LIRC_GET_REC_MODE
|
||||||
|
|
||||||
.. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 rx_modes)
|
.. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 *mode)
|
||||||
:name: LIRC_SET_REC_MODE
|
:name: LIRC_SET_REC_MODE
|
||||||
|
|
||||||
Arguments
|
Arguments
|
||||||
|
@ -27,19 +27,41 @@ Arguments
|
||||||
``fd``
|
``fd``
|
||||||
File descriptor returned by open().
|
File descriptor returned by open().
|
||||||
|
|
||||||
``rx_modes``
|
``mode``
|
||||||
Bitmask with the supported transmit modes.
|
Mode used for receive.
|
||||||
|
|
||||||
Description
|
Description
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`
|
Get and set the current receive mode. Only
|
||||||
and :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
|
:ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
|
||||||
|
:ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
|
||||||
Use :ref:`lirc_get_features` to find out which modes the driver supports.
|
Use :ref:`lirc_get_features` to find out which modes the driver supports.
|
||||||
|
|
||||||
Return Value
|
Return Value
|
||||||
============
|
============
|
||||||
|
|
||||||
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
|
||||||
appropriately. The generic error codes are described at the
|
|
||||||
:ref:`Generic Error Codes <gen-errors>` chapter.
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
|
||||||
|
|
||||||
|
- .. row 1
|
||||||
|
|
||||||
|
- ``ENODEV``
|
||||||
|
|
||||||
|
- Device not available.
|
||||||
|
|
||||||
|
- .. row 2
|
||||||
|
|
||||||
|
- ``ENOTTY``
|
||||||
|
|
||||||
|
- Device does not support receiving.
|
||||||
|
|
||||||
|
- .. row 3
|
||||||
|
|
||||||
|
- ``EINVAL``
|
||||||
|
|
||||||
|
- Invalid mode or invalid mode for this device.
|
||||||
|
|
|
@ -10,15 +10,15 @@ ioctls LIRC_GET_SEND_MODE and LIRC_SET_SEND_MODE
|
||||||
Name
|
Name
|
||||||
====
|
====
|
||||||
|
|
||||||
LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set supported transmit mode.
|
LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set current transmit mode.
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
========
|
========
|
||||||
|
|
||||||
.. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *tx_modes )
|
.. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *mode )
|
||||||
:name: LIRC_GET_SEND_MODE
|
:name: LIRC_GET_SEND_MODE
|
||||||
|
|
||||||
.. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *tx_modes )
|
.. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *mode )
|
||||||
:name: LIRC_SET_SEND_MODE
|
:name: LIRC_SET_SEND_MODE
|
||||||
|
|
||||||
Arguments
|
Arguments
|
||||||
|
@ -27,8 +27,8 @@ Arguments
|
||||||
``fd``
|
``fd``
|
||||||
File descriptor returned by open().
|
File descriptor returned by open().
|
||||||
|
|
||||||
``tx_modes``
|
``mode``
|
||||||
Bitmask with the supported transmit modes.
|
The mode used for transmitting.
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
@ -44,6 +44,28 @@ modes the driver supports.
|
||||||
Return Value
|
Return Value
|
||||||
============
|
============
|
||||||
|
|
||||||
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|
||||||
appropriately. The generic error codes are described at the
|
.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
|
||||||
:ref:`Generic Error Codes <gen-errors>` chapter.
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
|
||||||
|
|
||||||
|
- .. row 1
|
||||||
|
|
||||||
|
- ``ENODEV``
|
||||||
|
|
||||||
|
- Device not available.
|
||||||
|
|
||||||
|
- .. row 2
|
||||||
|
|
||||||
|
- ``ENOTTY``
|
||||||
|
|
||||||
|
- Device does not support transmitting.
|
||||||
|
|
||||||
|
- .. row 3
|
||||||
|
|
||||||
|
- ``EINVAL``
|
||||||
|
|
||||||
|
- Invalid mode or invalid mode for this device.
|
||||||
|
|
Loading…
Reference in New Issue