Lines Matching refs:substream

32 int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
35 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream);
36 struct snd_soc_pcm_runtime *rtd = substream->private_data;
41 dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
45 ret = snd_hwparams_to_dma_slave_config(substream, params, &config);
49 snd_dmaengine_pcm_set_config_from_dai_data(substream,
50 snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream),
57 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
63 int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
65 snd_pcm_set_runtime_buffer(substream, NULL);
70 int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
72 return snd_dmaengine_pcm_trigger(substream, cmd);
77 pxa2xx_pcm_pointer(struct snd_pcm_substream *substream)
79 return snd_dmaengine_pcm_pointer(substream);
83 int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream)
89 int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
91 struct snd_soc_pcm_runtime *rtd = substream->private_data;
92 struct snd_pcm_runtime *runtime = substream->runtime;
98 dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
123 substream, dma_request_slave_channel(asoc_rtd_to_cpu(rtd, 0)->dev,
128 int pxa2xx_pcm_close(struct snd_pcm_substream *substream)
130 return snd_dmaengine_pcm_close_release_chan(substream);
134 int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream,
137 struct snd_pcm_runtime *runtime = substream->runtime;
138 return dma_mmap_wc(substream->pcm->card->dev, vma, runtime->dma_area,
145 struct snd_pcm_substream *substream = pcm->streams[stream].substream;
146 struct snd_dma_buffer *buf = &substream->dma_buffer;
161 struct snd_pcm_substream *substream;
166 substream = pcm->streams[stream].substream;
167 if (!substream)
169 buf = &substream->dma_buffer;
196 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
203 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
215 struct snd_pcm_substream *substream)
217 return pxa2xx_pcm_open(substream);
222 struct snd_pcm_substream *substream)
224 return pxa2xx_pcm_close(substream);
229 struct snd_pcm_substream *substream,
232 return pxa2xx_pcm_hw_params(substream, params);
237 struct snd_pcm_substream *substream)
239 return pxa2xx_pcm_hw_free(substream);
244 struct snd_pcm_substream *substream)
246 return pxa2xx_pcm_prepare(substream);
251 struct snd_pcm_substream *substream, int cmd)
253 return pxa2xx_pcm_trigger(substream, cmd);
259 struct snd_pcm_substream *substream)
261 return pxa2xx_pcm_pointer(substream);
266 struct snd_pcm_substream *substream,
269 return pxa2xx_pcm_mmap(substream, vma);