Lines Matching refs:substream
125 static int kirkwood_dma_open(struct snd_pcm_substream *substream) in kirkwood_dma_open() argument
128 struct snd_pcm_runtime *runtime = substream->runtime; in kirkwood_dma_open()
129 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in kirkwood_dma_open()
137 priv = snd_soc_dai_get_dma_data(cpu_dai, substream); in kirkwood_dma_open()
138 snd_soc_set_runtime_hwparams(substream, &kirkwood_dma_snd_hw); in kirkwood_dma_open()
154 err = snd_pcm_hw_constraint_step(substream->runtime, 0, in kirkwood_dma_open()
184 addr = substream->dma_buffer.addr; in kirkwood_dma_open()
185 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in kirkwood_dma_open()
186 prdata->play_stream = substream; in kirkwood_dma_open()
190 prdata->rec_stream = substream; in kirkwood_dma_open()
198 static int kirkwood_dma_close(struct snd_pcm_substream *substream) in kirkwood_dma_close() argument
200 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in kirkwood_dma_close()
206 priv = snd_soc_dai_get_dma_data(cpu_dai, substream); in kirkwood_dma_close()
211 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in kirkwood_dma_close()
226 static int kirkwood_dma_hw_params(struct snd_pcm_substream *substream, in kirkwood_dma_hw_params() argument
229 struct snd_pcm_runtime *runtime = substream->runtime; in kirkwood_dma_hw_params()
231 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in kirkwood_dma_hw_params()
237 static int kirkwood_dma_hw_free(struct snd_pcm_substream *substream) in kirkwood_dma_hw_free() argument
239 snd_pcm_set_runtime_buffer(substream, NULL); in kirkwood_dma_hw_free()
243 static int kirkwood_dma_prepare(struct snd_pcm_substream *substream) in kirkwood_dma_prepare() argument
245 struct snd_pcm_runtime *runtime = substream->runtime; in kirkwood_dma_prepare()
246 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in kirkwood_dma_prepare()
251 priv = snd_soc_dai_get_dma_data(cpu_dai, substream); in kirkwood_dma_prepare()
256 count = snd_pcm_lib_period_bytes(substream); in kirkwood_dma_prepare()
258 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in kirkwood_dma_prepare()
273 *substream) in kirkwood_dma_pointer()
275 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in kirkwood_dma_pointer()
280 priv = snd_soc_dai_get_dma_data(cpu_dai, substream); in kirkwood_dma_pointer()
282 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in kirkwood_dma_pointer()
283 count = bytes_to_frames(substream->runtime, in kirkwood_dma_pointer()
286 count = bytes_to_frames(substream->runtime, in kirkwood_dma_pointer()
305 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in kirkwood_dma_preallocate_dma_buffer() local
306 struct snd_dma_buffer *buf = &substream->dma_buffer; in kirkwood_dma_preallocate_dma_buffer()
332 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in kirkwood_dma_new()
339 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in kirkwood_dma_new()
351 struct snd_pcm_substream *substream; in kirkwood_dma_free_dma_buffers() local
356 substream = pcm->streams[stream].substream; in kirkwood_dma_free_dma_buffers()
357 if (!substream) in kirkwood_dma_free_dma_buffers()
359 buf = &substream->dma_buffer; in kirkwood_dma_free_dma_buffers()