diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-12 10:17:52 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 08:45:17 -0500 |
commit | 59aa346009c06c6697e9db008e67e4ff8c205091 (patch) | |
tree | c1e87f25426cad90836d44d5b9be79d7511eb406 /drivers/media/dvb | |
parent | 312d63e4b0ca8456c82d01a6446795f7d029ecde (diff) |
[media] dib0700: Fix IR keycode handling
Fixes Fedora 14 bug: https://bugzilla.redhat.com/show_bug.cgi?id=667157
There are a few bugs at the code that generates the scancode at dib0700:
- RC keycode is wrong (it outputs a 24 bits keycode);
- NEC extended outputs a keycode that have endiannes issues;
- keycode tables for NEC extended remotes need to be updated.
The last issue need to be done as we get reports, as we don't have
the complete NEC-extended keycodes at the dibcom table.
This patch fixes the first two issues.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index 8ca48f76dfa9..98ffb40728e3 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -514,8 +514,8 @@ struct dib0700_rc_response { | |||
514 | union { | 514 | union { |
515 | u16 system16; | 515 | u16 system16; |
516 | struct { | 516 | struct { |
517 | u8 system; | ||
518 | u8 not_system; | 517 | u8 not_system; |
518 | u8 system; | ||
519 | }; | 519 | }; |
520 | }; | 520 | }; |
521 | u8 data; | 521 | u8 data; |
@@ -575,7 +575,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
575 | if ((poll_reply->system ^ poll_reply->not_system) != 0xff) { | 575 | if ((poll_reply->system ^ poll_reply->not_system) != 0xff) { |
576 | deb_data("NEC extended protocol\n"); | 576 | deb_data("NEC extended protocol\n"); |
577 | /* NEC extended code - 24 bits */ | 577 | /* NEC extended code - 24 bits */ |
578 | keycode = poll_reply->system16 << 8 | poll_reply->data; | 578 | keycode = be16_to_cpu(poll_reply->system16) << 8 | poll_reply->data; |
579 | } else { | 579 | } else { |
580 | deb_data("NEC normal protocol\n"); | 580 | deb_data("NEC normal protocol\n"); |
581 | /* normal NEC code - 16 bits */ | 581 | /* normal NEC code - 16 bits */ |
@@ -587,7 +587,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
587 | deb_data("RC5 protocol\n"); | 587 | deb_data("RC5 protocol\n"); |
588 | /* RC5 Protocol */ | 588 | /* RC5 Protocol */ |
589 | toggle = poll_reply->report_id; | 589 | toggle = poll_reply->report_id; |
590 | keycode = poll_reply->system16 << 8 | poll_reply->data; | 590 | keycode = poll_reply->system << 8 | poll_reply->data; |
591 | 591 | ||
592 | break; | 592 | break; |
593 | } | 593 | } |