Lines Matching full:pcm

3  * tegra_pcm.c - Tegra PCM driver
21 #include <sound/pcm.h>
106 "dmaengine pcm open failed with err %d (%s)\n", ret, in tegra_pcm_open()
204 return dma_mmap_wc(substream->pcm->card->dev, vma, runtime->dma_area, in tegra_pcm_mmap()
216 static int tegra_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream, in tegra_pcm_preallocate_dma_buffer() argument
219 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in tegra_pcm_preallocate_dma_buffer()
222 buf->area = dma_alloc_wc(pcm->card->dev, size, &buf->addr, GFP_KERNEL); in tegra_pcm_preallocate_dma_buffer()
228 buf->dev.dev = pcm->card->dev; in tegra_pcm_preallocate_dma_buffer()
234 static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream) in tegra_pcm_deallocate_dma_buffer() argument
239 substream = pcm->streams[stream].substream; in tegra_pcm_deallocate_dma_buffer()
247 dma_free_wc(pcm->card->dev, buf->bytes, buf->area, buf->addr); in tegra_pcm_deallocate_dma_buffer()
255 struct snd_pcm *pcm = rtd->pcm; in tegra_pcm_dma_allocate() local
266 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in tegra_pcm_dma_allocate()
267 ret = tegra_pcm_preallocate_dma_buffer(pcm, in tegra_pcm_dma_allocate()
273 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in tegra_pcm_dma_allocate()
274 ret = tegra_pcm_preallocate_dma_buffer(pcm, in tegra_pcm_dma_allocate()
283 tegra_pcm_deallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); in tegra_pcm_dma_allocate()
296 struct snd_pcm *pcm) in tegra_pcm_destruct() argument
298 tegra_pcm_deallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_CAPTURE); in tegra_pcm_destruct()
299 tegra_pcm_deallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); in tegra_pcm_destruct()
304 MODULE_DESCRIPTION("Tegra PCM ASoC driver");