diff options
author | Andres Salomon <dilinger@debian.org> | 2007-09-03 09:41:47 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:59:51 -0400 |
commit | 7abcacb09ac0f9c6848f1e7d86b284427fa83cee (patch) | |
tree | 2447fe6c1c731b177dedf74a382c61214c0b3017 /sound | |
parent | 9e05b7a3d936ac5eb6c10291b69aee0af1ad03fb (diff) |
[ALSA] cs5535audio: correctly set dma->substream
We're never actually setting dma->substream to the current substream; that
means the dma->substream checks that we do in the suspend/resume path
are never satisfied, and the PRD registers are never correctly managed. This
changes it so that we set the substream when constructing the specific
bus master DMA, and unsetting it when we tear down the BM's DMA.
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')
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio_pcm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c index ec920cbb2a71..9a1e87fd4815 100644 --- a/sound/pci/cs5535audio/cs5535audio_pcm.c +++ b/sound/pci/cs5535audio/cs5535audio_pcm.c | |||
@@ -161,6 +161,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au, | |||
161 | jmpprd_addr = cpu_to_le32(lastdesc->addr + | 161 | jmpprd_addr = cpu_to_le32(lastdesc->addr + |
162 | (sizeof(struct cs5535audio_dma_desc)*periods)); | 162 | (sizeof(struct cs5535audio_dma_desc)*periods)); |
163 | 163 | ||
164 | dma->substream = substream; | ||
164 | dma->period_bytes = period_bytes; | 165 | dma->period_bytes = period_bytes; |
165 | dma->periods = periods; | 166 | dma->periods = periods; |
166 | spin_lock_irq(&cs5535au->reg_lock); | 167 | spin_lock_irq(&cs5535au->reg_lock); |
@@ -238,6 +239,7 @@ static void cs5535audio_clear_dma_packets(struct cs5535audio *cs5535au, | |||
238 | { | 239 | { |
239 | snd_dma_free_pages(&dma->desc_buf); | 240 | snd_dma_free_pages(&dma->desc_buf); |
240 | dma->desc_buf.area = NULL; | 241 | dma->desc_buf.area = NULL; |
242 | dma->substream = NULL; | ||
241 | } | 243 | } |
242 | 244 | ||
243 | static int snd_cs5535audio_hw_params(struct snd_pcm_substream *substream, | 245 | static int snd_cs5535audio_hw_params(struct snd_pcm_substream *substream, |