ALSA: hda/realtek - Remove non-standard automute mode
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Dec 2012 13:20:34 +0000 (14:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:30:04 +0000 (08:30 +0100)
We are using only AUTOMUTE_MODE_PIN in patch_realtek.c and all others
have been already dropped.  Let's remove the old superfluous codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index 18c4a78efbc77ff80b11ed9e8b0176062a1b6fc4..9046f1c216a1f9503ca642c53b44474d4ca67e75 100644 (file)
@@ -73,12 +73,6 @@ struct alc_multi_io {
        unsigned int ctl_in;    /* cached input-pin control value */
 };
 
-enum {
-       ALC_AUTOMUTE_PIN,       /* change the pin control */
-       ALC_AUTOMUTE_AMP,       /* mute/unmute the pin AMP */
-       ALC_AUTOMUTE_MIXER,     /* mute/unmute mixer widget AMP */
-};
-
 #define MAX_VOL_NIDS   0x40
 
 /* make compatible with old code */
@@ -542,7 +536,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins,
                        bool mute, bool hp_out)
 {
        struct alc_spec *spec = codec->spec;
-       unsigned int mute_bits = mute ? HDA_AMP_MUTE : 0;
        unsigned int pin_bits = mute ? 0 : (hp_out ? PIN_HP : PIN_OUT);
        int i;
 
@@ -551,34 +544,17 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins,
                unsigned int val;
                if (!nid)
                        break;
-               switch (spec->automute_mode) {
-               case ALC_AUTOMUTE_PIN:
-                       /* don't reset VREF value in case it's controlling
-                        * the amp (see alc861_fixup_asus_amp_vref_0f())
-                        */
-                       if (spec->keep_vref_in_automute) {
-                               val = snd_hda_codec_read(codec, nid, 0,
+               /* don't reset VREF value in case it's controlling
+                * the amp (see alc861_fixup_asus_amp_vref_0f())
+                */
+               if (spec->keep_vref_in_automute) {
+                       val = snd_hda_codec_read(codec, nid, 0,
                                        AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
-                               val &= ~PIN_HP;
-                       } else
-                               val = 0;
-                       val |= pin_bits;
-                       snd_hda_set_pin_ctl(codec, nid, val);
-                       break;
-               case ALC_AUTOMUTE_AMP:
-                       snd_hda_codec_amp_stereo(codec, nid, HDA_OUTPUT, 0,
-                                                HDA_AMP_MUTE, mute_bits);
-                       break;
-               case ALC_AUTOMUTE_MIXER:
-                       nid = spec->automute_mixer_nid[i];
-                       if (!nid)
-                               break;
-                       snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT, 0,
-                                                HDA_AMP_MUTE, mute_bits);
-                       snd_hda_codec_amp_stereo(codec, nid, HDA_INPUT, 1,
-                                                HDA_AMP_MUTE, mute_bits);
-                       break;
-               }
+                       val &= ~PIN_HP;
+               } else
+                       val = 0;
+               val |= pin_bits;
+               snd_hda_set_pin_ctl(codec, nid, val);
        }
 }
 
@@ -979,8 +955,6 @@ static int alc_init_automute(struct hda_codec *codec)
                cfg->hp_outs = cfg->line_outs;
        }
 
-       spec->automute_mode = ALC_AUTOMUTE_PIN;
-
        for (i = 0; i < cfg->hp_outs; i++) {
                hda_nid_t nid = cfg->hp_pins[i];
                if (!is_jack_detectable(codec, nid))