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()
52 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream, in snd_hwparams_to_dma_slave_config() argument
73 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_hwparams_to_dma_slave_config()
105 const struct snd_pcm_substream *substream, in snd_dmaengine_pcm_set_config_from_dai_data() argument
109 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_dmaengine_pcm_set_config_from_dai_data()
135 struct snd_pcm_substream *substream = arg; in dmaengine_pcm_dma_complete() local
136 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in dmaengine_pcm_dma_complete()
138 prtd->pos += snd_pcm_lib_period_bytes(substream); in dmaengine_pcm_dma_complete()
139 if (prtd->pos >= snd_pcm_lib_buffer_bytes(substream)) in dmaengine_pcm_dma_complete()
142 snd_pcm_period_elapsed(substream); in dmaengine_pcm_dma_complete()
145 static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) in dmaengine_pcm_prepare_and_submit() argument
147 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in dmaengine_pcm_prepare_and_submit()
153 direction = snd_pcm_substream_to_dma_direction(substream); in dmaengine_pcm_prepare_and_submit()
155 if (!substream->runtime->no_period_wakeup) in dmaengine_pcm_prepare_and_submit()
160 substream->runtime->dma_addr, in dmaengine_pcm_prepare_and_submit()
161 snd_pcm_lib_buffer_bytes(substream), in dmaengine_pcm_prepare_and_submit()
162 snd_pcm_lib_period_bytes(substream), direction, flags); in dmaengine_pcm_prepare_and_submit()
168 desc->callback_param = substream; in dmaengine_pcm_prepare_and_submit()
184 int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_dmaengine_pcm_trigger() argument
186 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_trigger()
187 struct snd_pcm_runtime *runtime = substream->runtime; in snd_dmaengine_pcm_trigger()
192 ret = dmaengine_pcm_prepare_and_submit(substream); in snd_dmaengine_pcm_trigger()
228 snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_pointer_no_residue() argument
230 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_pointer_no_residue()
231 return bytes_to_frames(substream->runtime, prtd->pos); in snd_dmaengine_pcm_pointer_no_residue()
242 snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_pointer() argument
244 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_pointer()
245 struct snd_pcm_runtime *runtime = substream->runtime; in snd_dmaengine_pcm_pointer()
253 buf_size = snd_pcm_lib_buffer_bytes(substream); in snd_dmaengine_pcm_pointer()
298 int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, in snd_dmaengine_pcm_open() argument
307 ret = snd_pcm_hw_constraint_integer(substream->runtime, in snd_dmaengine_pcm_open()
318 substream->runtime->private_data = prtd; in snd_dmaengine_pcm_open()
337 int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, in snd_dmaengine_pcm_open_request_chan() argument
340 return snd_dmaengine_pcm_open(substream, in snd_dmaengine_pcm_open_request_chan()
349 int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_close() argument
351 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_close()
367 int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_close_release_chan() argument
369 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_close_release_chan()
392 struct snd_pcm_substream *substream, in snd_dmaengine_pcm_refine_runtime_hwparams() argument
414 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_dmaengine_pcm_refine_runtime_hwparams()