Lines Matching refs:substream

30 	const struct snd_pcm_substream *substream)
32 return substream->runtime->private_data;
35 struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)
37 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
45 * @substream: PCM substream
49 * This function can be used to initialize a dma_slave_config from a substream
54 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
75 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
92 * @substream: PCM substream
99 * direction of the substream. If the substream is a playback stream the dst
107 const struct snd_pcm_substream *substream,
111 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
137 struct snd_pcm_substream *substream = arg;
138 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
140 new_pos = prtd->pos + snd_pcm_lib_period_bytes(substream);
141 if (new_pos >= snd_pcm_lib_buffer_bytes(substream))
145 snd_pcm_period_elapsed(substream);
148 static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
150 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
156 direction = snd_pcm_substream_to_dma_direction(substream);
158 if (!substream->runtime->no_period_wakeup)
163 substream->runtime->dma_addr,
164 snd_pcm_lib_buffer_bytes(substream),
165 snd_pcm_lib_period_bytes(substream), direction, flags);
171 desc->callback_param = substream;
179 * @substream: PCM substream
187 int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
189 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
190 struct snd_pcm_runtime *runtime = substream->runtime;
195 ret = dmaengine_pcm_prepare_and_submit(substream);
226 * @substream: PCM substream
233 snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream *substream)
235 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
236 return bytes_to_frames(substream->runtime, prtd->pos);
242 * @substream: PCM substream
249 snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream)
251 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
252 struct snd_pcm_runtime *runtime = substream->runtime;
260 buf_size = snd_pcm_lib_buffer_bytes(substream);
295 * snd_dmaengine_pcm_open - Open a dmaengine based PCM substream
296 * @substream: PCM substream
300 * this function will use private_data field of the substream's runtime. So it
305 int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
314 ret = snd_pcm_hw_constraint_integer(substream->runtime,
325 substream->runtime->private_data = prtd;
332 * snd_dmaengine_pcm_open_request_chan - Open a dmaengine based PCM substream and request channel
333 * @substream: PCM substream
339 * that this function will use private_data field of the substream's runtime. So
344 int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
347 return snd_dmaengine_pcm_open(substream,
353 * snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
354 * @substream: PCM substream
358 int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
360 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
371 * substream and release channel
372 * @substream: PCM substream
374 * Releases the DMA channel associated with the PCM substream.
378 int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream)
380 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
392 * @substream: PCM substream
403 struct snd_pcm_substream *substream,
425 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)