From: David Henningsson Date: Wed, 16 Jan 2013 14:58:43 +0000 (+0100) Subject: ALSA: hda - do not add non-existing Mic boost controls X-Git-Tag: upstream/snapshot3+hdmi~5621^2~77^2~38^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02aba550537a666b8d09346f39d6372c78b115a5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: hda - do not add non-existing Mic boost controls If the input node does not have any volume capable input amp, don't add such a control. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index c33e019..05dfeb7 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -2826,6 +2826,9 @@ static int parse_mic_boost(struct hda_codec *codec) struct nid_path *path; unsigned int val; + if (!nid_has_volume(codec, nid, HDA_INPUT)) + continue; + label = hda_get_autocfg_input_label(codec, cfg, i); if (prev_label && !strcmp(label, prev_label)) type_idx++;