Lines Matching refs:be
45 struct axg_dai_link_tdm_data *be = in axg_card_tdm_be_hw_params() local
48 return meson_card_i2s_set_sysclk(substream, params, be->mclk_fs); in axg_card_tdm_be_hw_params()
58 struct axg_dai_link_tdm_data *be = in axg_card_tdm_dai_init() local
65 be->codec_masks[i].tx, in axg_card_tdm_dai_init()
66 be->codec_masks[i].rx, in axg_card_tdm_dai_init()
67 be->slots, be->slot_width); in axg_card_tdm_dai_init()
75 ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), be->tx_mask, be->rx_mask, in axg_card_tdm_dai_init()
76 be->slots, be->slot_width); in axg_card_tdm_dai_init()
88 struct axg_dai_link_tdm_data *be = in axg_card_tdm_dai_lb_init() local
93 ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), NULL, be->tx_mask, in axg_card_tdm_dai_lb_init()
94 be->slots, be->slot_width); in axg_card_tdm_dai_lb_init()
160 struct axg_dai_link_tdm_data *be) in axg_card_parse_cpu_tdm_slots() argument
166 be->tx_mask = devm_kcalloc(card->dev, AXG_TDM_NUM_LANES, in axg_card_parse_cpu_tdm_slots()
167 sizeof(*be->tx_mask), GFP_KERNEL); in axg_card_parse_cpu_tdm_slots()
168 be->rx_mask = devm_kcalloc(card->dev, AXG_TDM_NUM_LANES, in axg_card_parse_cpu_tdm_slots()
169 sizeof(*be->rx_mask), GFP_KERNEL); in axg_card_parse_cpu_tdm_slots()
170 if (!be->tx_mask || !be->rx_mask) in axg_card_parse_cpu_tdm_slots()
175 snd_soc_of_get_slot_mask(node, propname, &be->tx_mask[i]); in axg_card_parse_cpu_tdm_slots()
176 tx = max(tx, be->tx_mask[i]); in axg_card_parse_cpu_tdm_slots()
185 snd_soc_of_get_slot_mask(node, propname, &be->rx_mask[i]); in axg_card_parse_cpu_tdm_slots()
186 rx = max(rx, be->rx_mask[i]); in axg_card_parse_cpu_tdm_slots()
199 of_property_read_u32(node, "dai-tdm-slot-num", &be->slots); in axg_card_parse_cpu_tdm_slots()
200 if (!be->slots) { in axg_card_parse_cpu_tdm_slots()
205 be->slots = fls(max(tx, rx)); in axg_card_parse_cpu_tdm_slots()
206 } else if (be->slots < fls(max(tx, rx)) || be->slots > 32) { in axg_card_parse_cpu_tdm_slots()
215 of_property_read_u32(node, "dai-tdm-slot-width", &be->slot_width); in axg_card_parse_cpu_tdm_slots()
223 struct axg_dai_link_tdm_data *be) in axg_card_parse_codecs_masks() argument
233 be->codec_masks = codec_mask; in axg_card_parse_codecs_masks()
253 struct axg_dai_link_tdm_data *be; in axg_card_parse_tdm() local
257 be = devm_kzalloc(card->dev, sizeof(*be), GFP_KERNEL); in axg_card_parse_tdm()
258 if (!be) in axg_card_parse_tdm()
260 priv->link_data[*index] = be; in axg_card_parse_tdm()
267 of_property_read_u32(node, "mclk-fs", &be->mclk_fs); in axg_card_parse_tdm()
269 ret = axg_card_parse_cpu_tdm_slots(card, link, node, be); in axg_card_parse_tdm()
275 ret = axg_card_parse_codecs_masks(card, link, node, be); in axg_card_parse_tdm()