diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-05-08 16:38:02 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-08 16:38:02 +0200 |
commit | ffd344444f9f8f4843d24084ef3da0d09140edb8 (patch) | |
tree | a4e8f1144e0023bad4009c26c094747063611857 /sound/pci/hda/hda_intel.c | |
parent | 6942c103fb4b0ce91be910a716044ac181a9c2dd (diff) | |
parent | 619a341b78f17fb86d92e89c04612676cd05e26f (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c19e71a94e1b..6e958bf94191 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2351,6 +2351,17 @@ 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); @@ -2397,7 +2408,8 @@ static int azx_resume(struct pci_dev *pci) return -EIO; azx_init_pci(chip); - azx_init_chip(chip, 1); + if (snd_hda_codecs_inuse(chip->bus)) + azx_init_chip(chip, 1); snd_hda_resume(chip->bus); snd_power_change_state(card, SNDRV_CTL_POWER_D0); |