Lines Matching full:io
115 #define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io)) argument
116 #define rsnd_ssi_is_multi_secondary(mod, io) \ argument
117 (rsnd_ssi_multi_secondaries(io) & (1 << rsnd_mod_id(mod)))
118 #define rsnd_ssi_is_run_mods(mod, io) \ argument
119 (rsnd_ssi_run_mods(io) & (1 << rsnd_mod_id(mod)))
122 int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) in rsnd_ssi_use_busif() argument
124 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_use_busif()
133 if (rsnd_io_to_mod_src(io)) in rsnd_ssi_use_busif()
168 static u32 rsnd_ssi_multi_secondaries(struct rsnd_dai_stream *io) in rsnd_ssi_multi_secondaries() argument
179 struct rsnd_mod *mod = rsnd_io_to_mod(io, types[i]); in rsnd_ssi_multi_secondaries()
190 static u32 rsnd_ssi_run_mods(struct rsnd_dai_stream *io) in rsnd_ssi_run_mods() argument
192 struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_run_mods()
193 struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); in rsnd_ssi_run_mods()
196 mods = rsnd_ssi_multi_secondaries_runtime(io) | in rsnd_ssi_run_mods()
205 u32 rsnd_ssi_multi_secondaries_runtime(struct rsnd_dai_stream *io) in rsnd_ssi_multi_secondaries_runtime() argument
207 if (rsnd_runtime_is_multi_ssi(io)) in rsnd_ssi_multi_secondaries_runtime()
208 return rsnd_ssi_multi_secondaries(io); in rsnd_ssi_multi_secondaries_runtime()
267 struct rsnd_dai_stream *io) in rsnd_ssi_master_clk_start() argument
269 struct rsnd_priv *priv = rsnd_io_to_priv(io); in rsnd_ssi_master_clk_start()
271 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_master_clk_start()
273 int chan = rsnd_runtime_channel_for_ssi(io); in rsnd_ssi_master_clk_start()
276 unsigned int rate = rsnd_io_is_play(io) ? in rsnd_ssi_master_clk_start()
277 rsnd_src_get_out_rate(priv, io) : in rsnd_ssi_master_clk_start()
278 rsnd_src_get_in_rate(priv, io); in rsnd_ssi_master_clk_start()
286 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_master_clk_start()
289 if (rsnd_runtime_is_tdm_split(io)) in rsnd_ssi_master_clk_start()
290 chan = rsnd_io_converted_chan(io); in rsnd_ssi_master_clk_start()
344 struct rsnd_dai_stream *io) in rsnd_ssi_master_clk_stop() argument
346 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_master_clk_stop()
366 struct rsnd_dai_stream *io) in rsnd_ssi_config_init() argument
368 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_config_init()
371 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_config_init()
379 is_tdm = rsnd_runtime_is_tdm(io); in rsnd_ssi_config_init()
380 is_tdm_split = rsnd_runtime_is_tdm_split(io); in rsnd_ssi_config_init()
412 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_config_init()
415 if (rsnd_io_is_play(io)) in rsnd_ssi_config_init()
473 struct rsnd_dai_stream *io, in rsnd_ssi_init() argument
479 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_init()
482 ret = rsnd_ssi_master_clk_start(mod, io); in rsnd_ssi_init()
492 rsnd_ssi_config_init(mod, io); in rsnd_ssi_init()
503 struct rsnd_dai_stream *io, in rsnd_ssi_quit() argument
509 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_quit()
517 rsnd_ssi_master_clk_stop(mod, io); in rsnd_ssi_quit()
533 struct rsnd_dai_stream *io, in rsnd_ssi_hw_params() argument
537 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_hw_params()
541 struct rsnd_priv *priv = rsnd_io_to_priv(io); in rsnd_ssi_hw_params()
552 struct rsnd_dai_stream *io, in rsnd_ssi_start() argument
557 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_start()
564 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_start()
571 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_start()
585 struct rsnd_dai_stream *io, in rsnd_ssi_stop() argument
591 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_stop()
594 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_stop()
605 if (rsnd_io_is_play(io)) { in rsnd_ssi_stop()
613 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_stop()
629 struct rsnd_dai_stream *io, in rsnd_ssi_irq() argument
637 is_tdm = rsnd_runtime_is_tdm(io); in rsnd_ssi_irq()
638 is_tdm_split = rsnd_runtime_is_tdm_split(io); in rsnd_ssi_irq()
643 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_irq()
646 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_irq()
671 struct rsnd_dai_stream *io);
673 struct rsnd_dai_stream *io) in __rsnd_ssi_interrupt() argument
685 if (!rsnd_io_is_working(io)) in __rsnd_ssi_interrupt()
692 elapsed = rsnd_ssi_pio_interrupt(mod, io); in __rsnd_ssi_interrupt()
709 snd_pcm_period_elapsed(io->substream); in __rsnd_ssi_interrupt()
712 snd_pcm_stop_xrun(io->substream); in __rsnd_ssi_interrupt()
726 struct rsnd_dai_stream *io, in rsnd_ssi_get_status() argument
734 * how many SSI requests parent SSI. Thus, it is localed on "io" now. in rsnd_ssi_get_status()
746 * IO-0: SRC0 -> CTU1 -+-> MUX -> DVC -> SSIU -> SSI0 in rsnd_ssi_get_status()
748 * IO-1: SRC1 -> CTU2 -+ in rsnd_ssi_get_status()
750 * 1) start IO-0 -> start SSI0 in rsnd_ssi_get_status()
751 * 2) start IO-1 -> SSI0 doesn't need to start, because it is in rsnd_ssi_get_status()
755 return &io->parent_ssi_status; in rsnd_ssi_get_status()
757 return rsnd_mod_get_status(mod, io, type); in rsnd_ssi_get_status()
764 struct rsnd_dai_stream *io) in rsnd_ssi_parent_attach() argument
766 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_parent_attach()
775 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_parent_attach()
782 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 0), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
785 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 3), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
788 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 7), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
794 struct rsnd_dai_stream *io, in rsnd_ssi_pcm_new() argument
802 rsnd_ssi_parent_attach(mod, io); in rsnd_ssi_pcm_new()
808 struct rsnd_dai_stream *io, in rsnd_ssi_common_probe() argument
819 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_common_probe()
851 struct rsnd_dai_stream *io, in rsnd_ssi_common_remove() argument
855 struct rsnd_mod *pure_ssi_mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_common_remove()
875 struct rsnd_dai_stream *io) in rsnd_ssi_pio_interrupt() argument
877 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_interrupt()
892 if (rsnd_io_is_play(io)) in rsnd_ssi_pio_interrupt()
918 struct rsnd_dai_stream *io, in rsnd_ssi_pio_init() argument
921 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_init()
924 if (!rsnd_ssi_is_parent(mod, io)) { in rsnd_ssi_pio_init()
932 return rsnd_ssi_init(mod, io, priv); in rsnd_ssi_pio_init()
936 struct rsnd_dai_stream *io, in rsnd_ssi_pio_pointer() argument
940 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_pointer()
963 struct rsnd_dai_stream *io, in rsnd_ssi_dma_probe() argument
972 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_dma_probe()
975 ret = rsnd_ssi_common_probe(mod, io, priv); in rsnd_ssi_dma_probe()
980 ret = rsnd_dma_attach(io, mod, &io->dma); in rsnd_ssi_dma_probe()
986 struct rsnd_dai_stream *io, in rsnd_ssi_fallback() argument
1005 static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, in rsnd_ssi_dma_req() argument
1009 int is_play = rsnd_io_is_play(io); in rsnd_ssi_dma_req()
1023 if (rsnd_ssi_use_busif(io)) in rsnd_ssi_dma_req()
1034 struct rsnd_dai_stream *io, in rsnd_ssi_debug_info() argument
1037 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_debug_info()
1046 seq_printf(m, "multi secondary: %d\n", rsnd_ssi_is_multi_secondary(mod, io)); in rsnd_ssi_debug_info()
1047 seq_printf(m, "tdm: %d, %d\n", rsnd_runtime_is_tdm(io), in rsnd_ssi_debug_info()
1048 rsnd_runtime_is_tdm_split(io)); in rsnd_ssi_debug_info()
1086 struct rsnd_dai_stream *io) in rsnd_ssi_connect() argument
1088 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_connect()
1101 if (!rsnd_io_to_mod(io, type)) { in rsnd_ssi_connect()
1102 rsnd_dai_connect(mod, io, type); in rsnd_ssi_connect()