|
@@ -263,6 +263,9 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
case LIRC_GET_REC_RESOLUTION:
|
|
case LIRC_GET_REC_RESOLUTION:
|
|
|
|
+ if (!dev->rx_resolution)
|
|
|
|
+ return -ENOTTY;
|
|
|
|
+
|
|
val = dev->rx_resolution;
|
|
val = dev->rx_resolution;
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -367,8 +370,11 @@ static int ir_lirc_register(struct rc_dev *dev)
|
|
if (rc)
|
|
if (rc)
|
|
goto rbuf_init_failed;
|
|
goto rbuf_init_failed;
|
|
|
|
|
|
- if (dev->driver_type != RC_DRIVER_IR_RAW_TX)
|
|
|
|
|
|
+ if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
|
|
features |= LIRC_CAN_REC_MODE2;
|
|
features |= LIRC_CAN_REC_MODE2;
|
|
|
|
+ if (dev->rx_resolution)
|
|
|
|
+ features |= LIRC_CAN_GET_REC_RESOLUTION;
|
|
|
|
+ }
|
|
if (dev->tx_ir) {
|
|
if (dev->tx_ir) {
|
|
features |= LIRC_CAN_SEND_PULSE;
|
|
features |= LIRC_CAN_SEND_PULSE;
|
|
if (dev->s_tx_mask)
|
|
if (dev->s_tx_mask)
|