All of lore.kernel.org
 help / color / mirror / Atom feed
* Suggestion: make Mic vol 5-bit
@ 2002-06-21 13:10 P. Christeas
  2002-06-21 13:40 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: P. Christeas @ 2002-06-21 13:10 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

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:

[-- Attachment #2: ac97_patch.diff --]
[-- Type: text/x-diff, Size: 744 bytes --]

--- 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++)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suggestion: make Mic vol 5-bit
  2002-06-21 13:10 Suggestion: make Mic vol 5-bit P. Christeas
@ 2002-06-21 13:40 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2002-06-21 13:40 UTC (permalink / raw)
  To: P. Christeas; +Cc: alsa-devel

Hi,

At Fri, 21 Jun 2002 16:10:20 +0300,
P. Christeas <p_christ@hol.gr> wrote:
> 
> 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?

in 0.9.0rc2 there is already a code to change the bits of mic/phone
volumes.  please check whether it works for you.


Takashi


-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-21 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-21 13:10 Suggestion: make Mic vol 5-bit P. Christeas
2002-06-21 13:40 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.