Lines Matching refs:rdai
226 struct rsnd_dai *rdai; in rsnd_mod_interrupt() local
229 for_each_rsnd_dai(rdai, priv, i) { in rsnd_mod_interrupt()
230 struct rsnd_dai_stream *io = &rdai->playback; in rsnd_mod_interrupt()
235 io = &rdai->capture; in rsnd_mod_interrupt()
312 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_runtime_channel_for_ssi_with_params() local
319 chan /= rsnd_rdai_ssi_lane_get(rdai); in rsnd_runtime_channel_for_ssi_with_params()
326 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_runtime_is_multi_ssi() local
327 int lane = rsnd_rdai_ssi_lane_get(rdai); in rsnd_runtime_is_multi_ssi()
611 int rsnd_rdai_channels_ctrl(struct rsnd_dai *rdai, in rsnd_rdai_channels_ctrl() argument
615 rdai->max_channels = max_channels; in rsnd_rdai_channels_ctrl()
617 return rdai->max_channels; in rsnd_rdai_channels_ctrl()
620 int rsnd_rdai_ssi_lane_ctrl(struct rsnd_dai *rdai, in rsnd_rdai_ssi_lane_ctrl() argument
624 rdai->ssi_lane = ssi_lane; in rsnd_rdai_ssi_lane_ctrl()
626 return rdai->ssi_lane; in rsnd_rdai_ssi_lane_ctrl()
629 int rsnd_rdai_width_ctrl(struct rsnd_dai *rdai, int width) in rsnd_rdai_width_ctrl() argument
632 rdai->chan_width = width; in rsnd_rdai_width_ctrl()
634 return rdai->chan_width; in rsnd_rdai_width_ctrl()
642 return priv->rdai + id; in rsnd_rdai_get()
699 struct rsnd_dai_stream *rsnd_rdai_to_io(struct rsnd_dai *rdai, in rsnd_rdai_to_io() argument
703 return &rdai->playback; in rsnd_rdai_to_io()
705 return &rdai->capture; in rsnd_rdai_to_io()
712 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_trigger() local
713 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_soc_dai_trigger()
756 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_set_fmt() local
761 rdai->clk_master = 0; in rsnd_soc_dai_set_fmt()
764 rdai->clk_master = 1; /* cpu is master */ in rsnd_soc_dai_set_fmt()
771 rdai->bit_clk_inv = 0; in rsnd_soc_dai_set_fmt()
774 rdai->sys_delay = 0; in rsnd_soc_dai_set_fmt()
775 rdai->data_alignment = 0; in rsnd_soc_dai_set_fmt()
776 rdai->frm_clk_inv = 0; in rsnd_soc_dai_set_fmt()
780 rdai->sys_delay = 1; in rsnd_soc_dai_set_fmt()
781 rdai->data_alignment = 0; in rsnd_soc_dai_set_fmt()
782 rdai->frm_clk_inv = 1; in rsnd_soc_dai_set_fmt()
785 rdai->sys_delay = 1; in rsnd_soc_dai_set_fmt()
786 rdai->data_alignment = 1; in rsnd_soc_dai_set_fmt()
787 rdai->frm_clk_inv = 1; in rsnd_soc_dai_set_fmt()
790 rdai->sys_delay = 0; in rsnd_soc_dai_set_fmt()
791 rdai->data_alignment = 0; in rsnd_soc_dai_set_fmt()
792 rdai->frm_clk_inv = 1; in rsnd_soc_dai_set_fmt()
799 rdai->frm_clk_inv = !rdai->frm_clk_inv; in rsnd_soc_dai_set_fmt()
802 rdai->bit_clk_inv = !rdai->bit_clk_inv; in rsnd_soc_dai_set_fmt()
805 rdai->bit_clk_inv = !rdai->bit_clk_inv; in rsnd_soc_dai_set_fmt()
806 rdai->frm_clk_inv = !rdai->frm_clk_inv; in rsnd_soc_dai_set_fmt()
821 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_set_dai_tdm_slot() local
847 rsnd_rdai_channels_set(rdai, slots); in rsnd_soc_set_dai_tdm_slot()
848 rsnd_rdai_ssi_lane_set(rdai, 1); in rsnd_soc_set_dai_tdm_slot()
849 rsnd_rdai_width_set(rdai, slot_width); in rsnd_soc_set_dai_tdm_slot()
878 static int rsnd_soc_hw_rule(struct rsnd_dai *rdai, in rsnd_soc_hw_rule() argument
896 rate = rsnd_ssi_clk_query(rdai, in rsnd_soc_hw_rule()
903 rate = rsnd_ssi_clk_query(rdai, in rsnd_soc_hw_rule()
913 struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai); in rsnd_soc_hw_rule()
931 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_soc_hw_rule_rate() local
942 return rsnd_soc_hw_rule(rdai, rsnd_soc_hw_rate_list, in rsnd_soc_hw_rule_rate()
954 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); in rsnd_soc_hw_rule_channels() local
965 return rsnd_soc_hw_rule(rdai, rsnd_soc_hw_channels_list, in rsnd_soc_hw_rule_channels()
985 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_startup() local
986 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_soc_dai_startup()
987 struct snd_pcm_hw_constraint_list *constraint = &rdai->constraint; in rsnd_soc_dai_startup()
989 unsigned int max_channels = rsnd_rdai_channels_get(rdai); in rsnd_soc_dai_startup()
1022 if (rsnd_rdai_is_clk_master(rdai)) { in rsnd_soc_dai_startup()
1027 is_play ? &rdai->playback : &rdai->capture, in rsnd_soc_dai_startup()
1031 is_play ? &rdai->playback : &rdai->capture, in rsnd_soc_dai_startup()
1041 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_shutdown() local
1042 struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai); in rsnd_soc_dai_shutdown()
1043 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_soc_dai_shutdown()
1057 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_prepare() local
1058 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_soc_dai_prepare()
1165 void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name, in rsnd_parse_connect_common() argument
1171 struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai); in rsnd_parse_connect_common()
1192 rsnd_dai_connect(mod, &rdai->playback, mod->type); in rsnd_parse_connect_common()
1194 rsnd_dai_connect(mod, &rdai->capture, mod->type); in rsnd_parse_connect_common()
1350 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_soc_dai_pcm_new() local
1353 ret = rsnd_dai_call(pcm_new, &rdai->playback, rtd); in rsnd_soc_dai_pcm_new()
1357 ret = rsnd_dai_call(pcm_new, &rdai->capture, rtd); in rsnd_soc_dai_pcm_new()
1361 ret = rsnd_preallocate_pages(rtd, &rdai->playback, in rsnd_soc_dai_pcm_new()
1366 ret = rsnd_preallocate_pages(rtd, &rdai->capture, in rsnd_soc_dai_pcm_new()
1395 struct rsnd_dai *rdai; in __rsnd_dai_probe() local
1400 rdai = rsnd_rdai_get(priv, dai_i); in __rsnd_dai_probe()
1402 io_playback = &rdai->playback; in __rsnd_dai_probe()
1403 io_capture = &rdai->capture; in __rsnd_dai_probe()
1405 snprintf(rdai->name, RSND_DAI_NAME_SIZE, "rsnd-dai.%d", dai_i); in __rsnd_dai_probe()
1408 rdai->dai_args.np = node_np; in __rsnd_dai_probe()
1409 rdai->dai_args.args_count = 1; in __rsnd_dai_probe()
1410 rdai->dai_args.args[0] = node_arg; in __rsnd_dai_probe()
1412 rdai->priv = priv; in __rsnd_dai_probe()
1413 drv->name = rdai->name; in __rsnd_dai_probe()
1416 drv->dai_args = &rdai->dai_args; in __rsnd_dai_probe()
1418 io_playback->rdai = rdai; in __rsnd_dai_probe()
1419 io_capture->rdai = rdai; in __rsnd_dai_probe()
1420 rsnd_rdai_channels_set(rdai, 2); /* default 2ch */ in __rsnd_dai_probe()
1421 rsnd_rdai_ssi_lane_set(rdai, 1); /* default 1lane */ in __rsnd_dai_probe()
1422 rsnd_rdai_width_set(rdai, 32); /* default 32bit width */ in __rsnd_dai_probe()
1439 rsnd_parse_connect_ssi(rdai, playback, capture); in __rsnd_dai_probe()
1440 rsnd_parse_connect_ssiu(rdai, playback, capture); in __rsnd_dai_probe()
1441 rsnd_parse_connect_src(rdai, playback, capture); in __rsnd_dai_probe()
1442 rsnd_parse_connect_ctu(rdai, playback, capture); in __rsnd_dai_probe()
1443 rsnd_parse_connect_mix(rdai, playback, capture); in __rsnd_dai_probe()
1444 rsnd_parse_connect_dvc(rdai, playback, capture); in __rsnd_dai_probe()
1473 dev_dbg(dev, "%s (%s/%s)\n", rdai->name, in __rsnd_dai_probe()
1483 struct rsnd_dai *rdai; in rsnd_dai_probe() local
1493 rdai = devm_kcalloc(dev, nr, sizeof(*rdai), GFP_KERNEL); in rsnd_dai_probe()
1494 if (!rdrv || !rdai) in rsnd_dai_probe()
1499 priv->rdai = rdai; in rsnd_dai_probe()
1516 rdai = rsnd_rdai_get(priv, dai_i); in rsnd_dai_probe()
1518 rsnd_parse_connect_graph(priv, &rdai->playback, dai_np); in rsnd_dai_probe()
1519 rsnd_parse_connect_graph(priv, &rdai->capture, dai_np); in rsnd_dai_probe()
1535 rdai = rsnd_rdai_get(priv, dai_i); in rsnd_dai_probe()
1537 rsnd_parse_connect_simple(priv, &rdai->playback, dai_np); in rsnd_dai_probe()
1538 rsnd_parse_connect_simple(priv, &rdai->capture, dai_np); in rsnd_dai_probe()
1555 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_hw_update() local
1556 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_hw_update()
1576 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_hw_params() local
1577 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_hw_params()
1692 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); in rsnd_pointer() local
1693 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); in rsnd_pointer()
1956 struct rsnd_dai *rdai; in rsnd_probe() local
1993 for_each_rsnd_dai(rdai, priv, i) { in rsnd_probe()
1994 ret = rsnd_rdai_continuance_probe(priv, &rdai->playback); in rsnd_probe()
1998 ret = rsnd_rdai_continuance_probe(priv, &rdai->capture); in rsnd_probe()
2028 for_each_rsnd_dai(rdai, priv, i) { in rsnd_probe()
2029 rsnd_dai_call(remove, &rdai->playback, priv); in rsnd_probe()
2030 rsnd_dai_call(remove, &rdai->capture, priv); in rsnd_probe()
2047 struct rsnd_dai *rdai; in rsnd_remove() local
2062 for_each_rsnd_dai(rdai, priv, i) { in rsnd_remove()
2065 ret = rsnd_dai_call(remove, &rdai->playback, priv); in rsnd_remove()
2069 ret = rsnd_dai_call(remove, &rdai->capture, priv); in rsnd_remove()