Lines Matching refs:substream

75 static int omap_pcm_hw_params(struct snd_pcm_substream *substream,  in omap_pcm_hw_params()  argument
78 struct snd_pcm_runtime *runtime = substream->runtime; in omap_pcm_hw_params()
79 struct snd_soc_pcm_runtime *rtd = substream->private_data; in omap_pcm_hw_params()
85 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in omap_pcm_hw_params()
92 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in omap_pcm_hw_params()
95 chan = snd_dmaengine_pcm_get_chan(substream); in omap_pcm_hw_params()
100 err = snd_hwparams_to_dma_slave_config(substream, params, &config); in omap_pcm_hw_params()
104 snd_dmaengine_pcm_set_config_from_dai_data(substream, in omap_pcm_hw_params()
105 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream), in omap_pcm_hw_params()
111 static int omap_pcm_hw_free(struct snd_pcm_substream *substream) in omap_pcm_hw_free() argument
113 snd_pcm_set_runtime_buffer(substream, NULL); in omap_pcm_hw_free()
117 static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream) in omap_pcm_pointer() argument
122 offset = snd_dmaengine_pcm_pointer_no_residue(substream); in omap_pcm_pointer()
124 offset = snd_dmaengine_pcm_pointer(substream); in omap_pcm_pointer()
129 static int omap_pcm_open(struct snd_pcm_substream *substream) in omap_pcm_open() argument
131 struct snd_soc_pcm_runtime *rtd = substream->private_data; in omap_pcm_open()
135 snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); in omap_pcm_open()
137 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in omap_pcm_open()
145 ret = snd_dmaengine_pcm_open(substream, chan); in omap_pcm_open()
147 ret = snd_dmaengine_pcm_open_request_chan(substream, in omap_pcm_open()
154 static int omap_pcm_mmap(struct snd_pcm_substream *substream, in omap_pcm_mmap() argument
157 struct snd_pcm_runtime *runtime = substream->runtime; in omap_pcm_mmap()
159 return dma_mmap_writecombine(substream->pcm->card->dev, vma, in omap_pcm_mmap()
179 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in omap_pcm_preallocate_dma_buffer() local
180 struct snd_dma_buffer *buf = &substream->dma_buffer; in omap_pcm_preallocate_dma_buffer()
197 struct snd_pcm_substream *substream; in omap_pcm_free_dma_buffers() local
202 substream = pcm->streams[stream].substream; in omap_pcm_free_dma_buffers()
203 if (!substream) in omap_pcm_free_dma_buffers()
206 buf = &substream->dma_buffer; in omap_pcm_free_dma_buffers()
226 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in omap_pcm_new()
233 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in omap_pcm_new()