Commit 02d742f4 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: lirc: lirc daemon fails to detect raw IR device

Since commit 9b619258 ("media: lirc: implement scancode sending"),
and commit de142c32 ("media: lirc: implement reading scancode")
the lirc features ioctl for raw IR devices advertises two modes for
sending and receiving.

The lirc daemon now fails to detect a raw IR device, both for transmit
and receive.

To fix this, do not advertise the scancode mode in the lirc features
for raw IR devices (however do keep it for scancode devices). The mode
can still be used via the LIRC_SET_{REC,SEND}_MODE ioctl.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 04d0e8de
...@@ -55,8 +55,11 @@ LIRC features ...@@ -55,8 +55,11 @@ LIRC features
``LIRC_CAN_REC_MODE2`` ``LIRC_CAN_REC_MODE2``
The driver is capable of receiving using This is raw IR driver for receiving. This means that
:ref:`LIRC_MODE_MODE2 <lirc-mode-MODE2>`. :ref:`LIRC_MODE_MODE2 <lirc-mode-MODE2>` is used. This also implies
that :ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is also supported,
as long as the kernel is recent enough. Use the
:ref:`lirc_set_rec_mode` to switch modes.
.. _LIRC-CAN-REC-LIRCCODE: .. _LIRC-CAN-REC-LIRCCODE:
...@@ -68,9 +71,8 @@ LIRC features ...@@ -68,9 +71,8 @@ LIRC features
``LIRC_CAN_REC_SCANCODE`` ``LIRC_CAN_REC_SCANCODE``
The driver is capable of receiving using This is a scancode driver for receiving. This means that
:ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>`. :ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is used.
.. _LIRC-CAN-SET-SEND-CARRIER: .. _LIRC-CAN-SET-SEND-CARRIER:
...@@ -164,7 +166,10 @@ LIRC features ...@@ -164,7 +166,10 @@ LIRC features
``LIRC_CAN_SEND_PULSE`` ``LIRC_CAN_SEND_PULSE``
The driver supports sending (also called as IR blasting or IR TX) using The driver supports sending (also called as IR blasting or IR TX) using
:ref:`LIRC_MODE_PULSE <lirc-mode-pulse>`. :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>`. This implies that
:ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is also supported for
transmit, as long as the kernel is recent enough. Use the
:ref:`lirc_set_send_mode` to switch modes.
.. _LIRC-CAN-SEND-MODE2: .. _LIRC-CAN-SEND-MODE2:
...@@ -179,13 +184,6 @@ LIRC features ...@@ -179,13 +184,6 @@ LIRC features
Unused. Kept just to avoid breaking uAPI. Unused. Kept just to avoid breaking uAPI.
.. _LIRC-CAN-SEND-SCANCODE:
``LIRC_CAN_SEND_SCANCODE``
The driver supports sending (also called as IR blasting or IR TX) using
:ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>`.
Return Value Return Value
============ ============
......
...@@ -403,13 +403,13 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd, ...@@ -403,13 +403,13 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
val |= LIRC_CAN_REC_SCANCODE; val |= LIRC_CAN_REC_SCANCODE;
if (dev->driver_type == RC_DRIVER_IR_RAW) { if (dev->driver_type == RC_DRIVER_IR_RAW) {
val |= LIRC_CAN_REC_MODE2 | LIRC_CAN_REC_SCANCODE; val |= LIRC_CAN_REC_MODE2;
if (dev->rx_resolution) if (dev->rx_resolution)
val |= LIRC_CAN_GET_REC_RESOLUTION; val |= LIRC_CAN_GET_REC_RESOLUTION;
} }
if (dev->tx_ir) { if (dev->tx_ir) {
val |= LIRC_CAN_SEND_PULSE | LIRC_CAN_SEND_SCANCODE; val |= LIRC_CAN_SEND_PULSE;
if (dev->s_tx_mask) if (dev->s_tx_mask)
val |= LIRC_CAN_SET_TRANSMITTER_MASK; val |= LIRC_CAN_SET_TRANSMITTER_MASK;
if (dev->s_tx_carrier) if (dev->s_tx_carrier)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment