Changeset 4003

Show
Ignore:
Timestamp:
08/18/07 20:15:56 (1 year ago)
Author:
hverkuil
Message:

- Fix round-robin implementation.
- Invalid VBI packets should result in an empty VBI frame, not

in an zero-sized frame that causes the reader to incorrectly
return a 0 (EOF) value.

- PIO completion should not reset the sg_pending_size field.
- The DMA offset detection code should be ignored for PIO transfers:

it somehow messes up the data on the card and is not needed anyway
for PIO.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ivtv/branches/0.10/driver/ivtv-irq.c

    r3988 r4003  
    172172 
    173173        /* if this is the start of the DMA then fill in the magic cookie */ 
    174         if (s->sg_pending_size == 0) { 
     174        if (s->sg_pending_size == 0 && ivtv_use_dma(s)) { 
    175175                if (itv->has_cx23415 && (s->type == IVTV_ENC_STREAM_TYPE_PCM || 
    176176                    s->type == IVTV_DEC_STREAM_TYPE_VBI)) { 
     
    259259                ivtv_buf_sync_for_cpu(s, buf); 
    260260 
    261                 if (x == 0) { 
     261                if (x == 0 && ivtv_use_dma(s)) { 
    262262                        offset = s->dma_last_offset; 
    263263                        if (u32buf[offset / 4] != DMA_MAGIC_COOKIE)  
     
    598598        s = &itv->streams[itv->cur_pio_stream]; 
    599599        IVTV_DEBUG_IRQ("ENC PIO COMPLETE %s\n", s->name); 
    600         s->sg_pending_size = 0; 
    601600        clear_bit(IVTV_F_I_PIO, &itv->i_flags); 
    602601        itv->cur_pio_stream = -1; 
     
    906905 
    907906        if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_DMA, &itv->i_flags)) { 
     907                itv->irq_rr_idx++; 
    908908                for (i = 0; i < IVTV_MAX_STREAMS; i++) { 
    909                         int idx = (i + itv->irq_rr_idx++) % IVTV_MAX_STREAMS; 
     909                        int idx = (i + itv->irq_rr_idx) % IVTV_MAX_STREAMS; 
    910910                        struct ivtv_stream *s = &itv->streams[idx]; 
    911911 
     
    924924 
    925925        if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_PIO, &itv->i_flags)) { 
     926                itv->irq_rr_idx++; 
    926927                for (i = 0; i < IVTV_MAX_STREAMS; i++) { 
    927                         int idx = (i + itv->irq_rr_idx++) % IVTV_MAX_STREAMS; 
     928                        int idx = (i + itv->irq_rr_idx) % IVTV_MAX_STREAMS; 
    928929                        struct ivtv_stream *s = &itv->streams[idx]; 
    929930 
  • ivtv/branches/0.10/driver/ivtv-vbi.c

    r3932 r4003  
    165165        } else { 
    166166                /* unknown VBI data stream */ 
    167                 return 0; 
     167                linemask[0] = linemask[1] = 0; 
    168168        } 
    169169        for (i = 0; i < 36; i++) {