2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 06:04:14 +08:00

ALSA: hda - Record the current speaker / LO mute status in hda_gen_spec

... to be referred by the codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2013-01-16 18:18:00 +01:00
parent a5cc25091c
commit 47b9ddb83b
2 changed files with 4 additions and 0 deletions

View File

@ -3047,6 +3047,7 @@ void snd_hda_gen_update_outputs(struct hda_codec *codec)
else
on = spec->hp_jack_present | spec->line_jack_present;
on |= spec->master_mute;
spec->speaker_muted = on;
do_automute(codec, ARRAY_SIZE(spec->autocfg.speaker_pins),
spec->autocfg.speaker_pins, on);
@ -3060,6 +3061,7 @@ void snd_hda_gen_update_outputs(struct hda_codec *codec)
else
on = spec->hp_jack_present;
on |= spec->master_mute;
spec->line_out_muted = on;
do_automute(codec, ARRAY_SIZE(spec->autocfg.line_out_pins),
spec->autocfg.line_out_pins, on);
}

View File

@ -170,6 +170,8 @@ struct hda_gen_spec {
unsigned int auto_mic:1;
unsigned int automute_speaker:1; /* automute speaker outputs */
unsigned int automute_lo:1; /* automute LO outputs */
unsigned int speaker_muted:1; /* current status of speaker mute */
unsigned int line_out_muted:1; /* current status of LO mute */
unsigned int detect_hp:1; /* Headphone detection enabled */
unsigned int detect_lo:1; /* Line-out detection enabled */
unsigned int automute_speaker_possible:1; /* there are speakers and either LO or HP */