aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2007-09-03 09:28:04 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:47 -0400
commitd804ad9258c1460916a5e5854655a0dc543fd8a5 (patch)
tree783900a809c48f73bb5849d11cb7fce8e88d4484 /sound/pci/hda/hda_intel.c
parent2e4924628ad957f702631a7a049c586a780f00f8 (diff)
[ALSA] hda-intel - Fix resume logic, when dynamic power managment is on
Comment in hda_intel.c states that 'the explicit resume is needed only when POWER_SAVE isn't set', but this is not true. There is no code that will automaticly power up the codec on resume, but only code that powers it up when user accesses it. So if user leaves a sound playing, codec will not be powered To fix that I check if there are any codecs that should be powered codec->power_count, and if so I power them up together with main controller. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3d06eccc9b9c..72fd34538994 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1586,11 +1586,11 @@ static int azx_resume(struct pci_dev *pci)
1586 if (azx_acquire_irq(chip, 1) < 0) 1586 if (azx_acquire_irq(chip, 1) < 0)
1587 return -EIO; 1587 return -EIO;
1588 azx_init_pci(chip); 1588 azx_init_pci(chip);
1589#ifndef CONFIG_SND_HDA_POWER_SAVE 1589
1590 /* the explicit resume is needed only when POWER_SAVE isn't set */ 1590 if (snd_hda_codecs_inuse(chip->bus))
1591 azx_init_chip(chip); 1591 azx_init_chip(chip);
1592
1592 snd_hda_resume(chip->bus); 1593 snd_hda_resume(chip->bus);
1593#endif
1594 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 1594 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
1595 return 0; 1595 return 0;
1596} 1596}