[alsa-devel] Commit d6cc9fabd58f33e829a3182aa856db0d57c726ef breaks built-in mic on ASUS F6A
Hi,
I've found that internal doesn't work on kernel 3.1 while previous verison (3.0) is ok.
I've bisected it between v3.0 and v3.1 using "arecord -V mono" command. It wasn't easy because of NULL pointer dereference in patch_realtek.c that was fixed by 60a6a8425a84fa46a3831ce79197640b8224311b.
So during bisect I was applying applicable part of 60a6a84 for every attempt.
Finally I've found that commit d6cc9fabd58f33e829a3182aa856db0d57c726ef breaks it. It's parent works well and just applying it on top breaks internal mic on my laptop.
Unfortunately it's impossible to revert it on top of 3.1..
Alsa-info: 3.1 [working]: http://www.alsa-project.org/db/?f=0d7049d8892542ef89b7a3c40df2b1fd6b194282 3.0 [broken ]: http://www.alsa-project.org/db/?f=4792cc6c466c1dd5d01e2a80df1189ea5e34b83e_
Any ideas how to fix it?
commit d6cc9fabd58f33e829a3182aa856db0d57c726ef Author: Takashi Iwai <tiwai @ suse.de> Date: Wed Jul 6 16:38:42 2011 +0200
ALSA: hda - Parse ADCs and CAPSRCs dynamically for Realtek auto-parser
Now with the new code for looking for ADCs and MUXs, we can replace the whole ADC assignment with the parsed results.
Signed-off-by: Takashi Iwai tiwai@suse.de
-- WBR, Dmitry
At Mon, 21 Nov 2011 21:27:13 +0200, Dmitry Nezhevenko wrote:
Hi,
I've found that internal doesn't work on kernel 3.1 while previous verison (3.0) is ok.
This should have been already fixed in 3.1.1 kernel. Give it a try.
Takashi
On Mon, Nov 21, 2011 at 06:47:29PM +0100, Takashi Iwai wrote:
At Mon, 21 Nov 2011 21:27:13 +0200, Dmitry Nezhevenko wrote:
Hi,
I've found that internal doesn't work on kernel 3.1 while previous verison (3.0) is ok.
This should have been already fixed in 3.1.1 kernel. Give it a try.
Sorry. I've not mentioned it before. I'm on 3.1.1 now and still no luck. arecord just get silence and VU-meter display nothing.
Regards.
At Mon, 21 Nov 2011 20:38:16 +0200, Dmitry Nezhevenko wrote:
On Mon, Nov 21, 2011 at 06:47:29PM +0100, Takashi Iwai wrote:
At Mon, 21 Nov 2011 21:27:13 +0200, Dmitry Nezhevenko wrote:
Hi,
I've found that internal doesn't work on kernel 3.1 while previous verison (3.0) is ok.
This should have been already fixed in 3.1.1 kernel. Give it a try.
Sorry. I've not mentioned it before. I'm on 3.1.1 now and still no luck. arecord just get silence and VU-meter display nothing.
OK, then pass model=auto option to snd-hda-intel module (and adjust the mixer elements appropriately after that). It seems that the static model config got broken, and it's no longer needed. In 3.2 tree, these static setups have been already removed.
thanks,
Takashi
At Tue, 22 Nov 2011 08:02:44 +0100, Takashi Iwai wrote:
At Mon, 21 Nov 2011 20:38:16 +0200, Dmitry Nezhevenko wrote:
On Mon, Nov 21, 2011 at 06:47:29PM +0100, Takashi Iwai wrote:
At Mon, 21 Nov 2011 21:27:13 +0200, Dmitry Nezhevenko wrote:
Hi,
I've found that internal doesn't work on kernel 3.1 while previous verison (3.0) is ok.
This should have been already fixed in 3.1.1 kernel. Give it a try.
Sorry. I've not mentioned it before. I'm on 3.1.1 now and still no luck. arecord just get silence and VU-meter display nothing.
OK, then pass model=auto option to snd-hda-intel module (and adjust the mixer elements appropriately after that). It seems that the static model config got broken, and it's no longer needed. In 3.2 tree, these static setups have been already removed.
Alternatively, try the patch below. This will fix just the capture bug but anything else is untouched. If it's confirmed to work, I'll send it to stable kernel separately since this can't be applied to the upstream tree any longer.
thanks,
Takashi
--- diff --git a/sound/pci/hda/alc662_quirks.c b/sound/pci/hda/alc662_quirks.c index e69a6ea..e5ea997 100644 --- a/sound/pci/hda/alc662_quirks.c +++ b/sound/pci/hda/alc662_quirks.c @@ -1230,7 +1230,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE1] = { .mixers = { alc663_m51va_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_21jd_amic_init_verbs }, @@ -1246,7 +1245,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC662_ASUS_MODE2] = { .mixers = { alc662_1bjd_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc662_1bjd_amic_init_verbs }, @@ -1261,7 +1259,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE3] = { .mixers = { alc663_two_hp_m1_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_two_hp_amic_m1_init_verbs }, @@ -1277,7 +1274,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE4] = { .mixers = { alc663_asus_21jd_clfe_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_21jd_amic_init_verbs}, @@ -1293,7 +1289,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE5] = { .mixers = { alc663_asus_15jd_clfe_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_15jd_amic_init_verbs }, @@ -1309,7 +1304,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE6] = { .mixers = { alc663_two_hp_m2_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_two_hp_amic_m2_init_verbs }, @@ -1325,7 +1319,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE7] = { .mixers = { alc663_mode7_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_mode7_init_verbs }, @@ -1341,7 +1334,6 @@ static const struct alc_config_preset alc662_presets[] = { }, [ALC663_ASUS_MODE8] = { .mixers = { alc663_mode8_mixer }, - .cap_mixer = alc662_auto_capture_mixer, .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc663_mode8_init_verbs },
On Tue, Nov 22, 2011 at 08:09:24AM +0100, Takashi Iwai wrote:
OK, then pass model=auto option to snd-hda-intel module (and adjust the mixer elements appropriately after that). It seems that the static model config got broken, and it's no longer needed. In 3.2 tree, these static setups have been already removed.
This way works great on 3.1. Thanks.
Alternatively, try the patch below. This will fix just the capture bug but anything else is untouched. If it's confirmed to work, I'll send it to stable kernel separately since this can't be applied to the upstream tree any longer.
It doesn't work. Still produces noise but a bit louder.
At Tue, 22 Nov 2011 15:27:43 +0200, Dmitry Nezhevenko wrote:
On Tue, Nov 22, 2011 at 08:09:24AM +0100, Takashi Iwai wrote:
OK, then pass model=auto option to snd-hda-intel module (and adjust the mixer elements appropriately after that). It seems that the static model config got broken, and it's no longer needed. In 3.2 tree, these static setups have been already removed.
This way works great on 3.1. Thanks.
Alternatively, try the patch below. This will fix just the capture bug but anything else is untouched. If it's confirmed to work, I'll send it to stable kernel separately since this can't be applied to the upstream tree any longer.
It doesn't work. Still produces noise but a bit louder.
Then please give alsa-info.sh output with the patch (better run with --no-upload option and attach the output).
thanks,
Takashi
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;
On Tue, Nov 22, 2011 at 06:29:35PM +0100, Takashi Iwai wrote:
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.
It looks like now I'm more lucky. Two patches fixes my issue without model=auto.
Thanks a lot!.
participants (2)
-
Dmitry Nezhevenko
-
Takashi Iwai