I am using a ESS Allegro card (maestro3 driver). I could not use the input 
(mic), because its volume could not be set by the AC'97 mixer.
I just found that the hw has a 5-bit setting, while the alsa AC'97 code only 
used 4 bits. It was easy enough for me to change that to 5-bits and make my 
mic work.

The questions are: does anybody else have trouble in setting the mic-in 
volume?
Should we make that volume 5-bit (it will only look buggy to 4-bit hw, but 
will work for both)?
If not, is there any way to have the card driver (i.e. maestro3 etc.) tell 
the mixer what to use?

The patch is:
--- ac97_codec.c	Fri Jun 21 16:09:15 2002
+++ /usr/src/linux/sound/pci/ac97/ac97_codec.c	Sun Jun 16 21:56:00 2002
@@ -579,7 +579,7 @@
 
 static const snd_kcontrol_new_t snd_ac97_controls_mic[3] = {
 AC97_SINGLE("Mic Playback Switch", AC97_MIC, 15, 1, 1),
-AC97_SINGLE("Mic Playback Volume", AC97_MIC, 0, 15, 1),
+AC97_SINGLE("Mic Playback Volume", AC97_MIC, 0, 31, 1),
 AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0)
 };
 
@@ -1137,7 +1137,7 @@
 	for (idx = 0; idx < 3; idx++)
 		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0)
 			return err;
-	snd_ac97_write_cache(ac97, AC97_MIC, 0x801f);
+	snd_ac97_write_cache(ac97, AC97_MIC, 0x805f);
 
 	/* build Line controls */
 	for (idx = 0; idx < 2; idx++)

Reply via email to