Lines Matching refs: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()
485 rsnd_ssi_config_init(mod, io); in rsnd_ssi_init()
496 struct rsnd_dai_stream *io, in rsnd_ssi_quit() argument
502 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_quit()
510 rsnd_ssi_master_clk_stop(mod, io); in rsnd_ssi_quit()
526 struct rsnd_dai_stream *io, in rsnd_ssi_hw_params() argument
530 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_hw_params()
534 struct rsnd_priv *priv = rsnd_io_to_priv(io); in rsnd_ssi_hw_params()
545 struct rsnd_dai_stream *io, in rsnd_ssi_start() argument
550 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_start()
557 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_start()
564 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_start()
578 struct rsnd_dai_stream *io, in rsnd_ssi_stop() argument
584 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_stop()
587 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_stop()
598 if (rsnd_io_is_play(io)) { in rsnd_ssi_stop()
606 if (rsnd_ssi_multi_secondaries_runtime(io)) in rsnd_ssi_stop()
622 struct rsnd_dai_stream *io, in rsnd_ssi_irq() argument
630 is_tdm = rsnd_runtime_is_tdm(io); in rsnd_ssi_irq()
631 is_tdm_split = rsnd_runtime_is_tdm_split(io); in rsnd_ssi_irq()
636 if (rsnd_ssi_is_parent(mod, io)) in rsnd_ssi_irq()
639 if (!rsnd_ssi_is_run_mods(mod, io)) in rsnd_ssi_irq()
664 struct rsnd_dai_stream *io);
666 struct rsnd_dai_stream *io) in __rsnd_ssi_interrupt() argument
678 if (!rsnd_io_is_working(io)) in __rsnd_ssi_interrupt()
685 elapsed = rsnd_ssi_pio_interrupt(mod, io); in __rsnd_ssi_interrupt()
702 rsnd_dai_period_elapsed(io); in __rsnd_ssi_interrupt()
705 snd_pcm_stop_xrun(io->substream); in __rsnd_ssi_interrupt()
719 struct rsnd_dai_stream *io, in rsnd_ssi_get_status() argument
748 return &io->parent_ssi_status; in rsnd_ssi_get_status()
750 return rsnd_mod_get_status(mod, io, type); in rsnd_ssi_get_status()
757 struct rsnd_dai_stream *io) in rsnd_ssi_parent_attach() argument
759 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_parent_attach()
768 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_parent_attach()
775 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 0), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
778 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 3), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
781 rsnd_dai_connect(rsnd_ssi_mod_get(priv, 7), io, RSND_MOD_SSIP); in rsnd_ssi_parent_attach()
787 struct rsnd_dai_stream *io, in rsnd_ssi_pcm_new() argument
795 rsnd_ssi_parent_attach(mod, io); in rsnd_ssi_pcm_new()
801 struct rsnd_dai_stream *io, in rsnd_ssi_common_probe() argument
812 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_common_probe()
844 struct rsnd_dai_stream *io, in rsnd_ssi_common_remove() argument
848 struct rsnd_mod *pure_ssi_mod = rsnd_io_to_mod_ssi(io); in rsnd_ssi_common_remove()
868 struct rsnd_dai_stream *io) in rsnd_ssi_pio_interrupt() argument
870 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_interrupt()
885 if (rsnd_io_is_play(io)) in rsnd_ssi_pio_interrupt()
911 struct rsnd_dai_stream *io, in rsnd_ssi_pio_init() argument
914 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_init()
917 if (!rsnd_ssi_is_parent(mod, io)) { in rsnd_ssi_pio_init()
925 return rsnd_ssi_init(mod, io, priv); in rsnd_ssi_pio_init()
929 struct rsnd_dai_stream *io, in rsnd_ssi_pio_pointer() argument
933 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); in rsnd_ssi_pio_pointer()
956 struct rsnd_dai_stream *io, in rsnd_ssi_dma_probe() argument
965 if (rsnd_ssi_is_multi_secondary(mod, io)) in rsnd_ssi_dma_probe()
968 ret = rsnd_ssi_common_probe(mod, io, priv); in rsnd_ssi_dma_probe()
973 ret = rsnd_dma_attach(io, mod, &io->dma); in rsnd_ssi_dma_probe()
979 struct rsnd_dai_stream *io, in rsnd_ssi_fallback() argument
998 static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, in rsnd_ssi_dma_req() argument
1002 int is_play = rsnd_io_is_play(io); in rsnd_ssi_dma_req()
1016 if (rsnd_ssi_use_busif(io)) in rsnd_ssi_dma_req()
1027 struct rsnd_dai_stream *io, in rsnd_ssi_debug_info() argument
1030 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_debug_info()
1039 seq_printf(m, "multi secondary: %d\n", rsnd_ssi_is_multi_secondary(mod, io)); in rsnd_ssi_debug_info()
1040 seq_printf(m, "tdm: %d, %d\n", rsnd_runtime_is_tdm(io), in rsnd_ssi_debug_info()
1041 rsnd_runtime_is_tdm_split(io)); in rsnd_ssi_debug_info()
1079 struct rsnd_dai_stream *io) in rsnd_ssi_connect() argument
1081 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_ssi_connect()
1094 if (!rsnd_io_to_mod(io, type)) { in rsnd_ssi_connect()
1095 rsnd_dai_connect(mod, io, type); in rsnd_ssi_connect()