Lines Matching refs:substream
44 struct snd_pcm_substream *substream, in bcm63xx_pcm_hw_params() argument
48 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in bcm63xx_pcm_hw_params()
49 struct snd_pcm_runtime *runtime = substream->runtime; in bcm63xx_pcm_hw_params()
51 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in bcm63xx_pcm_hw_params()
58 snd_soc_dai_set_dma_data(asoc_rtd_to_cpu(rtd, 0), substream, dma_desc); in bcm63xx_pcm_hw_params()
64 struct snd_pcm_substream *substream) in bcm63xx_pcm_hw_free() argument
67 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in bcm63xx_pcm_hw_free()
69 dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); in bcm63xx_pcm_hw_free()
71 snd_pcm_set_runtime_buffer(substream, NULL); in bcm63xx_pcm_hw_free()
77 struct snd_pcm_substream *substream, int cmd) in bcm63xx_pcm_trigger() argument
84 rtd = asoc_substream_to_rtd(substream); in bcm63xx_pcm_trigger()
88 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bcm63xx_pcm_trigger()
146 struct snd_pcm_substream *substream) in bcm63xx_pcm_prepare() argument
151 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in bcm63xx_pcm_prepare()
152 struct snd_pcm_runtime *runtime = substream->runtime; in bcm63xx_pcm_prepare()
155 dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); in bcm63xx_pcm_prepare()
156 dma_desc->dma_len = snd_pcm_lib_period_bytes(substream); in bcm63xx_pcm_prepare()
160 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bcm63xx_pcm_prepare()
179 struct snd_pcm_substream *substream) in bcm63xx_pcm_pointer() argument
182 struct bcm63xx_runtime_data *prtd = substream->runtime->private_data; in bcm63xx_pcm_pointer()
185 prtd->dma_addr_next = substream->runtime->dma_addr; in bcm63xx_pcm_pointer()
187 x = bytes_to_frames(substream->runtime, in bcm63xx_pcm_pointer()
188 prtd->dma_addr_next - substream->runtime->dma_addr); in bcm63xx_pcm_pointer()
190 return x == substream->runtime->buffer_size ? 0 : x; in bcm63xx_pcm_pointer()
194 struct snd_pcm_substream *substream, in bcm63xx_pcm_mmap() argument
197 struct snd_pcm_runtime *runtime = substream->runtime; in bcm63xx_pcm_mmap()
199 return dma_mmap_wc(substream->pcm->card->dev, vma, in bcm63xx_pcm_mmap()
207 struct snd_pcm_substream *substream) in bcm63xx_pcm_open() argument
210 struct snd_pcm_runtime *runtime = substream->runtime; in bcm63xx_pcm_open()
241 struct snd_pcm_substream *substream) in bcm63xx_pcm_close() argument
243 struct snd_pcm_runtime *runtime = substream->runtime; in bcm63xx_pcm_close()
254 struct snd_pcm_substream *substream; in i2s_dma_isr() local
268 substream = i2s_priv->capture_substream; in i2s_dma_isr()
269 runtime = substream->runtime; in i2s_dma_isr()
270 rtd = asoc_substream_to_rtd(substream); in i2s_dma_isr()
272 dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); in i2s_dma_isr()
288 snd_pcm_lib_period_bytes(substream); in i2s_dma_isr()
290 snd_pcm_lib_period_bytes(substream); in i2s_dma_isr()
299 snd_pcm_lib_period_bytes(substream)); in i2s_dma_isr()
305 snd_pcm_period_elapsed(substream); in i2s_dma_isr()
316 substream = i2s_priv->play_substream; in i2s_dma_isr()
317 runtime = substream->runtime; in i2s_dma_isr()
318 rtd = asoc_substream_to_rtd(substream); in i2s_dma_isr()
320 dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); in i2s_dma_isr()
337 snd_pcm_lib_period_bytes(substream); in i2s_dma_isr()
339 snd_pcm_lib_period_bytes(substream); in i2s_dma_isr()
349 snd_pcm_lib_period_bytes(substream)); in i2s_dma_isr()
355 snd_pcm_period_elapsed(substream); in i2s_dma_isr()
367 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in bcm63xx_pcm_preallocate_dma_buffer() local
368 struct snd_dma_buffer *buf = &substream->dma_buffer; in bcm63xx_pcm_preallocate_dma_buffer()
399 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in bcm63xx_soc_pcm_new()
406 pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; in bcm63xx_soc_pcm_new()
409 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in bcm63xx_soc_pcm_new()
415 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in bcm63xx_soc_pcm_new()
427 struct snd_pcm_substream *substream; in bcm63xx_pcm_free_dma_buffers() local
430 substream = pcm->streams[stream].substream; in bcm63xx_pcm_free_dma_buffers()
431 if (!substream) in bcm63xx_pcm_free_dma_buffers()
433 buf = &substream->dma_buffer; in bcm63xx_pcm_free_dma_buffers()