Re: 2.6.12-rc3-mm3: ALSA broken ?

From: Takashi Iwai
Date: Tue May 17 2005 - 07:22:25 EST


At Tue, 17 May 2005 12:02:39 +0000,
J.A. Magallon wrote:
>
>
> On 05.13, Takashi Iwai wrote:
> > At Thu, 12 May 2005 22:27:16 +0000,
> > J.A. Magallon wrote:
> > >
> > > Just a note: I need also to uncheck the 'Center/LFE jack as mic'
> > > switch.
> >
> > Oh, it shouldn't be there :)
> > Try the patch below. I'll commit it to ALSA tree.
> >
> >
> > > And a question. The output level depends on the
> > > Line _input_ volume. Higher the volume, lower the output level on
> > > all channels.
> > > This happens only if I 'Spread Front to Sourround and Center/LFE'.
> > > Should not the line volume be useless if the jack is set for output ?
> > > Or does its meaning change then...
> >
> > Hmm, it's weird. I don't see the signal routing via line-in control
> > to outputs in AD1985 datasheet...
> >
> >
> > Takashi
> >
> >
> > --- linux/sound/pci/ac97/ac97_patch.c 11 May 2005 11:00:17 -0000 1.82
> > +++ linux/sound/pci/ac97/ac97_patch.c 13 May 2005 09:35:19 -0000
> > @@ -1598,7 +1598,6 @@
> > }
> >
> > static const snd_kcontrol_new_t snd_ac97_ad1985_controls[] = {
> > - AC97_SINGLE("Center/LFE Jack as Mic", AC97_AD_SERIAL_CFG, 9, 1, 0),
> > AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0)
> > };
> >
>
> If I apply this, the control disappears, but I can't get any sound in that
> ouput even if I put ALSA in 6ch mode. It seems it defaults to 'on', and
> the mode switch '2ch -> 4ch -> 6ch' does not touch it. So it does not look
> like a redundant control.
>
> Example: go into 4ch mode. Check this control. Then switch to 6ch mode.
> The Center jack has no sound (it should, shouldn't ?). Check it and voilà.
> It looks that the logic in the channel selection needs to set this flag also...

Yep, you're right. Try the patch below.


Takashi

--- linux/sound/pci/ac97/ac97_patch.c 13 May 2005 09:58:46 -0000 1.83
+++ linux/sound/pci/ac97/ac97_patch.c 17 May 2005 12:18:24 -0000
@@ -1526,13 +1526,8 @@
.get = snd_ac97_ad1888_downmix_get,
.put = snd_ac97_ad1888_downmix_put
},
-#if 0
- AC97_SINGLE("Surround Jack as Input", AC97_AD_MISC, 12, 1, 0),
- AC97_SINGLE("Center/LFE Jack as Input", AC97_AD_MISC, 11, 1, 0),
-#else
AC97_SURROUND_JACK_MODE_CTL,
AC97_CHANNEL_MODE_CTL,
-#endif
};

static int patch_ad1888_specific(ac97_t *ac97)
@@ -1601,6 +1596,18 @@
AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0)
};

+static void ad1985_update_jacks(ac97_t *ac97)
+{
+ /* shared Line-In */
+ snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 12,
+ is_shared_linein(ac97) ? 0 : 1 << 12);
+ /* shared Mic */
+ snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 11,
+ is_shared_micin(ac97) ? 0 : 1 << 11);
+ snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 9 << 11,
+ is_shared_micin(ac97) ? 0 : 9 << 11);
+}
+
static int patch_ad1985_specific(ac97_t *ac97)
{
int err;
@@ -1616,7 +1623,7 @@
#ifdef CONFIG_PM
.resume = ad18xx_resume,
#endif
- .update_jacks = ad1888_update_jacks,
+ .update_jacks = ad1985_update_jacks,
};

int patch_ad1985(ac97_t * ac97)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/