diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-04 01:31:30 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-24 02:50:48 +0200 |
commit | 120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch) | |
tree | 427e55aad9dcfcb91e99b98d508e6fb407e8f600 /drivers/media/usb/dvb-usb-v2/lmedm04.c | |
parent | [media] dib0700: NEC scancode cleanup (diff) | |
download | linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.tar.xz linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.zip |
[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/lmedm04.c')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/lmedm04.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 7d685bc8c2c0..e332af731187 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -286,14 +286,13 @@ static void lme2510_int_response(struct urb *lme_urb) case 0xaa: debug_data_snipet(1, "INT Remote data snipet", ibuf); if ((ibuf[4] + ibuf[5]) == 0xff) { - key = ibuf[5]; - key += (ibuf[3] > 0) - ? (ibuf[3] ^ 0xff) << 8 : 0; - key += (ibuf[2] ^ 0xff) << 16; + key = RC_SCANCODE_NECX((ibuf[2] ^ 0xff) << 8 | + (ibuf[3] > 0) ? (ibuf[3] ^ 0xff) : 0, + ibuf[5]); deb_info(1, "INT Key =%08x", key); if (adap_to_d(adap)->rc_dev != NULL) rc_keydown(adap_to_d(adap)->rc_dev, - key, 0); + RC_TYPE_NEC, key, 0); } break; case 0xbb: |