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 = substream->private_data; in cygnus_dai_get_dma_data()
212 return snd_soc_dai_get_dma_data(soc_runtime->cpu_dai, 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 = substream->private_data; 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()
379 static int cygnus_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in cygnus_pcm_trigger() argument
386 enable_intr(substream); in cygnus_pcm_trigger()
391 disable_intr(substream); in cygnus_pcm_trigger()
400 static void cygnus_pcm_period_elapsed(struct snd_pcm_substream *substream) in cygnus_pcm_period_elapsed() argument
406 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_period_elapsed()
408 p_rbuf = get_ringbuf(substream); in cygnus_pcm_period_elapsed()
414 snd_pcm_period_elapsed(substream); in cygnus_pcm_period_elapsed()
416 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in cygnus_pcm_period_elapsed()
580 static int cygnus_pcm_open(struct snd_pcm_substream *substream) in cygnus_pcm_open() argument
582 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_open()
583 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_open()
587 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_open()
593 snd_soc_set_runtime_hwparams(substream, &cygnus_pcm_hw); in cygnus_pcm_open()
608 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_open()
609 aio->play_stream = substream; in cygnus_pcm_open()
611 aio->capture_stream = substream; in cygnus_pcm_open()
616 static int cygnus_pcm_close(struct snd_pcm_substream *substream) in cygnus_pcm_close() argument
618 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_close()
621 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_close()
625 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_close()
636 static int cygnus_pcm_hw_params(struct snd_pcm_substream *substream, in cygnus_pcm_hw_params() argument
639 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_hw_params()
640 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_hw_params()
643 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_hw_params()
646 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in cygnus_pcm_hw_params()
652 static int cygnus_pcm_hw_free(struct snd_pcm_substream *substream) in cygnus_pcm_hw_free() argument
654 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_hw_free()
657 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_hw_free()
660 snd_pcm_set_runtime_buffer(substream, NULL); in cygnus_pcm_hw_free()
664 static int cygnus_pcm_prepare(struct snd_pcm_substream *substream) in cygnus_pcm_prepare() argument
666 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_prepare()
667 struct snd_pcm_runtime *runtime = substream->runtime; in cygnus_pcm_prepare()
674 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_prepare()
677 bufsize = snd_pcm_lib_buffer_bytes(substream); in cygnus_pcm_prepare()
678 periodsize = snd_pcm_lib_period_bytes(substream); in cygnus_pcm_prepare()
683 configure_ringbuf_regs(substream); in cygnus_pcm_prepare()
685 p_rbuf = get_ringbuf(substream); in cygnus_pcm_prepare()
689 is_play = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? 1 : 0; in cygnus_pcm_prepare()
697 static snd_pcm_uframes_t cygnus_pcm_pointer(struct snd_pcm_substream *substream) in cygnus_pcm_pointer() argument
703 aio = cygnus_dai_get_dma_data(substream); in cygnus_pcm_pointer()
709 p_rbuf = get_ringbuf(substream); in cygnus_pcm_pointer()
710 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in cygnus_pcm_pointer()
723 return bytes_to_frames(substream->runtime, res); in cygnus_pcm_pointer()
728 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in cygnus_pcm_preallocate_dma_buffer() local
729 struct snd_soc_pcm_runtime *rtd = substream->private_data; in cygnus_pcm_preallocate_dma_buffer()
730 struct snd_dma_buffer *buf = &substream->dma_buffer; in cygnus_pcm_preallocate_dma_buffer()
767 struct snd_pcm_substream *substream; in cygnus_dma_free_dma_buffers() local
770 substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; in cygnus_dma_free_dma_buffers()
771 if (substream) { in cygnus_dma_free_dma_buffers()
772 buf = &substream->dma_buffer; in cygnus_dma_free_dma_buffers()
780 substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in cygnus_dma_free_dma_buffers()
781 if (substream) { in cygnus_dma_free_dma_buffers()
782 buf = &substream->dma_buffer; in cygnus_dma_free_dma_buffers()
802 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in cygnus_dma_new()
809 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in cygnus_dma_new()