]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit33960ea88d72b6d605fa0d64417146f7f2e591b3
tree7d585399a6d9690e97588ae32d848ee93d1bf5dd
parentb1441ddfb72052ea9dd128a030ab8070f8262aa9
[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