diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/ir-nec-decoder.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c index 7b58b4a1729b..63ee722dbd02 100644 --- a/drivers/media/rc/ir-nec-decoder.c +++ b/drivers/media/rc/ir-nec-decoder.c | |||
@@ -49,6 +49,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev) | |||
49 | struct nec_dec *data = &dev->raw->nec; | 49 | struct nec_dec *data = &dev->raw->nec; |
50 | u32 scancode; | 50 | u32 scancode; |
51 | u8 address, not_address, command, not_command; | 51 | u8 address, not_address, command, not_command; |
52 | bool send_32bits = false; | ||
52 | 53 | ||
53 | if (!(dev->raw->enabled_protocols & RC_TYPE_NEC)) | 54 | if (!(dev->raw->enabled_protocols & RC_TYPE_NEC)) |
54 | return 0; | 55 | return 0; |
@@ -164,10 +165,15 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev) | |||
164 | if ((command ^ not_command) != 0xff) { | 165 | if ((command ^ not_command) != 0xff) { |
165 | IR_dprintk(1, "NEC checksum error: received 0x%08x\n", | 166 | IR_dprintk(1, "NEC checksum error: received 0x%08x\n", |
166 | data->bits); | 167 | data->bits); |
167 | break; | 168 | send_32bits = true; |
168 | } | 169 | } |
169 | 170 | ||
170 | if ((address ^ not_address) != 0xff) { | 171 | if (send_32bits) { |
172 | /* NEC transport, but modified protocol, used by at | ||
173 | * least Apple and TiVo remotes */ | ||
174 | scancode = data->bits; | ||
175 | IR_dprintk(1, "NEC (modified) scancode 0x%08x\n", scancode); | ||
176 | } else if ((address ^ not_address) != 0xff) { | ||
171 | /* Extended NEC */ | 177 | /* Extended NEC */ |
172 | scancode = address << 16 | | 178 | scancode = address << 16 | |
173 | not_address << 8 | | 179 | not_address << 8 | |