From: Takashi Iwai Date: Wed, 16 Jan 2013 17:18:00 +0000 (+0100) Subject: ALSA: hda - Record the current speaker / LO mute status in hda_gen_spec X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47b9ddb83b719d35ca0a723410734951b04cf403;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 0d6c4f7c1c85..186a5546fcb8 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -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); } diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 6ba580540081..d4abf87c969f 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -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 */