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