Re: [PATCH 3/4] [media] mceusb: Improve parser to get codes sent together with IR RX data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 21, 2010, at 10:07 AM, Mauro Carvalho Chehab wrote:

> On cx231xx, sometimes, several control messages are sent together
> with data. Improves the parser to also handle those cases.
> 
> For example:
> 
> [38777.211690] mceusb 7-6:1.0: rx data: 9f 14 01 9f 15 00 00 80  (length=8)
> [38777.211696] mceusb 7-6:1.0: Got long-range receive sensor in use
> [38777.211700] mceusb 7-6:1.0: Received pulse count is 0
> [38777.211703] mceusb 7-6:1.0: IR data len = 0
> [38777.211707] mceusb 7-6:1.0: New data. rem: 0x1f, cmd: 0x80
> 
> Before this patch, only the first message would be displayed, as the
> parser would be stopping at "9f 14 01".
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

So two minor issues with this patch...

First, the debug spew looks slightly confusing, though through no fault of yours, really. Now that you're parsing all three chunks of that final sequence, you see a "New data." message that actually comes from the first chunk of the three, but after you've already seen the other three. We should probably just drop that dev_dbg and rely on the 'IR data len' one.

The second issue is the very last hunk of the patch that moves the call to ir_raw_event_handle, which should be unrelated to the rest of this patch (and may, iirc, cause issues for the first-gen transceiver -- I'd have to re-test to be sure).

But otherwise, looks good to me.


> diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c
> index a726f63..609bf3d 100644
> --- a/drivers/media/IR/mceusb.c
> +++ b/drivers/media/IR/mceusb.c
...
> @@ -724,9 +755,9 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
> 		if (ir->buf_in[i] == 0x80 || ir->buf_in[i] == 0x9f)
> 			ir->rem = 0;
> 
> -		dev_dbg(ir->dev, "calling ir_raw_event_handle\n");
> -		ir_raw_event_handle(ir->idev);
> 	}
> +	dev_dbg(ir->dev, "calling ir_raw_event_handle\n");
> +	ir_raw_event_handle(ir->idev);
> }
> 
> static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs)

^^^ the unrelated hunk.

-- 
Jarod Wilson
jarod@xxxxxxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux