if (32000 != dev->oss.rate) 
if (32000 != dev->dmasound.rate) 
static int mixer_ioctl(struct inode *inode, struct file *file,		     unsigned int cmd, unsigned long arg){	struct saa7134_dev *dev = file->private_data;	enum saa7134_audio_in input;	int val,ret;	void __user *argp = (void __user *) arg;	int __user *p = argp;	if (oss_debug > 1)		saa7134_print_ioctl(dev->name,cmd);	switch (cmd) {	case OSS_GETVERSION:		return put_user(SOUND_VERSION, p);	case SOUND_MIXER_INFO:	{		mixer_info info;		memset(&info,0,sizeof(info));		strlcpy(info.id,   "TV audio", sizeof(info.id));		strlcpy(info.name, dev->name,  sizeof(info.name));		info.modify_counter = dev->oss.count;		if (copy_to_user(argp, &info, sizeof(info)))			return -EFAULT;		return 0;	}	case SOUND_OLD_MIXER_INFO:	{		_old_mixer_info info;		memset(&info,0,sizeof(info));		strlcpy(info.id,   "TV audio", sizeof(info.id));		strlcpy(info.name, dev->name,  sizeof(info.name));		if (copy_to_user(argp, &info, sizeof(info)))			return -EFAULT;		return 0;	}	case MIXER_READ(SOUND_MIXER_CAPS):		return put_user(SOUND_CAP_EXCL_INPUT, p);	case MIXER_READ(SOUND_MIXER_STEREODEVS):		return put_user(0, p);	case MIXER_READ(SOUND_MIXER_RECMASK):	case MIXER_READ(SOUND_MIXER_DEVMASK):		val = SOUND_MASK_LINE1 | SOUND_MASK_LINE2;		if (32000 == dev->oss.rate)			val |= SOUND_MASK_VIDEO;		return put_user(val, p);	case MIXER_WRITE(SOUND_MIXER_RECSRC):		if (get_user(val, p))			return -EFAULT;		input = dev->oss.input;		if (32000 == dev->oss.rate  &&		    val & SOUND_MASK_VIDEO  &&  dev->oss.input != TV)			input = TV;		if (val & SOUND_MASK_LINE1  &&  dev->oss.input != LINE1)			input = LINE1;		if (val & SOUND_MASK_LINE2  &&  dev->oss.input != LINE2)			input = LINE2;		if (input != dev->oss.input)			mixer_recsrc(dev,input);		/* fall throuth */	case MIXER_READ(SOUND_MIXER_RECSRC):		switch (dev->oss.input) {		case TV:    ret = SOUND_MASK_VIDEO; break;		case LINE1: ret = SOUND_MASK_LINE1; break;		case LINE2: ret = SOUND_MASK_LINE2; break;		default:    ret = 0;		}		return put_user(ret, p);	case MIXER_WRITE(SOUND_MIXER_VIDEO):	case MIXER_READ(SOUND_MIXER_VIDEO):		if (32000 != dev->oss.rate)			return -EINVAL;		return put_user(100 | 100 << 8, p);	case MIXER_WRITE(SOUND_MIXER_LINE1):		if (get_user(val, p))			return -EFAULT;		val &= 0xff;		val = (val <= 50) ? 50 : 100;		dev->oss.line1 = val;		mixer_level(dev,LINE1,dev->oss.line1);		/* fall throuth */	case MIXER_READ(SOUND_MIXER_LINE1):		return put_user(dev->oss.line1 | dev->oss.line1 << 8, p);	case MIXER_WRITE(SOUND_MIXER_LINE2):		if (get_user(val, p))			return -EFAULT;		val &= 0xff;		val = (val <= 50) ? 50 : 100;		dev->oss.line2 = val;		mixer_level(dev,LINE2,dev->oss.line2);		/* fall throuth */	case MIXER_READ(SOUND_MIXER_LINE2):		return put_user(dev->oss.line2 | dev->oss.line2 << 8, p);	default:		return -EINVAL;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b54134be53be720da423692665ec215eb14a678b/saa7134-oss.c/buggy/drivers/media/video/saa7134/saa7134-oss.c