Commit b8a47c79 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek - Remove non-standard automute mode

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 280e57d5
...@@ -73,12 +73,6 @@ struct alc_multi_io { ...@@ -73,12 +73,6 @@ struct alc_multi_io {
unsigned int ctl_in; /* cached input-pin control value */ 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 #define MAX_VOL_NIDS 0x40
/* make compatible with old code */ /* make compatible with old code */
...@@ -542,7 +536,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins, ...@@ -542,7 +536,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins,
bool mute, bool hp_out) bool mute, bool hp_out)
{ {
struct alc_spec *spec = codec->spec; 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); unsigned int pin_bits = mute ? 0 : (hp_out ? PIN_HP : PIN_OUT);
int i; int i;
...@@ -551,8 +544,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins, ...@@ -551,8 +544,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins,
unsigned int val; unsigned int val;
if (!nid) if (!nid)
break; break;
switch (spec->automute_mode) {
case ALC_AUTOMUTE_PIN:
/* don't reset VREF value in case it's controlling /* don't reset VREF value in case it's controlling
* the amp (see alc861_fixup_asus_amp_vref_0f()) * the amp (see alc861_fixup_asus_amp_vref_0f())
*/ */
...@@ -564,21 +555,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins, ...@@ -564,21 +555,6 @@ static void do_automute(struct hda_codec *codec, int num_pins, hda_nid_t *pins,
val = 0; val = 0;
val |= pin_bits; val |= pin_bits;
snd_hda_set_pin_ctl(codec, nid, val); 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;
}
} }
} }
...@@ -979,8 +955,6 @@ static int alc_init_automute(struct hda_codec *codec) ...@@ -979,8 +955,6 @@ static int alc_init_automute(struct hda_codec *codec)
cfg->hp_outs = cfg->line_outs; cfg->hp_outs = cfg->line_outs;
} }
spec->automute_mode = ALC_AUTOMUTE_PIN;
for (i = 0; i < cfg->hp_outs; i++) { for (i = 0; i < cfg->hp_outs; i++) {
hda_nid_t nid = cfg->hp_pins[i]; hda_nid_t nid = cfg->hp_pins[i];
if (!is_jack_detectable(codec, nid)) if (!is_jack_detectable(codec, nid))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment