Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332185
b: refs/heads/master
c: d17344b
h: refs/heads/master
i:
  332183: cf9f58d
v: v3
  • Loading branch information
Dylan Reid authored and Takashi Iwai committed Oct 6, 2012
1 parent 24db6df commit 971795e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 395d9dd5dd13c6aa3c8c61a31126af98cd1e747d
refs/heads/master: d17344b3547669f5b6ee4fda993d03737a141bd6
10 changes: 6 additions & 4 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -3612,15 +3612,17 @@ static inline void hda_exec_init_verbs(struct hda_codec *codec) {}
* call suspend and power-down; used both from PM and power-save
* this function returns the power state in the end
*/
static unsigned int hda_call_codec_suspend(struct hda_codec *codec)
static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq)
{
unsigned int state;

if (codec->patch_ops.suspend)
codec->patch_ops.suspend(codec);
hda_cleanup_all_streams(codec);
state = hda_set_power_state(codec, AC_PWRST_D3);
cancel_delayed_work(&codec->power_work);
/* Cancel delayed work if we aren't currently running from it. */
if (!in_wq)
cancel_delayed_work_sync(&codec->power_work);
spin_lock(&codec->power_lock);
snd_hda_update_power_acct(codec);
trace_hda_power_down(codec);
Expand Down Expand Up @@ -4478,7 +4480,7 @@ static void hda_power_work(struct work_struct *work)
}
spin_unlock(&codec->power_lock);

state = hda_call_codec_suspend(codec);
state = hda_call_codec_suspend(codec, true);
codec->pm_down_notified = 0;
if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) {
codec->pm_down_notified = 1;
Expand Down Expand Up @@ -5127,7 +5129,7 @@ int snd_hda_suspend(struct hda_bus *bus)

list_for_each_entry(codec, &bus->codec_list, list) {
if (hda_codec_is_power_on(codec))
hda_call_codec_suspend(codec);
hda_call_codec_suspend(codec, false);
}
return 0;
}
Expand Down

0 comments on commit 971795e

Please sign in to comment.