SAA7134_RS_CONTROL_ME | (buf->pt->dma >> 12); 
SAA7134_RS_CONTROL_ME | (buf->pt->dma >> 12); 
static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,			  enum v4l2_field field){	struct saa7134_dev *dev = q->priv_data;	struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);	unsigned int lines, llength, size;	u32 control;	int err;	dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);	llength = TS_PACKET_SIZE;	lines = dev->ts.nr_packets;	size = lines * llength;	if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)		return -EINVAL;	if (buf->vb.size != size) {		saa7134_dma_free(dev,buf);	}	if (STATE_NEEDS_INIT == buf->vb.state) {		buf->vb.width  = llength;		buf->vb.height = lines;		buf->vb.size   = size;		buf->pt        = &dev->ts.pt_ts;		err = videobuf_iolock(dev->pci,&buf->vb,NULL);		if (err)			goto oops;		err = saa7134_pgtable_build(dev->pci,buf->pt,					    buf->vb.dma.sglist,					    buf->vb.dma.sglen,					    saa7134_buffer_startpage(buf));		if (err)			goto oops;	}	/* dma: setup channel 5 (= TS) */	control = SAA7134_RS_CONTROL_BURST_16 |	          SAA7134_RS_CONTROL_ME |	          (buf->pt->dma >> 12);	saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));	saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));	saa_writeb(SAA7134_TS_DMA2, ((((lines-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */	saa_writel(SAA7134_RS_PITCH(5),TS_PACKET_SIZE);	saa_writel(SAA7134_RS_CONTROL(5),control);	buf->vb.state = STATE_PREPARED;	buf->activate = buffer_activate;	buf->vb.field = field;	return 0; oops:	saa7134_dma_free(dev,buf);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/saa7134-ts.c/clean/drivers/media/video/saa7134/saa7134-ts.c