aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-25 13:11:23 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:07:14 -0400
commit2f3a98931f51be6093df7c6cc2633bf238778b7d (patch)
treef25f00c9f0a46c9c4885a24445dc795a2151fc97 /drivers/media/video/ivtv/ivtv-irq.c
parent26e9d599561e9a964bd4d7c2be0029db8aaff852 (diff)
V4L/DVB (6116): ivtv: VBI cleanups and fixes
Besides some VBI cleanups this patch also fixes a subtle problem with the VBI re-insertion stream where the PIO work handler wasn't called quickly enough, resulting in occasional corrupt data. Furthermore the CC output didn't disable CC correctly and at the right time, causing duplicates to be sent. An saa7127 fix for VPS output was also added: the wrong data was sent. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index 66d0da22389f..bf7d99c6ffaf 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -786,7 +786,10 @@ static void ivtv_irq_vsync(struct ivtv *itv)
786 wake_up(&s->waitq); 786 wake_up(&s->waitq);
787 787
788 /* Send VBI to saa7127 */ 788 /* Send VBI to saa7127 */
789 if (frame) { 789 if (frame && (itv->output_mode == OUT_PASSTHROUGH ||
790 test_bit(IVTV_F_I_UPDATE_WSS, &itv->i_flags) ||
791 test_bit(IVTV_F_I_UPDATE_VPS, &itv->i_flags) ||
792 test_bit(IVTV_F_I_UPDATE_CC, &itv->i_flags))) {
790 set_bit(IVTV_F_I_WORK_HANDLER_VBI, &itv->i_flags); 793 set_bit(IVTV_F_I_WORK_HANDLER_VBI, &itv->i_flags);
791 set_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags); 794 set_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags);
792 } 795 }
@@ -809,7 +812,7 @@ static void ivtv_irq_vsync(struct ivtv *itv)
809 } 812 }
810} 813}
811 814
812#define IVTV_IRQ_DMA (IVTV_IRQ_DMA_READ | IVTV_IRQ_ENC_DMA_COMPLETE | IVTV_IRQ_DMA_ERR | IVTV_IRQ_ENC_START_CAP | IVTV_IRQ_ENC_VBI_CAP | IVTV_IRQ_DEC_DATA_REQ) 815#define IVTV_IRQ_DMA (IVTV_IRQ_DMA_READ | IVTV_IRQ_ENC_DMA_COMPLETE | IVTV_IRQ_DMA_ERR | IVTV_IRQ_ENC_START_CAP | IVTV_IRQ_ENC_VBI_CAP | IVTV_IRQ_DEC_DATA_REQ | IVTV_IRQ_DEC_VBI_RE_INSERT)
813 816
814irqreturn_t ivtv_irq_handler(int irq, void *dev_id) 817irqreturn_t ivtv_irq_handler(int irq, void *dev_id)
815{ 818{
@@ -942,8 +945,9 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id)
942 } 945 }
943 } 946 }
944 947
945 if (test_and_clear_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags)) 948 if (test_and_clear_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags)) {
946 queue_work(itv->irq_work_queues, &itv->irq_work_queue); 949 queue_work(itv->irq_work_queues, &itv->irq_work_queue);
950 }
947 951
948 spin_unlock(&itv->dma_reg_lock); 952 spin_unlock(&itv->dma_reg_lock);
949 953