From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org
Subject: [PATCH v3 07/19] [media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve
Date: Sat, 25 Feb 2017 11:51:22 +0000 [thread overview]
Message-ID: <1d91a70bcf019d8971e7985248838f0ec5dc0428.1488023302.git.sean@mess.org> (raw)
In-Reply-To: <cover.1488023302.git.sean@mess.org>
In-Reply-To: <cover.1488023302.git.sean@mess.org>
This feature was never set. The ioctl should fail if no resolution
is set.
Signed-off-by: Sean Young <sean@mess.org>
---
drivers/media/rc/ir-lirc-codec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
index 235d74a..de85f1d 100644
--- a/drivers/media/rc/ir-lirc-codec.c
+++ b/drivers/media/rc/ir-lirc-codec.c
@@ -263,6 +263,9 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
return 0;
case LIRC_GET_REC_RESOLUTION:
+ if (!dev->rx_resolution)
+ return -ENOTTY;
+
val = dev->rx_resolution;
break;
@@ -367,8 +370,11 @@ static int ir_lirc_register(struct rc_dev *dev)
if (rc)
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;
+ if (dev->rx_resolution)
+ features |= LIRC_CAN_GET_REC_RESOLUTION;
+ }
if (dev->tx_ir) {
features |= LIRC_CAN_SEND_PULSE;
if (dev->s_tx_mask)
--
2.9.3
next prev parent reply other threads:[~2017-02-25 12:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 11:51 [PATCH v3 00/19] Teach lirc how to send and receive scancodes Sean Young
2017-02-25 11:51 ` [PATCH v3 01/19] [media] lirc: document lirc modes better Sean Young
2017-02-25 11:51 ` [PATCH v3 02/19] [media] lirc: return ENOTTY when ioctl is not supported Sean Young
2017-02-25 11:51 ` [PATCH v3 03/19] [media] lirc: return ENOTTY when device does support ioctl Sean Young
2017-02-25 11:51 ` [PATCH v3 04/19] [media] winbond: allow timeout to be set Sean Young
2017-02-25 11:51 ` [PATCH v3 05/19] [media] gpio-ir: do not allow a timeout of 0 Sean Young
2017-02-25 11:51 ` [PATCH v3 06/19] [media] rc: lirc keymap no longer makes any sense Sean Young
2017-02-25 11:51 ` Sean Young [this message]
2017-02-25 11:51 ` [PATCH v3 08/19] [media] mce_kbd: add encoder Sean Young
2017-02-25 11:51 ` [PATCH v3 09/19] [media] serial_ir: iommap is a memory address, not bool Sean Young
2017-02-25 11:51 ` [PATCH v3 10/19] [media] lirc: use refcounting for lirc devices Sean Young
2017-02-25 11:51 ` [PATCH v3 11/19] [media] lirc: lirc interface should not be a raw decoder Sean Young
2017-02-25 11:51 ` [PATCH v3 12/19] [media] lirc: exorcise struct irctl Sean Young
2017-02-25 11:51 ` [PATCH v3 13/19] [media] lirc: use plain kfifo rather than lirc_buffer Sean Young
2017-02-25 11:51 ` [PATCH v3 14/19] [media] lirc: implement scancode sending Sean Young
2017-02-25 11:51 ` [PATCH v3 15/19] [media] rc: use the correct carrier for scancode transmit Sean Young
2017-02-25 11:51 ` [PATCH v3 16/19] [media] rc: auto load encoder if necessary Sean Young
2017-02-25 11:51 ` [PATCH v3 17/19] [media] lirc: implement reading scancode Sean Young
2017-03-02 13:31 ` Sean Young
2017-03-06 16:16 ` [PATCH] [media] lirc: introduce LIRC_SET_POLL_MODE Sean Young
2017-02-25 11:51 ` [PATCH v3 18/19] [media] lirc: scancode rc devices should have a lirc device too Sean Young
2017-02-25 11:51 ` [PATCH v3 19/19] [media] lirc: document LIRC_MODE_SCANCODE Sean Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d91a70bcf019d8971e7985248838f0ec5dc0428.1488023302.git.sean@mess.org \
--to=sean@mess.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).