Commit 1daf5f46 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - More line-out auto-mute support for Realtek

Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1a1455de
...@@ -1517,16 +1517,19 @@ static void alc_init_auto_hp(struct hda_codec *codec) ...@@ -1517,16 +1517,19 @@ static void alc_init_auto_hp(struct hda_codec *codec)
{ {
struct alc_spec *spec = codec->spec; struct alc_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg; struct auto_pin_cfg *cfg = &spec->autocfg;
int present = 0;
int i; int i;
if (!cfg->hp_pins[0]) { if (cfg->hp_pins[0])
if (cfg->line_out_type != AUTO_PIN_HP_OUT) present++;
return; if (cfg->line_out_pins[0])
} present++;
if (cfg->speaker_pins[0])
present++;
if (present < 2) /* need two different output types */
return;
if (!cfg->speaker_pins[0]) { if (!cfg->speaker_pins[0]) {
if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT)
return;
memcpy(cfg->speaker_pins, cfg->line_out_pins, memcpy(cfg->speaker_pins, cfg->line_out_pins,
sizeof(cfg->speaker_pins)); sizeof(cfg->speaker_pins));
cfg->speaker_outs = cfg->line_outs; cfg->speaker_outs = cfg->line_outs;
......
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