Lines Matching refs:pcm
82 struct snd_pcm_substream *pcm = data; in bf5xx_dma_irq() local
84 struct snd_pcm_runtime *runtime = pcm->runtime; in bf5xx_dma_irq()
86 bf5xx_mmap_copy(pcm, runtime->period_size); in bf5xx_dma_irq()
87 if (pcm->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_dma_irq()
89 snd_pcm_period_elapsed(pcm); in bf5xx_dma_irq()
90 bf5xx_mmap_copy(pcm, runtime->period_size); in bf5xx_dma_irq()
95 snd_pcm_period_elapsed(pcm); in bf5xx_dma_irq()
316 static int bf5xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) in bf5xx_pcm_preallocate_dma_buffer() argument
318 struct snd_soc_pcm_runtime *rtd = pcm->private_data; in bf5xx_pcm_preallocate_dma_buffer()
321 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in bf5xx_pcm_preallocate_dma_buffer()
327 buf->dev.dev = pcm->card->dev; in bf5xx_pcm_preallocate_dma_buffer()
329 buf->area = dma_alloc_coherent(pcm->card->dev, size, in bf5xx_pcm_preallocate_dma_buffer()
378 static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm) in bf5xx_pcm_free_dma_buffers() argument
384 struct snd_soc_pcm_runtime *rtd = pcm->private_data; in bf5xx_pcm_free_dma_buffers()
391 substream = pcm->streams[stream].substream; in bf5xx_pcm_free_dma_buffers()
420 struct snd_pcm *pcm = rtd->pcm; in bf5xx_pcm_ac97_new() local
428 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in bf5xx_pcm_ac97_new()
429 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, in bf5xx_pcm_ac97_new()
435 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in bf5xx_pcm_ac97_new()
436 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, in bf5xx_pcm_ac97_new()