[alsa-devel] [PATCH 1/3] ALSA: hda - do not add non-existing Mic boost controls

David Henningsson david.henningsson at canonical.com
Wed Jan 16 15:58:43 CET 2013


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 at canonical.com>
---
 sound/pci/hda/hda_generic.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 3ef38da..72325a9 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2820,6 +2820,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++;
-- 
1.7.9.5



More information about the Alsa-devel mailing list