Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293116
b: refs/heads/master
c: 785f857
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Mar 7, 2012
1 parent 5a696da commit 1b00cc2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 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: 546bb6785265f3413fa76e06b9fdce58ee15ea87
refs/heads/master: 785f857d1cb0856b612b46a0545b74aa2596e44a
4 changes: 4 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5281,6 +5281,10 @@ 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);
else /* forcibly change the power to D3 even if not used */
hda_set_power_state(codec,
codec->afg ? codec->afg : codec->mfg,
AC_PWRST_D3);
if (codec->patch_ops.post_suspend)
codec->patch_ops.post_suspend(codec);
}
Expand Down
14 changes: 1 addition & 13 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2351,17 +2351,6 @@ static void azx_power_notify(struct hda_bus *bus)
* power management
*/

static int snd_hda_codecs_inuse(struct hda_bus *bus)
{
struct hda_codec *codec;

list_for_each_entry(codec, &bus->codec_list, list) {
if (snd_hda_codec_needs_resume(codec))
return 1;
}
return 0;
}

static int azx_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
Expand Down Expand Up @@ -2408,8 +2397,7 @@ static int azx_resume(struct pci_dev *pci)
return -EIO;
azx_init_pci(chip);

if (snd_hda_codecs_inuse(chip->bus))
azx_init_chip(chip, 1);
azx_init_chip(chip, 1);

snd_hda_resume(chip->bus);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
Expand Down

0 comments on commit 1b00cc2

Please sign in to comment.