Lines Matching refs:substream
100 struct snd_pcm_substream *substream; member
152 static void fsl_dma_abort_stream(struct snd_pcm_substream *substream) in fsl_dma_abort_stream() argument
154 snd_pcm_stop_xrun(substream); in fsl_dma_abort_stream()
172 if (dma_private->substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in fsl_dma_update_pointers()
205 struct snd_pcm_substream *substream = dma_private->substream; in fsl_dma_isr() local
206 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_isr()
219 fsl_dma_abort_stream(substream); in fsl_dma_isr()
229 fsl_dma_abort_stream(substream); in fsl_dma_isr()
244 snd_pcm_period_elapsed(substream); in fsl_dma_isr()
299 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in fsl_dma_new()
302 &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); in fsl_dma_new()
309 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in fsl_dma_new()
312 &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer); in fsl_dma_new()
315 snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); in fsl_dma_new()
385 static int fsl_dma_open(struct snd_pcm_substream *substream) in fsl_dma_open() argument
387 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_dma_open()
388 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_open()
413 channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; in fsl_dma_open()
426 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in fsl_dma_open()
434 dma_private->substream = substream; in fsl_dma_open()
436 dma_private->dma_buf_phys = substream->dma_buffer.addr; in fsl_dma_open()
450 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in fsl_dma_open()
451 snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware); in fsl_dma_open()
505 mr |= (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in fsl_dma_open()
537 static int fsl_dma_hw_params(struct snd_pcm_substream *substream, in fsl_dma_hw_params() argument
540 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_dma_hw_params()
542 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_hw_params()
562 dma_addr_t temp_addr = substream->dma_buffer.addr; in fsl_dma_hw_params()
665 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in fsl_dma_hw_params()
701 static snd_pcm_uframes_t fsl_dma_pointer(struct snd_pcm_substream *substream) in fsl_dma_pointer() argument
703 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_dma_pointer()
705 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_pointer()
715 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in fsl_dma_pointer()
765 static int fsl_dma_hw_free(struct snd_pcm_substream *substream) in fsl_dma_hw_free() argument
767 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_dma_hw_free()
798 static int fsl_dma_close(struct snd_pcm_substream *substream) in fsl_dma_close() argument
800 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_dma_close()
802 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_close()
814 substream->runtime->private_data = NULL; in fsl_dma_close()
827 struct snd_pcm_substream *substream; in fsl_dma_free_dma_buffers() local
831 substream = pcm->streams[i].substream; in fsl_dma_free_dma_buffers()
832 if (substream) { in fsl_dma_free_dma_buffers()
833 snd_dma_free_pages(&substream->dma_buffer); in fsl_dma_free_dma_buffers()
834 substream->dma_buffer.area = NULL; in fsl_dma_free_dma_buffers()
835 substream->dma_buffer.addr = 0; in fsl_dma_free_dma_buffers()