This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: ir-ctl: always enable timeout reports Author: Sean Young <s...@mess.org> Date: Tue Dec 5 20:48:03 2017 +0000 Timeout reports are now per-fd in the kernel. If they are not enabled, the one-shot option does not work. Signed-off-by: Sean Young <s...@mess.org> utils/ir-ctl/ir-ctl.1.in | 11 +---------- utils/ir-ctl/ir-ctl.c | 21 +++------------------ 2 files changed, 4 insertions(+), 28 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=d9adc174a9c2d79dc6fc288a4596d3bb12fffe73 diff --git a/utils/ir-ctl/ir-ctl.1.in b/utils/ir-ctl/ir-ctl.1.in index eb744abf7c35..8e65adb4be21 100644 --- a/utils/ir-ctl/ir-ctl.1.in +++ b/utils/ir-ctl/ir-ctl.1.in @@ -69,15 +69,6 @@ This might use the wideband receiver although this is hardware specific. Disable reporting of the carrier frequency. This should make it possible to use the narrowband receiver. This is the default. .TP -\fB\-p\fR, \fB\-\-timeout\-reports\fR -When the IR receiver times out due to inactivity, a timeout message is -reported. When receiving you will get the keyword \fItimeout\fR followed by -the length of time that no IR was detected for. -.TP -\fB\-P\fR, \fB\-\-no\-timeout\-reports\fR -When the IR receiver times out due to inactivity, do not report this. -This is the default. -.TP \fB\-t\fR, \fB\-\-timeout\fR=\fITIMEOUT\fR Set the length of a space at which the receiver goes idle, specified in microseconds. @@ -230,7 +221,7 @@ To send the rc-5 hauppauge '1' scancode: .PP To restore the IR receiver on /dev/lirc2 to the default state: .br - \fBir\-ctl \-PMn \-\-timeout 125000 \-\-device=/dev/lirc2\fR + \fBir\-ctl \-Mn \-\-timeout 125000 \-\-device=/dev/lirc2\fR .SH BUGS Report bugs to \fBLinux Media Mailing List <linux-me...@vger.kernel.org>\fR .SH COPYRIGHT diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c index ab2440b0f3d3..8aaee628e234 100644 --- a/utils/ir-ctl/ir-ctl.c +++ b/utils/ir-ctl/ir-ctl.c @@ -84,7 +84,6 @@ struct arguments { unsigned timeout; unsigned gap; int carrier_reports; - int timeout_reports; unsigned carrier; unsigned duty; unsigned emitters; @@ -105,8 +104,6 @@ static const struct argp_option options[] = { { "carrier-range", 'R', N_("RANGE"), 0, N_("set receiver carrier range") }, { "measure-carrier", 'm', 0, 0, N_("report carrier frequency") }, { "no-measure-carrier", 'M', 0, 0, N_("disable reporting carrier frequency") }, - { "timeout-reports", 'p', 0, 0, N_("report when a timeout occurs") }, - { "no-timeout-reports", 'P', 0, 0, N_("disable reporting when a timeout occurs") }, { "timeout", 't', N_("TIMEOUT"), 0, N_("set receiving timeout") }, { .doc = N_("Sending options:") }, { "carrier", 'c', N_("CARRIER"), 0, N_("set send carrier") }, @@ -430,18 +427,6 @@ static error_t parse_opt(int k, char *arg, struct argp_state *state) arguments->carrier_reports = 2; break; - case 'p': - if (arguments->timeout_reports == 2) - argp_error(state, _("cannot enable and disable timeout reports")); - - arguments->timeout_reports = 1; - break; - case 'P': - if (arguments->timeout_reports == 1) - argp_error(state, _("cannot enable and disable timeout reports")); - - arguments->timeout_reports = 2; - break; case 'n': if (arguments->wideband) argp_error(state, _("cannot use narrowband and wideband receiver at once")); @@ -634,11 +619,11 @@ static int lirc_options(struct arguments *args, int fd, unsigned features) fprintf(stderr, _("%s: device cannot measure carrier\n"), dev); } - if (args->timeout_reports) { - unsigned on = args->timeout_reports == 1; + if (features & LIRC_CAN_REC_MODE2) { + unsigned on = 1; rc = ioctl(fd, LIRC_SET_REC_TIMEOUT_REPORTS, &on); if (rc) - fprintf(stderr, _("%s: failed to set timeout reports %s: %m\n"), dev, on ? _("on") : _("off")); + fprintf(stderr, _("%s: failed to enable timeout reports: %m\n"), dev); } if (args->carrier_low) { _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits