[PATCH 06/13] [media] iguanair: reset the IR state after rx overflow or receiver enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sean Young <sean@xxxxxxxx>
---
 drivers/media/rc/iguanair.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c
index a6a19eb..9810008 100644
--- a/drivers/media/rc/iguanair.c
+++ b/drivers/media/rc/iguanair.c
@@ -124,6 +124,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len)
 			break;
 		case CMD_RX_OVERFLOW:
 			dev_warn(ir->dev, "receive overflow\n");
+			ir_raw_event_reset(ir->rc);
 			break;
 		default:
 			dev_warn(ir->dev, "control code %02x received\n",
@@ -256,6 +257,9 @@ static int iguanair_receiver(struct iguanair *ir, bool enable)
 	struct packet packet = { 0, DIR_OUT, enable ?
 				CMD_RECEIVER_ON : CMD_RECEIVER_OFF };
 
+	if (enable)
+		ir_raw_event_reset(ir->rc);
+
 	return iguanair_send(ir, &packet, sizeof(packet));
 }
 
-- 
1.7.11.2

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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux