OSDN Git Service

[media] em28xx: refactor VBI data processing code in em28xx_urb_data_copy()
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sat, 8 Dec 2012 14:31:28 +0000 (11:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 22 Dec 2012 22:53:43 +0000 (20:53 -0200)
commita48370158d134807f5b02655287b91cc000c45ca
tree7d585399a6d9690e97588ae32d848ee93d1bf5dd
parent8732533b3284ca078e3ea4a4721e43627ff7fa8e
[media] em28xx: refactor VBI data processing code in em28xx_urb_data_copy()

When a new frame header is detected in em28xx_urb_data_copy() and the data
packet contains both, VBI data and video data, the prevoius VBI buffer doesn't
get finished and is overwritten with the new VBI data.
This bug is not triggered with isochronous USB transfers, because the data
packetes are much smaller than the VBI data size.
But when using USB bulk transfers, the whole data of an URB is treated as
single packet, which is usually much larger then the VBI data size.
Refactor the VBI data processing code to fix this bug, but also to simplify the
code and make it similar to the video data processing code part (which allows
further code abstraction/unification in the future).
The changes have been tested with device "Hauppauge HVR-900".

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-video.c