dprintk(1, "switching to analog TV\n"); msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); 
static int av7110_dvb_c_switch(struct saa7146_fh *fh){	struct saa7146_dev *dev = fh->dev;	struct saa7146_vv *vv = dev->vv_data;	struct av7110 *av7110 = (struct av7110*)dev->ext_priv;	u16 adswitch;	int source, sync, err;	dprintk(4, "%p\n", av7110);	if ((vv->video_status & STATUS_OVERLAY) != 0) {		vv->ov_suspend = vv->video_fh;		err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL */		if (err != 0) {			dprintk(2, "suspending video failed\n");			vv->ov_suspend = NULL;		}	}	if (0 != av7110->current_input) {		adswitch = 1;		source = SAA7146_HPS_SOURCE_PORT_B;		sync = SAA7146_HPS_SYNC_PORT_B;		memcpy(standard, analog_standard, sizeof(struct saa7146_standard) * 2);		dprintk(1, "switching to analog TV\n");		msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source		msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source		msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source		msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono		msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone		msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume		if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) {			if (ves1820_writereg(dev, 0x09, 0x0f, 0x60))				dprintk(1, "setting band in demodulator failed.\n");		} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {			saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD)			saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF)		}	} else {		adswitch = 0;		source = SAA7146_HPS_SOURCE_PORT_A;		sync = SAA7146_HPS_SYNC_PORT_A;		memcpy(standard, dvb_standard, sizeof(struct saa7146_standard) * 2);		dprintk(1, "switching DVB mode\n");		msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source		msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source		msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source		msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono		msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone		msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume		if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) {			if (ves1820_writereg(dev, 0x09, 0x0f, 0x20))				dprintk(1, "setting band in demodulator failed.\n");		} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {			saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)			saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)		}	}	/* hmm, this does not do anything!? */	if (av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch))		dprintk(1, "ADSwitch error\n");	saa7146_set_hps_source_and_sync(dev, source, sync);	if (vv->ov_suspend != NULL) {		saa7146_start_preview(vv->ov_suspend);		vv->ov_suspend = NULL;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f63f5346c943008fe8f6ac66a9026f6c35e24947/av7110_v4l.c/buggy/drivers/media/dvb/ttpci/av7110_v4l.c