Skip to content

Commit

Permalink
ALSA: hda - do not add non-existing Mic boost controls
Browse files Browse the repository at this point in the history
If the input node does not have any volume capable input amp,
don't add such a control.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Jan 16, 2013
1 parent c0f3b21 commit 02aba55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 02aba55

Please sign in to comment.