diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-23 06:41:09 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-23 06:41:09 -0400 |
commit | 3c715a98844f72cec0fa3ef2b68232b8f751468b (patch) | |
tree | 3704fdfc17eb315e5c4801d327d1bc4d228269d8 /sound | |
parent | 675c1aa3c4a7290e537e854d0af7cdf9692bd396 (diff) |
ALSA: hda - Update jack-sense info even when no automute is set
The internal states, jack_present and line_jack_present should be
updated upon unsolicited events even if no automute is set.
Otherwise the wrong state is referred when the automute behavior is
changed by the mixer control.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0fefc1088d1..7cabd731716 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -565,11 +565,11 @@ static void alc_hp_automute(struct hda_codec *codec) | |||
565 | { | 565 | { |
566 | struct alc_spec *spec = codec->spec; | 566 | struct alc_spec *spec = codec->spec; |
567 | 567 | ||
568 | if (!spec->automute) | ||
569 | return; | ||
570 | spec->jack_present = | 568 | spec->jack_present = |
571 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | 569 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), |
572 | spec->autocfg.hp_pins); | 570 | spec->autocfg.hp_pins); |
571 | if (!spec->automute) | ||
572 | return; | ||
573 | update_speakers(codec); | 573 | update_speakers(codec); |
574 | } | 574 | } |
575 | 575 | ||
@@ -578,11 +578,11 @@ static void alc_line_automute(struct hda_codec *codec) | |||
578 | { | 578 | { |
579 | struct alc_spec *spec = codec->spec; | 579 | struct alc_spec *spec = codec->spec; |
580 | 580 | ||
581 | if (!spec->automute || !spec->detect_line) | ||
582 | return; | ||
583 | spec->line_jack_present = | 581 | spec->line_jack_present = |
584 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), | 582 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), |
585 | spec->autocfg.line_out_pins); | 583 | spec->autocfg.line_out_pins); |
584 | if (!spec->automute || !spec->detect_line) | ||
585 | return; | ||
586 | update_speakers(codec); | 586 | update_speakers(codec); |
587 | } | 587 | } |
588 | 588 | ||