From 25bb10c11e6cca461f09df8f59c2eb501a9e4d52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Thu, 8 Apr 2010 20:04:35 -0300 Subject: [PATCH] V4L/DVB: Add NECx support to ir-core MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c Signed-off-by: David Härdeman Signed-off-by: Mauro Carvalho Chehab --- drivers/media/IR/ir-nec-decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 4c223f611a5e..14609d9580a8 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b/drivers/media/IR/ir-nec-decoder.c @@ -18,6 +18,7 @@ #define NEC_NBITS 32 #define NEC_UNIT 562500 /* ns */ #define NEC_HEADER_PULSE PULSE(16) +#define NECX_HEADER_PULSE PULSE(8) /* Less common NEC variant */ #define NEC_HEADER_SPACE SPACE(8) #define NEC_REPEAT_SPACE SPACE(4) #define NEC_BIT_PULSE PULSE(1) @@ -152,7 +153,7 @@ static int ir_nec_decode(struct input_dev *input_dev, s64 duration) switch (data->state) { case STATE_INACTIVE: - if (u == NEC_HEADER_PULSE) { + if (u == NEC_HEADER_PULSE || u == NECX_HEADER_PULSE) { data->count = 0; data->state = STATE_HEADER_SPACE; } -- 2.34.1