aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-16 12:18:00 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-16 12:19:50 -0500
commit47b9ddb83b719d35ca0a723410734951b04cf403 (patch)
tree46baba6e1999a3da0833f06d06474e1d5498e37e
parenta5cc25091c61bb8b4a4bb98207eeb7d0cf312e1c (diff)
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>
-rw-r--r--sound/pci/hda/hda_generic.c2
-rw-r--r--sound/pci/hda/hda_generic.h2
2 files changed, 4 insertions, 0 deletions
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)
3047 else 3047 else
3048 on = spec->hp_jack_present | spec->line_jack_present; 3048 on = spec->hp_jack_present | spec->line_jack_present;
3049 on |= spec->master_mute; 3049 on |= spec->master_mute;
3050 spec->speaker_muted = on;
3050 do_automute(codec, ARRAY_SIZE(spec->autocfg.speaker_pins), 3051 do_automute(codec, ARRAY_SIZE(spec->autocfg.speaker_pins),
3051 spec->autocfg.speaker_pins, on); 3052 spec->autocfg.speaker_pins, on);
3052 3053
@@ -3060,6 +3061,7 @@ void snd_hda_gen_update_outputs(struct hda_codec *codec)
3060 else 3061 else
3061 on = spec->hp_jack_present; 3062 on = spec->hp_jack_present;
3062 on |= spec->master_mute; 3063 on |= spec->master_mute;
3064 spec->line_out_muted = on;
3063 do_automute(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), 3065 do_automute(codec, ARRAY_SIZE(spec->autocfg.line_out_pins),
3064 spec->autocfg.line_out_pins, on); 3066 spec->autocfg.line_out_pins, on);
3065} 3067}
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 {
170 unsigned int auto_mic:1; 170 unsigned int auto_mic:1;
171 unsigned int automute_speaker:1; /* automute speaker outputs */ 171 unsigned int automute_speaker:1; /* automute speaker outputs */
172 unsigned int automute_lo:1; /* automute LO outputs */ 172 unsigned int automute_lo:1; /* automute LO outputs */
173 unsigned int speaker_muted:1; /* current status of speaker mute */
174 unsigned int line_out_muted:1; /* current status of LO mute */
173 unsigned int detect_hp:1; /* Headphone detection enabled */ 175 unsigned int detect_hp:1; /* Headphone detection enabled */
174 unsigned int detect_lo:1; /* Line-out detection enabled */ 176 unsigned int detect_lo:1; /* Line-out detection enabled */
175 unsigned int automute_speaker_possible:1; /* there are speakers and either LO or HP */ 177 unsigned int automute_speaker_possible:1; /* there are speakers and either LO or HP */