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>
#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)
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;
}