diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ac97-pcm.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97-pcm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index e940d26048d0..98b44b316e78 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -243,6 +243,9 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) | |||
243 | 243 | ||
244 | static int bf5xx_pcm_open(struct snd_pcm_substream *substream) | 244 | static int bf5xx_pcm_open(struct snd_pcm_substream *substream) |
245 | { | 245 | { |
246 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
247 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
248 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(cpu_dai); | ||
246 | struct snd_pcm_runtime *runtime = substream->runtime; | 249 | struct snd_pcm_runtime *runtime = substream->runtime; |
247 | int ret; | 250 | int ret; |
248 | 251 | ||
@@ -314,6 +317,9 @@ static struct snd_pcm_ops bf5xx_pcm_ac97_ops = { | |||
314 | 317 | ||
315 | static int bf5xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) | 318 | static int bf5xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) |
316 | { | 319 | { |
320 | struct snd_soc_pcm_runtime *rtd = pcm->private_data; | ||
321 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
322 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(cpu_dai); | ||
317 | struct snd_pcm_substream *substream = pcm->streams[stream].substream; | 323 | struct snd_pcm_substream *substream = pcm->streams[stream].substream; |
318 | struct snd_dma_buffer *buf = &substream->dma_buffer; | 324 | struct snd_dma_buffer *buf = &substream->dma_buffer; |
319 | size_t size = bf5xx_pcm_hardware.buffer_bytes_max | 325 | size_t size = bf5xx_pcm_hardware.buffer_bytes_max |
@@ -377,6 +383,9 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm) | |||
377 | struct snd_dma_buffer *buf; | 383 | struct snd_dma_buffer *buf; |
378 | int stream; | 384 | int stream; |
379 | #if defined(CONFIG_SND_BF5XX_MMAP_SUPPORT) | 385 | #if defined(CONFIG_SND_BF5XX_MMAP_SUPPORT) |
386 | struct snd_soc_pcm_runtime *rtd = pcm->private_data; | ||
387 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
388 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(cpu_dai); | ||
380 | size_t size = bf5xx_pcm_hardware.buffer_bytes_max * | 389 | size_t size = bf5xx_pcm_hardware.buffer_bytes_max * |
381 | sizeof(struct ac97_frame) / 4; | 390 | sizeof(struct ac97_frame) / 4; |
382 | #endif | 391 | #endif |
@@ -405,8 +414,6 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm) | |||
405 | } | 414 | } |
406 | #endif | 415 | #endif |
407 | } | 416 | } |
408 | if (sport_handle) | ||
409 | sport_done(sport_handle); | ||
410 | } | 417 | } |
411 | 418 | ||
412 | static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | 419 | static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); |