diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-04 03:31:30 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-24 04:50:48 +0400 |
commit | 120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch) | |
tree | 427e55aad9dcfcb91e99b98d508e6fb407e8f600 /drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |
parent | af3a4a9bbeb00df3e42e77240b4cdac5479812f9 (diff) | |
download | linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.tar.xz |
[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a
scancode but has no idea which protocol it corresponds to.
This patch (which required reading through the source/keymap for all drivers,
not fun) makes the protocol information explicit which is important
documentation and makes it easier to e.g. support multiple protocols with one
decoder (think rc5 and rc-streamzap). The information isn't used yet so there
should be no functional changes.
[m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/rtl28xxu.c')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index a676e4452847..57ac62d6fa1f 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c @@ -1287,19 +1287,19 @@ static int rtl2831u_rc_query(struct dvb_usb_device *d) if (buf[2] == (u8) ~buf[3]) { if (buf[0] == (u8) ~buf[1]) { /* NEC standard (16 bit) */ - rc_code = buf[0] << 8 | buf[2]; + rc_code = RC_SCANCODE_NEC(buf[0], buf[2]); } else { /* NEC extended (24 bit) */ - rc_code = buf[0] << 16 | - buf[1] << 8 | buf[2]; + rc_code = RC_SCANCODE_NECX(buf[0] << 8 | buf[1], + buf[2]); } } else { /* NEC full (32 bit) */ - rc_code = buf[0] << 24 | buf[1] << 16 | - buf[2] << 8 | buf[3]; + rc_code = RC_SCANCODE_NEC32(buf[0] << 24 | buf[1] << 16 | + buf[2] << 8 | buf[3]); } - rc_keydown(d->rc_dev, rc_code, 0); + rc_keydown(d->rc_dev, RC_TYPE_NEC, rc_code, 0); ret = rtl28xx_wr_reg(d, SYS_IRRC_SR, 1); if (ret) |