Skip to content

Commit

Permalink
V4L/DVB: Add NECx support to ir-core
Browse files Browse the repository at this point in the history
This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
David Härdeman authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 733419b commit 25bb10c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/IR/ir-nec-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 25bb10c

Please sign in to comment.