Lines Matching full:io

113 #define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io))  argument
114 #define rsnd_ssi_is_multi_secondary(mod, io) \ argument
115 (rsnd_ssi_multi_secondaries(io) & (1 << rsnd_mod_id(mod)))
116 #define rsnd_ssi_is_run_mods(mod, io) \ argument
117 (rsnd_ssi_run_mods(io) & (1 << rsnd_mod_id(mod)))
120 int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) in rsnd_ssi_use_busif() argument
122 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_use_busif()
131 if (rsnd_io_to_mod_src(io)) in rsnd_ssi_use_busif()
166 static u32 rsnd_ssi_multi_secondaries(struct rsnd_dai_stream *io) in rsnd_ssi_multi_secondaries() argument
177 struct rsnd_mod *mod = rsnd_io_to_mod(io, types[i]); in rsnd_ssi_multi_secondaries()
188 static u32 rsnd_ssi_run_mods(struct rsnd_dai_stream *io) in rsnd_ssi_run_mods() argument
190 struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_run_mods()
191 struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); in rsnd_ssi_run_mods()
194 mods = rsnd_ssi_multi_secondaries_runtime(io) | in rsnd_ssi_run_mods()
203 u32 rsnd_ssi_multi_secondaries_runtime(struct rsnd_dai_stream *io) in rsnd_ssi_multi_secondaries_runtime() argument
205 if (rsnd_runtime_is_multi_ssi(io)) in rsnd_ssi_multi_secondaries_runtime()
206 return rsnd_ssi_multi_secondaries(io); in rsnd_ssi_multi_secondaries_runtime()
265 struct rsnd_dai_stream *io) in rsnd_ssi_master_clk_start() argument
267 struct rsnd_priv *priv = rsnd_io_to_priv(io); in rsnd_ssi_master_clk_start()
269 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_master_clk_start()
271 int chan = rsnd_runtime_channel_for_ssi(io); in rsnd_ssi_master_clk_start()
274 unsigned int rate = rsnd_io_is_play(io) ? in rsnd_ssi_master_clk_start()
275 rsnd_src_get_out_rate(priv, io) : in rsnd_ssi_master_clk_start()
276 rsnd_src_get_in_rate(priv, io); in rsnd_ssi_master_clk_start()
284 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_master_clk_start()
287 if (rsnd_runtime_is_tdm_split(io)) in rsnd_ssi_master_clk_start()
288 chan = rsnd_io_converted_chan(io); in rsnd_ssi_master_clk_start()
339 struct rsnd_dai_stream *io) in rsnd_ssi_master_clk_stop() argument
341 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_master_clk_stop()
361 struct rsnd_dai_stream *io) in rsnd_ssi_config_init() argument
363 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_config_init()
366 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_config_init()
374 is_tdm = rsnd_runtime_is_tdm(io); in rsnd_ssi_config_init()
375 is_tdm_split = rsnd_runtime_is_tdm_split(io); in rsnd_ssi_config_init()
407 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_config_init()
410 if (rsnd_io_is_play(io)) in rsnd_ssi_config_init()
468 struct rsnd_dai_stream *io, in rsnd_ssi_init() argument
474 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_init()
477 ret = rsnd_ssi_master_clk_start(mod, io); in rsnd_ssi_init()
487 rsnd_ssi_config_init(mod, io); in rsnd_ssi_init()
498 struct rsnd_dai_stream *io, in rsnd_ssi_quit() argument
504 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_quit()
512 rsnd_ssi_master_clk_stop(mod, io); in rsnd_ssi_quit()
528 struct rsnd_dai_stream *io, in rsnd_ssi_hw_params() argument
532 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_hw_params()
536 struct rsnd_priv *priv = rsnd_io_to_priv(io); in rsnd_ssi_hw_params()
547 struct rsnd_dai_stream *io, in rsnd_ssi_start() argument
552 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_start()
559 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_start()
566 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_start()
580 struct rsnd_dai_stream *io, in rsnd_ssi_stop() argument
586 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_stop()
589 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_stop()
600 if (rsnd_io_is_play(io)) { in rsnd_ssi_stop()
608 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_stop()
624 struct rsnd_dai_stream *io, in rsnd_ssi_irq() argument
632 is_tdm = rsnd_runtime_is_tdm(io); in rsnd_ssi_irq()
633 is_tdm_split = rsnd_runtime_is_tdm_split(io); in rsnd_ssi_irq()
638 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_irq()
641 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_irq()
666 struct rsnd_dai_stream *io);
668 struct rsnd_dai_stream *io) in __rsnd_ssi_interrupt() argument
680 if (!rsnd_io_is_working(io)) in __rsnd_ssi_interrupt()
687 elapsed = rsnd_ssi_pio_interrupt(mod, io); in __rsnd_ssi_interrupt()
704 rsnd_dai_period_elapsed(io); in __rsnd_ssi_interrupt()
707 snd_pcm_stop_xrun(io->substream); in __rsnd_ssi_interrupt()
721 struct rsnd_dai_stream *io, in rsnd_ssi_get_status() argument
729 * how many SSI requests parent SSI. Thus, it is localed on "io" now. in rsnd_ssi_get_status()
741 * IO-0: SRC0 -> CTU1 -+-> MUX -> DVC -> SSIU -> SSI0 in rsnd_ssi_get_status()
743 * IO-1: SRC1 -> CTU2 -+ in rsnd_ssi_get_status()
745 * 1) start IO-0 -> start SSI0 in rsnd_ssi_get_status()
746 * 2) start IO-1 -> SSI0 doesn't need to start, because it is in rsnd_ssi_get_status()
750 return &io->parent_ssi_status; in rsnd_ssi_get_status()
752 return rsnd_mod_get_status(mod, io, type); in rsnd_ssi_get_status()
759 struct rsnd_dai_stream *io) in rsnd_ssi_parent_attach() argument
761 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_parent_attach()
770 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_parent_attach()
777 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 0), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
780 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 3), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
783 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 7), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
789 struct rsnd_dai_stream *io, in rsnd_ssi_pcm_new() argument
797 rsnd_ssi_parent_attach(mod, io); in rsnd_ssi_pcm_new()
803 struct rsnd_dai_stream *io, in rsnd_ssi_common_probe() argument
814 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_common_probe()
846 struct rsnd_dai_stream *io, in rsnd_ssi_common_remove() argument
850 struct rsnd_mod *pure_ssi_mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_common_remove()
870 struct rsnd_dai_stream *io) in rsnd_ssi_pio_interrupt() argument
872 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_interrupt()
887 if (rsnd_io_is_play(io)) in rsnd_ssi_pio_interrupt()
913 struct rsnd_dai_stream *io, in rsnd_ssi_pio_init() argument
916 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_init()
919 if (!rsnd_ssi_is_parent(mod, io)) { in rsnd_ssi_pio_init()
927 return rsnd_ssi_init(mod, io, priv); in rsnd_ssi_pio_init()
931 struct rsnd_dai_stream *io, in rsnd_ssi_pio_pointer() argument
935 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_pointer()
958 struct rsnd_dai_stream *io, in rsnd_ssi_dma_probe() argument
967 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_dma_probe()
970 ret = rsnd_ssi_common_probe(mod, io, priv); in rsnd_ssi_dma_probe()
975 ret = rsnd_dma_attach(io, mod, &io->dma); in rsnd_ssi_dma_probe()
981 struct rsnd_dai_stream *io, in rsnd_ssi_fallback() argument
1000 static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, in rsnd_ssi_dma_req() argument
1004 int is_play = rsnd_io_is_play(io); in rsnd_ssi_dma_req()
1018 if (rsnd_ssi_use_busif(io)) in rsnd_ssi_dma_req()
1029 struct rsnd_dai_stream *io, in rsnd_ssi_debug_info() argument
1032 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_debug_info()
1041 seq_printf(m, "multi secondary: %d\n", rsnd_ssi_is_multi_secondary(mod, io)); in rsnd_ssi_debug_info()
1042 seq_printf(m, "tdm: %d, %d\n", rsnd_runtime_is_tdm(io), in rsnd_ssi_debug_info()
1043 rsnd_runtime_is_tdm_split(io)); in rsnd_ssi_debug_info()
1081 struct rsnd_dai_stream *io) in rsnd_ssi_connect() argument
1083 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_connect()
1096 if (!rsnd_io_to_mod(io, type)) { in rsnd_ssi_connect()
1097 rsnd_dai_connect(mod, io, type); in rsnd_ssi_connect()