aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c5
-rw-r--r--drivers/media/video/ivtv/ivtv-vbi.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index 9695e5356163..7272f1a71dd9 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -165,7 +165,7 @@ static int stream_enc_dma_append(struct ivtv_stream *s, u32 data[CX2341X_MBOX_MA
165 } 165 }
166 166
167 /* if this is the start of the DMA then fill in the magic cookie */ 167 /* if this is the start of the DMA then fill in the magic cookie */
168 if (s->sg_pending_size == 0) { 168 if (s->sg_pending_size == 0 && ivtv_use_dma(s)) {
169 if (itv->has_cx23415 && (s->type == IVTV_ENC_STREAM_TYPE_PCM || 169 if (itv->has_cx23415 && (s->type == IVTV_ENC_STREAM_TYPE_PCM ||
170 s->type == IVTV_DEC_STREAM_TYPE_VBI)) { 170 s->type == IVTV_DEC_STREAM_TYPE_VBI)) {
171 s->pending_backup = read_dec(offset - IVTV_DECODER_OFFSET); 171 s->pending_backup = read_dec(offset - IVTV_DECODER_OFFSET);
@@ -252,7 +252,7 @@ static void dma_post(struct ivtv_stream *s)
252 /* Sync Buffer */ 252 /* Sync Buffer */
253 ivtv_buf_sync_for_cpu(s, buf); 253 ivtv_buf_sync_for_cpu(s, buf);
254 254
255 if (x == 0) { 255 if (x == 0 && ivtv_use_dma(s)) {
256 offset = s->dma_last_offset; 256 offset = s->dma_last_offset;
257 if (u32buf[offset / 4] != DMA_MAGIC_COOKIE) 257 if (u32buf[offset / 4] != DMA_MAGIC_COOKIE)
258 { 258 {
@@ -591,7 +591,6 @@ static void ivtv_irq_enc_pio_complete(struct ivtv *itv)
591 } 591 }
592 s = &itv->streams[itv->cur_pio_stream]; 592 s = &itv->streams[itv->cur_pio_stream];
593 IVTV_DEBUG_HI_IRQ("ENC PIO COMPLETE %s\n", s->name); 593 IVTV_DEBUG_HI_IRQ("ENC PIO COMPLETE %s\n", s->name);
594 s->sg_pending_size = 0;
595 clear_bit(IVTV_F_I_PIO, &itv->i_flags); 594 clear_bit(IVTV_F_I_PIO, &itv->i_flags);
596 itv->cur_pio_stream = -1; 595 itv->cur_pio_stream = -1;
597 dma_post(s); 596 dma_post(s);
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c
index a7282a91bd97..a58c833c2b04 100644
--- a/drivers/media/video/ivtv/ivtv-vbi.c
+++ b/drivers/media/video/ivtv/ivtv-vbi.c
@@ -163,8 +163,8 @@ static int ivtv_convert_ivtv_vbi(struct ivtv *itv, u8 *p)
163 linemask[1] = 0xf; 163 linemask[1] = 0xf;
164 p += 4; 164 p += 4;
165 } else { 165 } else {
166 /* unknown VBI data stream */ 166 /* unknown VBI data, convert to empty VBI frame */
167 return 0; 167 linemask[0] = linemask[1] = 0;
168 } 168 }
169 for (i = 0; i < 36; i++) { 169 for (i = 0; i < 36; i++) {
170 int err = 0; 170 int err = 0;