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