aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/cs5535audio/cs5535audio.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@debian.org>2007-09-03 15:42:16 +0200
committerJaroslav Kysela <perex@perex.cz>2007-10-16 15:59:52 +0200
commit222fa0b0d2fdb2373a71d532c2cabd2ec920b3b3 (patch)
treefff88e0f8be8540b1fd74cc7f7d7b9fec783a8f4 /sound/pci/cs5535audio/cs5535audio.h
parent7abcacb09ac0f9c6848f1e7d86b284427fa83cee (diff)
[ALSA] cs5535audio: fix PRD register save/restore power management race
In the suspend path, we currently save the PRD registers and then disable DMA. This is racy; the sound hardware might update the PRD register as it finishes processing some DMA pages between when we've saved the PRD registers and when DMA actually gets disabled. Furthermore, we actively check whether or not DMA is enabled before saving PRD registers; there's no reason to do that, as the PRD registers should not update when we twiddle the ACC_BM[x]_CMD register(s). Worst case, we save the PRD registers twice; even powering down the ACC shouldn't mess with the PRD registers (according to the 5536 data sheet, section 5.3.7.4, power-down procedure). This patch reworks all that to first disable DMA, and then save PRD registers. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio.h')
-rw-r--r--sound/pci/cs5535audio/cs5535audio.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h
index 4fd1f31a6cf..c7a20446703 100644
--- a/sound/pci/cs5535audio/cs5535audio.h
+++ b/sound/pci/cs5535audio/cs5535audio.h
@@ -106,7 +106,6 @@ struct cs5535audio_dma {
struct snd_pcm_substream *substream;
unsigned int buf_addr, buf_bytes;
unsigned int period_bytes, periods;
- int suspended;
u32 saved_prd;
};