Lines Matching refs:substream
173 (struct snd_pcm_substream *substream) in mtk_afe_pcm_pointer() argument
175 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_pcm_pointer()
179 return bytes_to_frames(substream->runtime, memif->hw_ptr); in mtk_afe_pcm_pointer()
353 static int mtk_afe_i2s_startup(struct snd_pcm_substream *substream, in mtk_afe_i2s_startup() argument
356 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_i2s_startup()
366 static void mtk_afe_i2s_shutdown(struct snd_pcm_substream *substream, in mtk_afe_i2s_shutdown() argument
369 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_i2s_shutdown()
382 static int mtk_afe_i2s_prepare(struct snd_pcm_substream *substream, in mtk_afe_i2s_prepare() argument
385 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_i2s_prepare()
386 struct snd_pcm_runtime * const runtime = substream->runtime; in mtk_afe_i2s_prepare()
394 ret = mtk_afe_set_i2s(afe, substream->runtime->rate); in mtk_afe_i2s_prepare()
403 static int mtk_afe_hdmi_startup(struct snd_pcm_substream *substream, in mtk_afe_hdmi_startup() argument
406 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_hdmi_startup()
417 static void mtk_afe_hdmi_shutdown(struct snd_pcm_substream *substream, in mtk_afe_hdmi_shutdown() argument
420 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_hdmi_shutdown()
433 static int mtk_afe_hdmi_prepare(struct snd_pcm_substream *substream, in mtk_afe_hdmi_prepare() argument
436 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_hdmi_prepare()
437 struct snd_pcm_runtime * const runtime = substream->runtime; in mtk_afe_hdmi_prepare()
494 static int mtk_afe_hdmi_trigger(struct snd_pcm_substream *substream, int cmd, in mtk_afe_hdmi_trigger() argument
497 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_hdmi_trigger()
540 static int mtk_afe_dais_startup(struct snd_pcm_substream *substream, in mtk_afe_dais_startup() argument
543 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_dais_startup()
545 struct snd_pcm_runtime *runtime = substream->runtime; in mtk_afe_dais_startup()
549 memif->substream = substream; in mtk_afe_dais_startup()
551 snd_soc_set_runtime_hwparams(substream, &mtk_afe_hardware); in mtk_afe_dais_startup()
559 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in mtk_afe_dais_startup()
576 static void mtk_afe_dais_shutdown(struct snd_pcm_substream *substream, in mtk_afe_dais_shutdown() argument
579 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_dais_shutdown()
583 memif->substream = NULL; in mtk_afe_dais_shutdown()
586 static int mtk_afe_dais_hw_params(struct snd_pcm_substream *substream, in mtk_afe_dais_hw_params() argument
590 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_dais_hw_params()
600 ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in mtk_afe_dais_hw_params()
604 memif->phys_buf_addr = substream->runtime->dma_addr; in mtk_afe_dais_hw_params()
605 memif->buffer_size = substream->runtime->dma_bytes; in mtk_afe_dais_hw_params()
669 static int mtk_afe_dais_hw_free(struct snd_pcm_substream *substream, in mtk_afe_dais_hw_free() argument
672 return snd_pcm_lib_free_pages(substream); in mtk_afe_dais_hw_free()
675 static int mtk_afe_dais_prepare(struct snd_pcm_substream *substream, in mtk_afe_dais_prepare() argument
678 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_dais_prepare()
686 static int mtk_afe_dais_trigger(struct snd_pcm_substream *substream, int cmd, in mtk_afe_dais_trigger() argument
689 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mtk_afe_dais_trigger()
690 struct snd_pcm_runtime * const runtime = substream->runtime; in mtk_afe_dais_trigger()
1108 snd_pcm_period_elapsed(memif->substream); in mtk_afe_irq_handler()