aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-23 09:58:40 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-23 10:05:37 -0500
commit31614bb89b102570367fc7428dc029b8d7fc615a (patch)
treee242542ee9a3ed4c3aa6c56e946ed88479215738 /sound/pci/hda/hda_codec.c
parent42c364ace52ae6b4699105b39f2559c256b6cd4c (diff)
ALSA: hda - Fix inconsistent pin states after resume
The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a module parameter] introduced the polling jack detection code, but it also moved the call of snd_hda_jack_set_dirty_all() in the resume path after resume/init ops call. This caused a regression when the jack state has been changed during power-down (e.g. in the power save mode). Since the driver doesn't probe the new jack state but keeps using the cached value due to no dirty flag, the pin state remains also as if the jack is still plugged. The fix is simply moving snd_hda_jack_set_dirty_all() to the original position. Reported-by: Manolo Díaz <diaz.manolo@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b8fb0a5adb9b..822df971972c 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3654,6 +3654,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
3654 hda_set_power_state(codec, AC_PWRST_D0); 3654 hda_set_power_state(codec, AC_PWRST_D0);
3655 restore_shutup_pins(codec); 3655 restore_shutup_pins(codec);
3656 hda_exec_init_verbs(codec); 3656 hda_exec_init_verbs(codec);
3657 snd_hda_jack_set_dirty_all(codec);
3657 if (codec->patch_ops.resume) 3658 if (codec->patch_ops.resume)
3658 codec->patch_ops.resume(codec); 3659 codec->patch_ops.resume(codec);
3659 else { 3660 else {
@@ -3665,10 +3666,8 @@ static void hda_call_codec_resume(struct hda_codec *codec)
3665 3666
3666 if (codec->jackpoll_interval) 3667 if (codec->jackpoll_interval)
3667 hda_jackpoll_work(&codec->jackpoll_work.work); 3668 hda_jackpoll_work(&codec->jackpoll_work.work);
3668 else { 3669 else
3669 snd_hda_jack_set_dirty_all(codec);
3670 snd_hda_jack_report_sync(codec); 3670 snd_hda_jack_report_sync(codec);
3671 }
3672 3671
3673 codec->in_pm = 0; 3672 codec->in_pm = 0;
3674 snd_hda_power_down(codec); /* flag down before returning */ 3673 snd_hda_power_down(codec); /* flag down before returning */