Lines Matching refs:substream

208 				struct snd_pcm_substream *substream)  in cygnus_dai_get_dma_data()  argument
210 struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); in cygnus_dai_get_dma_data()
212 return snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(soc_runtime, 0), substream); in cygnus_dai_get_dma_data()
256 static int configure_ringbuf_regs(struct snd_pcm_substream *substream) in configure_ringbuf_regs() argument
262 aio = cygnus_dai_get_dma_data(substream); in configure_ringbuf_regs()
265 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in configure_ringbuf_regs()
305 static struct ringbuf_regs *get_ringbuf(struct snd_pcm_substream *substream) in get_ringbuf() argument
310 aio = cygnus_dai_get_dma_data(substream); in get_ringbuf()
312 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in get_ringbuf()
320 static void enable_intr(struct snd_pcm_substream *substream) in enable_intr() argument
325 aio = cygnus_dai_get_dma_data(substream); in enable_intr()
330 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in enable_intr()
354 static void disable_intr(struct snd_pcm_substream *substream) in disable_intr() argument
356 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in disable_intr()
360 aio = cygnus_dai_get_dma_data(substream); in disable_intr()
367 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in disable_intr()
380 struct snd_pcm_substream *substream, int cmd) in cygnus_pcm_trigger() argument
387 enable_intr(substream); in cygnus_pcm_trigger()
392 disable_intr(substream); in cygnus_pcm_trigger()
401 static void cygnus_pcm_period_elapsed(struct snd_pcm_substream *substream) in cygnus_pcm_period_elapsed() argument
407 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_period_elapsed()
409 p_rbuf = get_ringbuf(substream); in cygnus_pcm_period_elapsed()
415 snd_pcm_period_elapsed(substream); in cygnus_pcm_period_elapsed()
417 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in cygnus_pcm_period_elapsed()
582 struct snd_pcm_substream *substream) in cygnus_pcm_open() argument
584 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_open()
585 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_open()
589 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_open()
595 snd_soc_set_runtime_hwparams(substream, &cygnus_pcm_hw); in cygnus_pcm_open()
610 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_open()
611 aio->play_stream = substream; in cygnus_pcm_open()
613 aio->capture_stream = substream; in cygnus_pcm_open()
619 struct snd_pcm_substream *substream) in cygnus_pcm_close() argument
621 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_close()
624 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_close()
628 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_close()
640 struct snd_pcm_substream *substream, in cygnus_pcm_hw_params() argument
643 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_hw_params()
644 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_hw_params()
647 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_hw_params()
650 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in cygnus_pcm_hw_params()
657 struct snd_pcm_substream *substream) in cygnus_pcm_hw_free() argument
659 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_hw_free()
662 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_hw_free()
665 snd_pcm_set_runtime_buffer(substream, NULL); in cygnus_pcm_hw_free()
670 struct snd_pcm_substream *substream) in cygnus_pcm_prepare() argument
672 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_prepare()
673 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_prepare()
680 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_prepare()
683 bufsize = snd_pcm_lib_buffer_bytes(substream); in cygnus_pcm_prepare()
684 periodsize = snd_pcm_lib_period_bytes(substream); in cygnus_pcm_prepare()
689 configure_ringbuf_regs(substream); in cygnus_pcm_prepare()
691 p_rbuf = get_ringbuf(substream); in cygnus_pcm_prepare()
695 is_play = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? 1 : 0; in cygnus_pcm_prepare()
704 struct snd_pcm_substream *substream) in cygnus_pcm_pointer() argument
710 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_pointer()
716 p_rbuf = get_ringbuf(substream); in cygnus_pcm_pointer()
717 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_pointer()
730 return bytes_to_frames(substream->runtime, res); in cygnus_pcm_pointer()
735 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in cygnus_pcm_preallocate_dma_buffer() local
736 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in cygnus_pcm_preallocate_dma_buffer()
737 struct snd_dma_buffer *buf = &substream->dma_buffer; in cygnus_pcm_preallocate_dma_buffer()
763 struct snd_pcm_substream *substream; in cygnus_dma_free_dma_buffers() local
766 substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; in cygnus_dma_free_dma_buffers()
767 if (substream) { in cygnus_dma_free_dma_buffers()
768 buf = &substream->dma_buffer; in cygnus_dma_free_dma_buffers()
776 substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in cygnus_dma_free_dma_buffers()
777 if (substream) { in cygnus_dma_free_dma_buffers()
778 buf = &substream->dma_buffer; in cygnus_dma_free_dma_buffers()
799 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in cygnus_dma_new()
806 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in cygnus_dma_new()