if (dev->oss.dma_running) { 
if (dev->dmasound.dma_running) { 
int saa7134_set_dmabits(struct saa7134_dev *dev){	u32 split, task=0, ctrl=0, irq=0;	enum v4l2_field cap = V4L2_FIELD_ANY;	enum v4l2_field ov  = V4L2_FIELD_ANY;	assert_spin_locked(&dev->slock);	/* video capture -- dma 0 + video task A */	if (dev->video_q.curr) {		task |= 0x01;		ctrl |= SAA7134_MAIN_CTRL_TE0;		irq  |= SAA7134_IRQ1_INTE_RA0_1 |			SAA7134_IRQ1_INTE_RA0_0;		cap = dev->video_q.curr->vb.field;	}	/* video capture -- dma 1+2 (planar modes) */	if (dev->video_q.curr &&	    dev->video_q.curr->fmt->planar) {		ctrl |= SAA7134_MAIN_CTRL_TE4 |			SAA7134_MAIN_CTRL_TE5;	}	/* screen overlay -- dma 0 + video task B */	if (dev->ovenable) {		task |= 0x10;		ctrl |= SAA7134_MAIN_CTRL_TE1;		ov = dev->ovfield;	}	/* vbi capture -- dma 0 + vbi task A+B */	if (dev->vbi_q.curr) {		task |= 0x22;		ctrl |= SAA7134_MAIN_CTRL_TE2 |			SAA7134_MAIN_CTRL_TE3;		irq  |= SAA7134_IRQ1_INTE_RA0_7 |			SAA7134_IRQ1_INTE_RA0_6 |			SAA7134_IRQ1_INTE_RA0_5 |			SAA7134_IRQ1_INTE_RA0_4;	}	/* audio capture -- dma 3 */	if (dev->oss.dma_running) {		ctrl |= SAA7134_MAIN_CTRL_TE6;		irq  |= SAA7134_IRQ1_INTE_RA3_1 |			SAA7134_IRQ1_INTE_RA3_0;	}	/* TS capture -- dma 5 */	if (dev->ts_q.curr) {		ctrl |= SAA7134_MAIN_CTRL_TE5;		irq  |= SAA7134_IRQ1_INTE_RA2_3 |			SAA7134_IRQ1_INTE_RA2_2 |			SAA7134_IRQ1_INTE_RA2_1 |			SAA7134_IRQ1_INTE_RA2_0;	}	/* set task conditions + field handling */	if (V4L2_FIELD_HAS_BOTH(cap) || V4L2_FIELD_HAS_BOTH(ov) || cap == ov) {		/* default config -- use full frames */		saa_writeb(SAA7134_TASK_CONDITIONS(TASK_A), 0x0d);		saa_writeb(SAA7134_TASK_CONDITIONS(TASK_B), 0x0d);		saa_writeb(SAA7134_FIELD_HANDLING(TASK_A),  0x02);		saa_writeb(SAA7134_FIELD_HANDLING(TASK_B),  0x02);		split = 0;	} else {		/* split fields between tasks */		if (V4L2_FIELD_TOP == cap) {			/* odd A, even B, repeat */			saa_writeb(SAA7134_TASK_CONDITIONS(TASK_A), 0x0d);			saa_writeb(SAA7134_TASK_CONDITIONS(TASK_B), 0x0e);		} else {			/* odd B, even A, repeat */			saa_writeb(SAA7134_TASK_CONDITIONS(TASK_A), 0x0e);			saa_writeb(SAA7134_TASK_CONDITIONS(TASK_B), 0x0d);		}		saa_writeb(SAA7134_FIELD_HANDLING(TASK_A),  0x01);		saa_writeb(SAA7134_FIELD_HANDLING(TASK_B),  0x01);		split = 1;	}	/* irqs */	saa_writeb(SAA7134_REGION_ENABLE, task);	saa_writel(SAA7134_IRQ1,          irq);	saa_andorl(SAA7134_MAIN_CTRL,		   SAA7134_MAIN_CTRL_TE0 |		   SAA7134_MAIN_CTRL_TE1 |		   SAA7134_MAIN_CTRL_TE2 |		   SAA7134_MAIN_CTRL_TE3 |		   SAA7134_MAIN_CTRL_TE4 |		   SAA7134_MAIN_CTRL_TE5 |		   SAA7134_MAIN_CTRL_TE6,		   ctrl);	dprintk("dmabits: task=0x%02x ctrl=0x%02x irq=0x%x split=%s\n",		task, ctrl, irq, split ? "no" : "yes");	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b54134be53be720da423692665ec215eb14a678b/saa7134-core.c/buggy/drivers/media/video/saa7134/saa7134-core.c