Re: [PATCH 45/49] rc-ir-raw: add various rc_events

2014-07-25 Thread Mauro Carvalho Chehab
Em Fri, 04 Apr 2014 01:35:03 +0200
David Härdeman  escreveu:

> Reporting pulse/space events via the /dev/rc/rcX device node is an
> important step towards having feature parity with LIRC.

Why to duplicate LIRC?

> 
> Signed-off-by: David Härdeman 
> ---
>  drivers/media/rc/rc-ir-raw.c |   11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
> index bf5215b..3b68975 100644
> --- a/drivers/media/rc/rc-ir-raw.c
> +++ b/drivers/media/rc/rc-ir-raw.c
> @@ -71,6 +71,17 @@ int ir_raw_event_store(struct rc_dev *dev, struct 
> ir_raw_event *ev)
>   IR_dprintk(2, "sample: (%05dus %s)\n",
>  TO_US(ev->duration), TO_STR(ev->pulse));
>  
> + if (ev->reset)
> + rc_event(dev, RC_IR, RC_IR_RESET, 1);
> + else if (ev->carrier_report)
> + rc_event(dev, RC_IR, RC_IR_CARRIER, ev->carrier);
> + else if (ev->timeout)
> + rc_event(dev, RC_IR, RC_IR_STOP, 1);
> + else if (ev->pulse)
> + rc_event(dev, RC_IR, RC_IR_PULSE, ev->duration);
> + else
> + rc_event(dev, RC_IR, RC_IR_SPACE, ev->duration);
> +
>   if (kfifo_in(&dev->raw->kfifo, ev, 1) != 1)
>   return -ENOMEM;
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 45/49] rc-ir-raw: add various rc_events

2014-04-03 Thread David Härdeman
Reporting pulse/space events via the /dev/rc/rcX device node is an
important step towards having feature parity with LIRC.

Signed-off-by: David Härdeman 
---
 drivers/media/rc/rc-ir-raw.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index bf5215b..3b68975 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -71,6 +71,17 @@ int ir_raw_event_store(struct rc_dev *dev, struct 
ir_raw_event *ev)
IR_dprintk(2, "sample: (%05dus %s)\n",
   TO_US(ev->duration), TO_STR(ev->pulse));
 
+   if (ev->reset)
+   rc_event(dev, RC_IR, RC_IR_RESET, 1);
+   else if (ev->carrier_report)
+   rc_event(dev, RC_IR, RC_IR_CARRIER, ev->carrier);
+   else if (ev->timeout)
+   rc_event(dev, RC_IR, RC_IR_STOP, 1);
+   else if (ev->pulse)
+   rc_event(dev, RC_IR, RC_IR_PULSE, ev->duration);
+   else
+   rc_event(dev, RC_IR, RC_IR_SPACE, ev->duration);
+
if (kfifo_in(&dev->raw->kfifo, ev, 1) != 1)
return -ENOMEM;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html