Skip to contentSkip to conversation

media: vp7045: port TwinhanDTV Alpha to rc-core

PATCH New Sean Young 1 participant 1 message Sep 6, 2017

Subsystems (2)
lore
Share & tools
lore

Sean Young

author maintainer
#0 lore raw

PATCH 1/1 media: vp7045: port TwinhanDTV Alpha to rc-core

Only the nec protocol is understood, but then it doesn't pass on the full scancode and it ignores the nec repeats its own remote sends, so holding buttons does not work.

---
 drivers/media/rc/keymaps/rc-twinhan1027.c  |  2 +-
 drivers/media/usb/dvb-usb/dvb-usb-remote.c |  1 +
 drivers/media/usb/dvb-usb/dvb-usb.h        |  1 +
 drivers/media/usb/dvb-usb/vp7045.c         | 88 +++++-------------------------
 4 files changed, 18 insertions(+), 74 deletions(-)
drivers/media/rc/keymaps/rc-twinhan1027.c +1 -1
index 2275b37c61d2..78bb3143a1a8 100644
@@ -66,7 +66,7 @@ static struct rc_map_list twinhan_vp1027_map = {
 	.map = {
 		.scan     = twinhan_vp1027,
 		.size     = ARRAY_SIZE(twinhan_vp1027),
-		.rc_proto = RC_PROTO_UNKNOWN,	/* Legacy IR type */
+		.rc_proto = RC_PROTO_NEC,
 		.name     = RC_MAP_TWINHAN_VP1027_DVBS,
 	}
 };
drivers/media/usb/dvb-usb/dvb-usb-remote.c +1 -0
index b027d378102a..bf7dcd6b03e0 100644
@@ -283,6 +283,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
 	dev->input_phys = d->rc_phys;
 	dev->dev.parent = &d->udev->dev;
 	dev->priv = d;
+	dev->scancode_mask = d->props.rc.core.scancode_mask;
 
 	err = rc_register_device(dev);
 	if (err < 0) {
drivers/media/usb/dvb-usb/dvb-usb.h +1 -0
index 72468fdffa18..1da9e47553f5 100644
@@ -207,6 +207,7 @@ struct dvb_rc {
 	int (*rc_query) (struct dvb_usb_device *d);
 	int rc_interval;
 	bool bulk_mode;				/* uses bulk mode */
+	u32 scancode_mask;
 };
 
 /**
drivers/media/usb/dvb-usb/vp7045.c +15 -73

108 lines not on this page · raw message

Signature · 1 line
2.13.5