audcom(av7110, AUDIO_CMD_MONO_L); if (av7110->adac_type == DVB_ADAC_CRYSTAL) i2c_writereg(av7110, 0x20, 0x02, 0x4a); 
ret = audcom(av7110, AUDIO_CMD_MONO_L); if (!ret) if (av7110->adac_type == DVB_ADAC_CRYSTAL) i2c_writereg(av7110, 0x20, 0x02, 0x4a); 
static int dvb_audio_ioctl(struct inode *inode, struct file *file,			   unsigned int cmd, void *parg){	struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;	unsigned long arg = (unsigned long) parg;	int ret = 0;	dprintk(2, "av7110:%p, \n", av7110);	if (((file->f_flags & O_ACCMODE) == O_RDONLY) &&	    (cmd != AUDIO_GET_STATUS))		return -EPERM;	switch (cmd) {	case AUDIO_STOP:		if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)			av7110_av_stop(av7110, RP_AUDIO);		else			audcom(av7110, AUDIO_CMD_MUTE);		av7110->audiostate.play_state = AUDIO_STOPPED;		break;	case AUDIO_PLAY:		if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)			av7110_av_start_play(av7110, RP_AUDIO);		audcom(av7110, AUDIO_CMD_UNMUTE);		av7110->audiostate.play_state = AUDIO_PLAYING;		break;	case AUDIO_PAUSE:		audcom(av7110, AUDIO_CMD_MUTE);		av7110->audiostate.play_state = AUDIO_PAUSED;		break;	case AUDIO_CONTINUE:		if (av7110->audiostate.play_state == AUDIO_PAUSED) {			av7110->audiostate.play_state = AUDIO_PLAYING;			audcom(av7110, AUDIO_CMD_UNMUTE | AUDIO_CMD_PCM16);		}		break;	case AUDIO_SELECT_SOURCE:		av7110->audiostate.stream_source = (audio_stream_source_t) arg;		break;	case AUDIO_SET_MUTE:	{		audcom(av7110, arg ? AUDIO_CMD_MUTE : AUDIO_CMD_UNMUTE);		av7110->audiostate.mute_state = (int) arg;		break;	}	case AUDIO_SET_AV_SYNC:		av7110->audiostate.AV_sync_state = (int) arg;		audcom(av7110, arg ? AUDIO_CMD_SYNC_ON : AUDIO_CMD_SYNC_OFF);		break;	case AUDIO_SET_BYPASS_MODE:		ret = -EINVAL;		break;	case AUDIO_CHANNEL_SELECT:		av7110->audiostate.channel_select = (audio_channel_select_t) arg;		switch(av7110->audiostate.channel_select) {		case AUDIO_STEREO:			audcom(av7110, AUDIO_CMD_STEREO);			if (av7110->adac_type == DVB_ADAC_CRYSTAL)				i2c_writereg(av7110, 0x20, 0x02, 0x49);			break;		case AUDIO_MONO_LEFT:			audcom(av7110, AUDIO_CMD_MONO_L);			if (av7110->adac_type == DVB_ADAC_CRYSTAL)				i2c_writereg(av7110, 0x20, 0x02, 0x4a);			break;		case AUDIO_MONO_RIGHT:			audcom(av7110, AUDIO_CMD_MONO_R);			if (av7110->adac_type == DVB_ADAC_CRYSTAL)				i2c_writereg(av7110, 0x20, 0x02, 0x45);			break;		default:			ret = -EINVAL;			break;		}		break;	case AUDIO_GET_STATUS:		memcpy(parg, &av7110->audiostate, sizeof(struct audio_status));		break;	case AUDIO_GET_CAPABILITIES:		*(int *)parg = AUDIO_CAP_LPCM | AUDIO_CAP_MP1 | AUDIO_CAP_MP2;		break;	case AUDIO_CLEAR_BUFFER:		dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);		av7110_ipack_reset(&av7110->ipack[0]);		if (av7110->playing == RP_AV)			av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,			       __Play, 2, AV_PES, 0);		break;	case AUDIO_SET_ID:		break;	case AUDIO_SET_MIXER:	{		struct audio_mixer *amix = (struct audio_mixer *)parg;		av7110_set_volume(av7110, amix->volume_left, amix->volume_right);		break;	}	case AUDIO_SET_STREAMTYPE:		break;	default:		ret = -ENOIOCTLCMD;	}	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ce18a223607b0e8cc9a8375abc64281a13ac423c/av7110_av.c/clean/drivers/media/dvb/ttpci/av7110_av.c