Lines Matching refs:substream
30 const struct snd_pcm_substream *substream) in substream_to_prtd() argument
32 return substream->runtime->private_data; in substream_to_prtd()
35 struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_get_chan() argument
37 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_get_chan()
54 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream, in snd_hwparams_to_dma_slave_config() argument
75 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_hwparams_to_dma_slave_config()
107 const struct snd_pcm_substream *substream, in snd_dmaengine_pcm_set_config_from_dai_data() argument
111 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_dmaengine_pcm_set_config_from_dai_data()
137 struct snd_pcm_substream *substream = arg; in dmaengine_pcm_dma_complete() local
138 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in dmaengine_pcm_dma_complete()
140 new_pos = prtd->pos + snd_pcm_lib_period_bytes(substream); in dmaengine_pcm_dma_complete()
141 if (new_pos >= snd_pcm_lib_buffer_bytes(substream)) in dmaengine_pcm_dma_complete()
145 snd_pcm_period_elapsed(substream); in dmaengine_pcm_dma_complete()
148 static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) in dmaengine_pcm_prepare_and_submit() argument
150 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in dmaengine_pcm_prepare_and_submit()
156 direction = snd_pcm_substream_to_dma_direction(substream); in dmaengine_pcm_prepare_and_submit()
158 if (!substream->runtime->no_period_wakeup) in dmaengine_pcm_prepare_and_submit()
163 substream->runtime->dma_addr, in dmaengine_pcm_prepare_and_submit()
164 snd_pcm_lib_buffer_bytes(substream), in dmaengine_pcm_prepare_and_submit()
165 snd_pcm_lib_period_bytes(substream), direction, flags); in dmaengine_pcm_prepare_and_submit()
171 desc->callback_param = substream; in dmaengine_pcm_prepare_and_submit()
187 int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_dmaengine_pcm_trigger() argument
189 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_trigger()
190 struct snd_pcm_runtime *runtime = substream->runtime; in snd_dmaengine_pcm_trigger()
195 ret = dmaengine_pcm_prepare_and_submit(substream); in snd_dmaengine_pcm_trigger()
233 snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_pointer_no_residue() argument
235 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_pointer_no_residue()
236 return bytes_to_frames(substream->runtime, prtd->pos); in snd_dmaengine_pcm_pointer_no_residue()
249 snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_pointer() argument
251 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_pointer()
252 struct snd_pcm_runtime *runtime = substream->runtime; in snd_dmaengine_pcm_pointer()
260 buf_size = snd_pcm_lib_buffer_bytes(substream); in snd_dmaengine_pcm_pointer()
305 int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, in snd_dmaengine_pcm_open() argument
314 ret = snd_pcm_hw_constraint_integer(substream->runtime, in snd_dmaengine_pcm_open()
325 substream->runtime->private_data = prtd; in snd_dmaengine_pcm_open()
344 int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, in snd_dmaengine_pcm_open_request_chan() argument
347 return snd_dmaengine_pcm_open(substream, in snd_dmaengine_pcm_open_request_chan()
358 int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_close() argument
360 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_close()
378 int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_close_release_chan() argument
380 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_close_release_chan()
403 struct snd_pcm_substream *substream, in snd_dmaengine_pcm_refine_runtime_hwparams() argument
425 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_dmaengine_pcm_refine_runtime_hwparams()