* [PATCH] media: rc: ir-sharp-decoder: add support for Denon variant of the protocol
@ 2015-10-29 19:28 Heiner Kallweit
0 siblings, 0 replies; only message in thread
From: Heiner Kallweit @ 2015-10-29 19:28 UTC (permalink / raw)
To: mchehab; +Cc: linux-media
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>
---
drivers/media/rc/Kconfig | 3 ++-
drivers/media/rc/ir-sharp-decoder.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index b6e1311..bd4d685 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -101,7 +101,8 @@ config IR_SHARP_DECODER
---help---
Enable this option if you have an infrared remote control which
- uses the Sharp protocol, and you need software decoding support.
+ uses the Sharp protocol (Sharp, Denon), and you need software
+ decoding support.
config IR_MCE_KBD_DECODER
tristate "Enable IR raw decoder for the MCE keyboard/mouse protocol"
diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c
index b7acdba..1f33164 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 {
--
2.6.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-29 19:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 19:28 [PATCH] media: rc: ir-sharp-decoder: add support for Denon variant of the protocol Heiner Kallweit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).