diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-25 19:11:23 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-25 19:11:23 +0200 |
commit | dbfed372740e7791427773ba97a3e378b5aadfe3 (patch) | |
tree | e0210564de71db487f55abbebe56ae46cb6c7a3e /linux/drivers/media/video/ivtv/ivtv-irq.c | |
parent | ac2002e8dbbc99d7003c481dfefae21c096d9e5b (diff) | |
download | mediapointer-dvb-s2-dbfed372740e7791427773ba97a3e378b5aadfe3.tar.gz mediapointer-dvb-s2-dbfed372740e7791427773ba97a3e378b5aadfe3.tar.bz2 |
ivtv: VBI cleanups and fixes
From: Hans Verkuil <hverkuil@xs4all.nl>
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>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-irq.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-irq.c b/linux/drivers/media/video/ivtv/ivtv-irq.c index b34d3b81f..2c59f0d6c 100644 --- a/linux/drivers/media/video/ivtv/ivtv-irq.c +++ b/linux/drivers/media/video/ivtv/ivtv-irq.c @@ -792,7 +792,10 @@ static void ivtv_irq_vsync(struct ivtv *itv) wake_up(&s->waitq); /* Send VBI to saa7127 */ - if (frame) { + if (frame && (itv->output_mode == OUT_PASSTHROUGH || + test_bit(IVTV_F_I_UPDATE_WSS, &itv->i_flags) || + test_bit(IVTV_F_I_UPDATE_VPS, &itv->i_flags) || + test_bit(IVTV_F_I_UPDATE_CC, &itv->i_flags))) { set_bit(IVTV_F_I_WORK_HANDLER_VBI, &itv->i_flags); set_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags); } @@ -815,7 +818,7 @@ static void ivtv_irq_vsync(struct ivtv *itv) } } -#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) +#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) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18) irqreturn_t ivtv_irq_handler(int irq, void *dev_id, struct pt_regs *regs) @@ -952,8 +955,9 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id) } } - if (test_and_clear_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags)) + if (test_and_clear_bit(IVTV_F_I_HAVE_WORK, &itv->i_flags)) { queue_work(itv->irq_work_queues, &itv->irq_work_queue); + } spin_unlock(&itv->dma_reg_lock); |