/* ac97_set_ctrl() set values for ac97 mute and volume  */
static int ac97_set_ctrl(struct em28xx *dev, const struct v4l2_control *ctrl)
/* ac97_set_ctrl() set values for ac97 mute and volume  */
static int ac97_set_ctrl(struct em28xx *dev, const struct v4l2_control *ctrl)
{
	int i;
	for (i = 0; i < ARRAY_SIZE(ac97_qctrl); i++)
		if (ctrl->id == ac97_qctrl[i].id)
			goto handle;
	return 1;
handle:
	if (ctrl->value < ac97_qctrl[i].minimum ||
	    ctrl->value > ac97_qctrl[i].maximum)
		return -ERANGE;
	switch (ctrl->id) {
	case V4L2_CID_AUDIO_MUTE:
		dev->mute = ctrl->value;
		break;
	case V4L2_CID_AUDIO_VOLUME:
		dev->volume = ctrl->value;
		break;
	}
	return em28xx_audio_analog_set(dev);
}