Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242185
b: refs/heads/master
c: 4be22b6
h: refs/heads/master
i:
  242183: c0dbf17
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 25ca419 commit 435acdc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d9a46f9d5e0bea8e862143be73df2bbc9acb2a3
refs/heads/master: 4be22b6a7f2f2b7eb6f7aab8902068a367cda8ba
10 changes: 8 additions & 2 deletions trunk/drivers/media/rc/ir-nec-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
struct nec_dec *data = &dev->raw->nec;
u32 scancode;
u8 address, not_address, command, not_command;
bool send_32bits = false;

if (!(dev->raw->enabled_protocols & RC_TYPE_NEC))
return 0;
Expand Down Expand Up @@ -164,10 +165,15 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
if ((command ^ not_command) != 0xff) {
IR_dprintk(1, "NEC checksum error: received 0x%08x\n",
data->bits);
break;
send_32bits = true;
}

if ((address ^ not_address) != 0xff) {
if (send_32bits) {
/* NEC transport, but modified protocol, used by at
* least Apple and TiVo remotes */
scancode = data->bits;
IR_dprintk(1, "NEC (modified) scancode 0x%08x\n", scancode);
} else if ((address ^ not_address) != 0xff) {
/* Extended NEC */
scancode = address << 16 |
not_address << 8 |
Expand Down

0 comments on commit 435acdc

Please sign in to comment.