mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
UPSTREAM: media: lirc: lirc daemon fails to detect raw IR device
Since commit9b6192589b("media: lirc: implement scancode sending"), and commitde142c3241("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: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> (cherry picked from commit02d742f4b2) Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Conflicts: Documentation/media/uapi/rc/lirc-get-features.rst
This commit is contained in:
@@ -407,13 +407,13 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
|
||||
val |= LIRC_CAN_REC_SCANCODE;
|
||||
|
||||
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)
|
||||
val |= LIRC_CAN_GET_REC_RESOLUTION;
|
||||
}
|
||||
|
||||
if (dev->tx_ir) {
|
||||
val |= LIRC_CAN_SEND_PULSE | LIRC_CAN_SEND_SCANCODE;
|
||||
val |= LIRC_CAN_SEND_PULSE;
|
||||
if (dev->s_tx_mask)
|
||||
val |= LIRC_CAN_SET_TRANSMITTER_MASK;
|
||||
if (dev->s_tx_carrier)
|
||||
|
||||
Reference in New Issue
Block a user