/* create a mute-switch and a volume for normal stereo/mono controls  */
static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, int reg, int check_stereo, int check_amix, struct snd_ac97 *ac97)
/* create a mute-switch and a volume for normal stereo/mono controls  */
static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, int reg, int check_stereo, int check_amix, struct snd_ac97 *ac97)
{
	int err;
	char name[44];
	unsigned char lo_max, hi_max;
	if (! snd_ac97_valid_reg(ac97, reg))
		return 0;
	if (snd_ac97_try_bit(ac97, reg, 15)) {
		sprintf(name, "%s Switch", pfx);
		if ((err = snd_ac97_cmute_new_stereo(card, name, reg,
						     check_stereo, check_amix,
						     ac97)) < 0)
			return err;
	}
	check_volume_resolution(ac97, reg, &lo_max, &hi_max);
	if (lo_max) {
		sprintf(name, "%s Volume", pfx);
		if ((err = snd_ac97_cvol_new(card, name, reg, lo_max, hi_max, ac97)) < 0)
			return err;
	}
	return 0;
}