Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261413AbVEQMUg (ORCPT ); Tue, 17 May 2005 08:20:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261409AbVEQMUg (ORCPT ); Tue, 17 May 2005 08:20:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56980 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S261413AbVEQMUP (ORCPT ); Tue, 17 May 2005 08:20:15 -0400 Date: Tue, 17 May 2005 14:20:12 +0200 Message-ID: From: Takashi Iwai To: "J.A. Magallon" Cc: linux-kernel@vger.kernel.org Subject: Re: 2.6.12-rc3-mm3: ALSA broken ? In-Reply-To: <1116331359l.7364l.0l@werewolf.able.es> References: <20050504221057.1e02a402.akpm@osdl.org> <1115510869l.7472l.0l@werewolf.able.es> <1115594680l.7540l.0l@werewolf.able.es> <1115936836l.8448l.1l@werewolf.able.es> <1116331359l.7364l.0l@werewolf.able.es> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3293 Lines: 103 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/