From 64b3906d7bdaeec4563f67e101d5ec67b2fef8a5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 21 Jun 2011 12:57:22 +0200 Subject: [PATCH] --- yaml --- r: 257705 b: refs/heads/master c: 1e11cae143e4c0a4fc77fe532e18c550d63ab02d h: refs/heads/master i: 257703: 19d9c040e6d5982d4381c339b050a34888e19b36 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_via.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0376c6236464..60a879318872 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f98c24b807f024d42cf743897e2c1d95ff1e8be +refs/heads/master: 1e11cae143e4c0a4fc77fe532e18c550d63ab02d diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 785f7f5022a4..b67a5768a9de 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -1875,6 +1875,7 @@ static int via_auto_create_analog_input_ctls(struct hda_codec *codec, struct via_spec *spec = codec->spec; struct hda_input_mux *imux = &spec->private_imux[0]; int i, j, err, idx, idx2, type, type_idx = 0; + const char *prev_label = NULL; hda_nid_t cap_nid; hda_nid_t pin_idxs[8]; int num_idxs; @@ -1908,11 +1909,12 @@ static int via_auto_create_analog_input_ctls(struct hda_codec *codec, break; if (idx >= num_idxs) continue; - if (i > 0 && type == cfg->inputs[i - 1].type) + label = hda_get_autocfg_input_label(codec, cfg, i); + if (prev_label && !strcmp(label, prev_label)) type_idx++; else type_idx = 0; - label = hda_get_autocfg_input_label(codec, cfg, i); + prev_label = label; idx2 = get_connection_index(codec, spec->aa_mix_nid, pin_idxs[idx]); if (idx2 >= 0) {