summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-16 18:20:07 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-16 18:22:37 +0100
commitf72706be354b35fa3ccdfd64fe609bde4435e12b (patch)
tree37cba72d6dd8715481663e2c403d08f18d4249a2 /sound/pci/hda/hda_generic.c
parent47b9ddb83b719d35ca0a723410734951b04cf403 (diff)
ALSA: hda - Add suppress_auto_mute flag to hda_gen_spec
A new flag to skip the auto-mute handling in the generic parser, just like suppress_auto_mic flag. It has to be set before calling snd_hda_gen_parse_auto_config(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 186a5546fcb..1ea9c2dad95 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -119,6 +119,9 @@ static void parse_user_hints(struct hda_codec *codec)
if (val >= 0)
codec->single_adc_amp = !!val;
+ val = snd_hda_get_bool_hint(codec, "auto_mute");
+ if (val >= 0)
+ spec->suppress_auto_mute = !val;
val = snd_hda_get_bool_hint(codec, "auto_mic");
if (val >= 0)
spec->suppress_auto_mic = !val;
@@ -3253,6 +3256,9 @@ static int check_auto_mute_availability(struct hda_codec *codec)
int present = 0;
int i, err;
+ if (spec->suppress_auto_mute)
+ return 0;
+
if (cfg->hp_pins[0])
present++;
if (cfg->line_out_pins[0])