[alsa-devel] [PATCH 112/112] ALSA: hda - Add a flag to suppress mic auto-switch

Takashi Iwai tiwai at suse.de
Tue Jan 8 12:39:45 CET 2013


Add a new flag spec->suppress_mic_auto_switch for codecs that don't
support unsol events properly like VT1708.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/hda/hda_generic.c | 3 +++
 sound/pci/hda/hda_generic.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index ba88be2..2e02094 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3032,6 +3032,9 @@ static int check_auto_mic_availability(struct hda_codec *codec)
 	unsigned int types;
 	int i, num_pins;
 
+	if (spec->suppress_auto_mic)
+		return 0;
+
 	types = 0;
 	num_pins = 0;
 	for (i = 0; i < cfg->num_inputs; i++) {
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 343195c..1763e33 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -175,6 +175,7 @@ struct hda_gen_spec {
 	unsigned int automute_speaker_possible:1; /* there are speakers and either LO or HP */
 	unsigned int automute_lo_possible:1;	  /* there are line outs and HP */
 	unsigned int keep_vref_in_automute:1; /* Don't clear VREF in automute */
+	unsigned int suppress_auto_mic:1; /* suppress input jack auto switch */
 	unsigned int line_in_auto_switch:1; /* allow line-in auto switch */
 
 	/* other flags */
-- 
1.8.0.1



More information about the Alsa-devel mailing list