[alsa-devel] Commit d6cc9fabd58f33e829a3182aa856db0d57c726ef breaks built-in mic on ASUS F6A
Takashi Iwai
tiwai at suse.de
Tue Nov 22 18:29:35 CET 2011
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;
More information about the Alsa-devel
mailing list