From: Takashi Iwai Date: Thu, 23 Dec 2010 09:16:05 +0000 (+0100) Subject: ALSA: hda - Fix conflict of d-mic capture volume controls X-Git-Tag: upstream/snapshot3+hdmi~12174^2~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d7ec12b902ae00920cee50d98757376b2fa9467;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: hda - Fix conflict of d-mic capture volume controls When the d-mics are assigned to the same purpose of another analog mic pins, the driver doesn't compute the index properly, resulting in an error with "existing control". This patch fixes it. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index efa4225..f03b2ff 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3481,6 +3481,8 @@ static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec, label = hda_get_input_pin_label(codec, nid, 1); snd_hda_add_imux_item(dimux, label, index, &type_idx); + if (snd_hda_get_bool_hint(codec, "separate_dmux") != 1) + snd_hda_add_imux_item(imux, label, index, &type_idx); err = create_elem_capture_vol(codec, nid, label, type_idx, HDA_INPUT); @@ -3492,9 +3494,6 @@ static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec, if (err < 0) return err; } - - if (snd_hda_get_bool_hint(codec, "separate_dmux") != 1) - snd_hda_add_imux_item(imux, label, index, NULL); } return 0;