ALSA: cs46xx: Fix cpu idling with resume
Make sure that capture DMA doesn't stay enabled after system resume as that potentially prevents the processor from entering deep sleep states. Signed-off-by: Florian Zumbiehl <florz@florz.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
6250b9ced2
commit
cf944ee55c
@@ -3644,6 +3644,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
|
|||||||
#ifdef CONFIG_SND_CS46XX_NEW_DSP
|
#ifdef CONFIG_SND_CS46XX_NEW_DSP
|
||||||
int i;
|
int i;
|
||||||
#endif
|
#endif
|
||||||
|
unsigned int tmp;
|
||||||
|
|
||||||
pci_set_power_state(pci, PCI_D0);
|
pci_set_power_state(pci, PCI_D0);
|
||||||
pci_restore_state(pci);
|
pci_restore_state(pci);
|
||||||
@@ -3685,6 +3686,15 @@ int snd_cs46xx_resume(struct pci_dev *pci)
|
|||||||
snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
|
snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
|
||||||
snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
|
snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Stop capture DMA.
|
||||||
|
*/
|
||||||
|
tmp = snd_cs46xx_peek(chip, BA1_CCTL);
|
||||||
|
chip->capt.ctl = tmp & 0x0000ffff;
|
||||||
|
snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000);
|
||||||
|
|
||||||
|
mdelay(5);
|
||||||
|
|
||||||
/* reset playback/capture */
|
/* reset playback/capture */
|
||||||
snd_cs46xx_set_play_sample_rate(chip, 8000);
|
snd_cs46xx_set_play_sample_rate(chip, 8000);
|
||||||
snd_cs46xx_set_capture_sample_rate(chip, 8000);
|
snd_cs46xx_set_capture_sample_rate(chip, 8000);
|
||||||
|
Reference in New Issue
Block a user