summaryrefslogtreecommitdiff
path: root/drivers/media/rc/ir-sharp-decoder.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2015-10-29 17:28:08 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-19 09:32:35 -0200
commit1b0621af505006c535edab36e7cc154534cabebd (patch)
treeb06bef92fc93ecc3cec1f73aa1285c81c5e034ed /drivers/media/rc/ir-sharp-decoder.c
parentdd4c22a61e0bdaf84202fcf84cb8f75ed7bb3552 (diff)
[media] media: rc: ir-sharp-decoder: add support for Denon variant of the protocol
Denon also uses the Sharp protocol, however with different check bits. It would have been also possible to add this as a separate protocol but this may not be worth the effort. Successfully tested with a Denon RC-1002 remote control. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/ir-sharp-decoder.c')
-rw-r--r--drivers/media/rc/ir-sharp-decoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c
index b7acdbae8159..1f331644d07c 100644
--- a/drivers/media/rc/ir-sharp-decoder.c
+++ b/drivers/media/rc/ir-sharp-decoder.c
@@ -118,7 +118,9 @@ static int ir_sharp_decode(struct rc_dev *dev, struct ir_raw_event ev)
if (data->count == SHARP_NBITS) {
/* exp,chk bits should be 1,0 */
- if ((data->bits & 0x3) != 0x2)
+ if ((data->bits & 0x3) != 0x2 &&
+ /* DENON variant, both chk bits 0 */
+ (data->bits & 0x3) != 0x0)
break;
data->state = STATE_ECHO_SPACE;
} else {