aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 15:10:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 05:55:09 -0400
commit1107237e4870055147379f297af02341d75ce6f6 (patch)
tree6a5e069f645cb4d8878dba3ae692d677cec233de /drivers/media/video/saa7164
parente48836b8bd7252b3a53eaa355c10322b3f5d236b (diff)
[media] saa7164: VBI irq cleanup and V4L VBI raw pitch adjustments
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164')
-rw-r--r--drivers/media/video/saa7164/saa7164-core.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c
index 1071cc754b1c..545eeffa5010 100644
--- a/drivers/media/video/saa7164/saa7164-core.c
+++ b/drivers/media/video/saa7164/saa7164-core.c
@@ -319,11 +319,13 @@ static void saa7164_work_enchandler_helper(struct saa7164_port *port, int bufnr)
319 } 319 }
320 } 320 }
321 321
322 /* Validate the incoming buffer content */ 322 if ((port->nr != SAA7164_PORT_VBI1) && (port->nr != SAA7164_PORT_VBI2)) {
323 if (port->encoder_params.stream_type == V4L2_MPEG_STREAM_TYPE_MPEG2_TS) 323 /* Validate the incoming buffer content */
324 saa7164_ts_verifier(buf); 324 if (port->encoder_params.stream_type == V4L2_MPEG_STREAM_TYPE_MPEG2_TS)
325 else if (port->encoder_params.stream_type == V4L2_MPEG_STREAM_TYPE_MPEG2_PS) 325 saa7164_ts_verifier(buf);
326 saa7164_pack_verifier(buf); 326 else if (port->encoder_params.stream_type == V4L2_MPEG_STREAM_TYPE_MPEG2_PS)
327 saa7164_pack_verifier(buf);
328 }
327 329
328 /* find a free user buffer and clone to it */ 330 /* find a free user buffer and clone to it */
329 if (!list_empty(&port->list_buf_free.list)) { 331 if (!list_empty(&port->list_buf_free.list)) {
@@ -494,6 +496,27 @@ static void saa7164_work_vbihandler(struct work_struct *w)
494 mcb = (port->hwcfg.buffercount - 1); 496 mcb = (port->hwcfg.buffercount - 1);
495 else 497 else
496 mcb = wp - 1; 498 mcb = wp - 1;
499
500 while (1) {
501 if (port->done_first_interrupt == 0) {
502 port->done_first_interrupt++;
503 rp = mcb;
504 } else
505 rp = (port->last_svc_rp + 1) % 8;
506
507 if ((rp < 0) || (rp > (port->hwcfg.buffercount - 1))) {
508 printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
509 break;
510 }
511
512 saa7164_work_enchandler_helper(port, rp);
513 port->last_svc_rp = rp;
514 cnt++;
515
516 if (rp == mcb)
517 break;
518 }
519
497 /* TODO: Convert this into a /proc/saa7164 style readable file */ 520 /* TODO: Convert this into a /proc/saa7164 style readable file */
498 if (print_histogram == port->nr) { 521 if (print_histogram == port->nr) {
499 saa7164_histogram_print(port, &port->irq_interval); 522 saa7164_histogram_print(port, &port->irq_interval);