Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223562
b: refs/heads/master
c: b758281
h: refs/heads/master
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Dec 20, 2010
1 parent 542941e commit c2adff8
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: 6f6c625d32852ab2fbfd131ba9a1e5d55ff8032c
refs/heads/master: b7582815b3fc772e23ee5da884e9a2307bdc1025
10 changes: 8 additions & 2 deletions trunk/drivers/media/IR/nuvoton-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
count = nvt->pkts;
nvt_dbg_verbose("Processing buffer of len %d", count);

init_ir_raw_event(&rawir);

for (i = 0; i < count; i++) {
nvt->pkts--;
sample = nvt->buf[i];
Expand Down Expand Up @@ -643,11 +645,15 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
* indicates end of IR signal, but new data incoming. In both
* cases, it means we're ready to call ir_raw_event_handle
*/
if (sample == BUF_PULSE_BIT || ((sample != BUF_LEN_MASK) &&
(sample & BUF_REPEAT_MASK) == BUF_REPEAT_BYTE))
if ((sample == BUF_PULSE_BIT) && nvt->pkts) {
nvt_dbg("Calling ir_raw_event_handle (signal end)\n");
ir_raw_event_handle(nvt->rdev);
}
}

nvt_dbg("Calling ir_raw_event_handle (buffer empty)\n");
ir_raw_event_handle(nvt->rdev);

if (nvt->pkts) {
nvt_dbg("Odd, pkts should be 0 now... (its %u)", nvt->pkts);
nvt->pkts = 0;
Expand Down

0 comments on commit c2adff8

Please sign in to comment.