]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ALSA: hda - Add suppress_auto_mute flag to hda_gen_spec
authorTakashi Iwai <tiwai@suse.de>
Wed, 16 Jan 2013 17:20:07 +0000 (18:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 16 Jan 2013 17:22:37 +0000 (18:22 +0100)
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>
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_generic.h

index 186a5546fcb8cd6f45235785b91b020cb73687d8..1ea9c2dad95006fd392fa9c120236f6b94371313 100644 (file)
@@ -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])
index d4abf87c969f97e88616a7882842fa88abc0949d..59d08c60ac47fe815240cd04045cf773d6a09aa4 100644 (file)
@@ -177,6 +177,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_mute:1; /* suppress input jack auto mute */
        unsigned int suppress_auto_mic:1; /* suppress input jack auto switch */
        unsigned int line_in_auto_switch:1; /* allow line-in auto switch */