buf = list_entry(q->active.next,
                         struct cx88_buffer, list);
        v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
+       buf->vb.v4l2_buf.field = core->field;
+       buf->vb.v4l2_buf.sequence = q->count++;
        list_del(&buf->list);
        vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);
 }
 
 
        /* reset counter */
        cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET);
-       q->count = 1;
+       q->count = 0;
 
        /* enable irqs */
        dprintk( 1, "setting the interrupt mask\n" );
        dprintk(2,"restart_queue [%p/%d]: restart dma\n",
                buf, buf->vb.v4l2_buf.index);
        cx8802_start_dma(dev, q, buf);
-       list_for_each_entry(buf, &q->active, list)
-               buf->count = q->count++;
        return 0;
 }
 
        if (list_empty(&cx88q->active)) {
                dprintk( 1, "queue is empty - first active\n" );
                list_add_tail(&buf->list, &cx88q->active);
-               buf->count    = cx88q->count++;
                dprintk(1,"[%p/%d] %s - first active\n",
                        buf, buf->vb.v4l2_buf.index, __func__);
 
                dprintk( 1, "queue is not empty - append to active\n" );
                prev = list_entry(cx88q->active.prev, struct cx88_buffer, list);
                list_add_tail(&buf->list, &cx88q->active);
-               buf->count    = cx88q->count++;
                prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
                dprintk( 1, "[%p/%d] %s - append to active\n",
                        buf, buf->vb.v4l2_buf.index, __func__);
 
 
        /* reset counter */
        cx_write(MO_VBI_GPCNTRL, GP_COUNT_CONTROL_RESET);
-       q->count = 1;
+       q->count = 0;
 
        /* enable irqs */
        cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_VIDINT);
        dprintk(2,"restart_queue [%p/%d]: restart dma\n",
                buf, buf->vb.v4l2_buf.index);
        cx8800_start_vbi_dma(dev, q, buf);
-       list_for_each_entry(buf, &q->active, list)
-               buf->count = q->count++;
        return 0;
 }
 
        if (list_empty(&q->active)) {
                list_add_tail(&buf->list, &q->active);
                cx8800_start_vbi_dma(dev, q, buf);
-               buf->count    = q->count++;
                dprintk(2,"[%p/%d] vbi_queue - first active\n",
                        buf, buf->vb.v4l2_buf.index);
 
                buf->risc.cpu[0] |= cpu_to_le32(RISC_IRQ1);
                prev = list_entry(q->active.prev, struct cx88_buffer, list);
                list_add_tail(&buf->list, &q->active);
-               buf->count    = q->count++;
                prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
                dprintk(2,"[%p/%d] buffer_queue - append to active\n",
                        buf, buf->vb.v4l2_buf.index);
 
 
        /* reset counter */
        cx_write(MO_VIDY_GPCNTRL,GP_COUNT_CONTROL_RESET);
-       q->count = 1;
+       q->count = 0;
 
        /* enable irqs */
        cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_VIDINT);
                dprintk(2,"restart_queue [%p/%d]: restart dma\n",
                        buf, buf->vb.v4l2_buf.index);
                start_video_dma(dev, q, buf);
-               list_for_each_entry(buf, &q->active, list)
-                       buf->count = q->count++;
        }
        return 0;
 }
 
        if (list_empty(&q->active)) {
                list_add_tail(&buf->list, &q->active);
-               buf->count    = q->count++;
                dprintk(2,"[%p/%d] buffer_queue - first active\n",
                        buf, buf->vb.v4l2_buf.index);
 
                buf->risc.cpu[0] |= cpu_to_le32(RISC_IRQ1);
                prev = list_entry(q->active.prev, struct cx88_buffer, list);
                list_add_tail(&buf->list, &q->active);
-               buf->count    = q->count++;
                prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
                dprintk(2, "[%p/%d] buffer_queue - append to active\n",
                        buf, buf->vb.v4l2_buf.index);
                (f->fmt.pix.width * fmt->depth) >> 3;
        f->fmt.pix.sizeimage =
                f->fmt.pix.height * f->fmt.pix.bytesperline;
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
 
        return 0;
 }
 
        /* cx88 specific */
        unsigned int           bpl;
        struct cx88_riscmem    risc;
-       u32                    count;
 };
 
 struct cx88_dmaqueue {