From: Takashi Iwai Subject: Re: Commit d6cc9fabd58f33e829a3182aa856db0d57c726ef breaks built-in mic on ASUS F6A Date: Tue, 22 Nov 2011 18:29:35 +0100 Message-ID: References: <20111121192713.GA3677@laptop.local> <20111121183816.GA23354@laptop.local> <20111122132743.GA4514@laptop.local> <20111122142736.GA29369@castle.dion.org.ua> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id AAAE2103835 for ; Tue, 22 Nov 2011 18:29:36 +0100 (CET) In-Reply-To: <20111122142736.GA29369@castle.dion.org.ua> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Dmitry Nezhevenko Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 22 Nov 2011 16:27:37 +0200, Dmitry Nezhevenko wrote: > > On Tue, Nov 22, 2011 at 02:29:39PM +0100, Takashi Iwai wrote: > > > > Then please give alsa-info.sh output with the patch (better run with > > --no-upload option and attach the output). > > Attaching it (snd_hda_intel was loaded without any parameters) Thanks. I found another bug that happens almost only with static configs. Try the patch below in addition to the previous one. Takashi --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 14feecf..6ab92fe 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1071,8 +1071,20 @@ static bool alc_rebuild_imux_for_auto_mic(struct hda_codec *codec) spec->imux_pins[2] = spec->dock_mic_pin; for (i = 0; i < 3; i++) { strcpy(imux->items[i].label, texts[i]); - if (spec->imux_pins[i]) + if (spec->imux_pins[i]) { + hda_nid_t pin = spec->imux_pins[i]; + int c; + for (c = 0; c < spec->num_adc_nids; c++) { + hda_nid_t cap = spec->capsrc_nids ? + spec->capsrc_nids[c] : spec->adc_nids[c]; + int idx = get_connection_index(codec, cap, pin); + if (idx >= 0) { + imux->items[i].index = idx; + break; + } + } imux->num_items = i + 1; + } } spec->num_mux_defs = 1; spec->input_mux = imux;