Lines Matching refs:i2s_data

280 				 struct mtk_afe_i2s_priv *i2s_data,  in mt8365_dai_set_config()  argument
286 &afe_priv->be_data[i2s_data->id - MT8365_AFE_BACKEND_BASE]; in mt8365_dai_set_config()
297 reg_off = i2s_data->reg_off_in; in mt8365_dai_set_config()
298 if (i2s_data->adda_link) in mt8365_dai_set_config()
299 val |= i2s_data->config_val_in; in mt8365_dai_set_config()
301 reg_off = i2s_data->reg_off_out; in mt8365_dai_set_config()
302 val |= i2s_data->config_val_in; in mt8365_dai_set_config()
306 if (i2s_data->dynamic_bck) { in mt8365_dai_set_config()
323 if (i2s_data->adda_link && is_input) in mt8365_dai_set_config()
333 struct mtk_afe_i2s_priv *i2s_data = in mt8365_afe_set_i2s_out() local
336 return mt8365_dai_set_config(afe, i2s_data, false, rate, bit_width); in mt8365_afe_set_i2s_out()
468 struct mtk_afe_i2s_priv *i2s_data = NULL; in mt8365_afe_set_i2s_out_enable() local
472 i2s_data = afe_priv->dai_priv[mt8365_i2s_priv[i].id]; in mt8365_afe_set_i2s_out_enable()
475 if (!i2s_data) in mt8365_afe_set_i2s_out_enable()
481 i2s_data->i2s_out_on_ref_cnt++; in mt8365_afe_set_i2s_out_enable()
482 if (i2s_data->i2s_out_on_ref_cnt == 1) in mt8365_afe_set_i2s_out_enable()
486 i2s_data->i2s_out_on_ref_cnt--; in mt8365_afe_set_i2s_out_enable()
487 if (i2s_data->i2s_out_on_ref_cnt == 0) in mt8365_afe_set_i2s_out_enable()
490 else if (i2s_data->i2s_out_on_ref_cnt < 0) in mt8365_afe_set_i2s_out_enable()
491 i2s_data->i2s_out_on_ref_cnt = 0; in mt8365_afe_set_i2s_out_enable()
498 struct mtk_afe_i2s_priv *i2s_data, in mt8365_dai_set_enable() argument
504 reg_off = i2s_data->reg_off_in; in mt8365_dai_set_enable()
506 if (i2s_data->adda_link) { in mt8365_dai_set_enable()
510 reg_off = i2s_data->reg_off_out; in mt8365_dai_set_enable()
521 struct mtk_afe_i2s_priv *i2s_data = afe_priv->dai_priv[dai->id]; in mt8365_dai_i2s_startup() local
531 clk_prepare_enable(afe_priv->clocks[i2s_data->clk_id_out]); in mt8365_dai_i2s_startup()
534 clk_prepare_enable(afe_priv->clocks[i2s_data->clk_id_in]); in mt8365_dai_i2s_startup()
547 struct mtk_afe_i2s_priv *i2s_data = afe_priv->dai_priv[dai->id]; in mt8365_dai_i2s_shutdown() local
558 mt8365_dai_set_enable(afe, i2s_data, false, false); in mt8365_dai_i2s_shutdown()
561 mt8365_dai_set_enable(afe, i2s_data, true, false); in mt8365_dai_i2s_shutdown()
577 afe_priv->clocks[i2s_data->clk_id_out]); in mt8365_dai_i2s_shutdown()
581 afe_priv->clocks[i2s_data->clk_id_in]); in mt8365_dai_i2s_shutdown()
594 struct mtk_afe_i2s_priv *i2s_data = afe_priv->dai_priv[dai->id]; in mt8365_dai_i2s_prepare() local
609 ret = mt8365_dai_set_config(afe, i2s_data, false, rate, bit_width); in mt8365_dai_i2s_prepare()
623 ret = mt8365_dai_set_config(afe, i2s_data, true, rate, bit_width); in mt8365_dai_i2s_prepare()
635 afe_priv->clocks[i2s_data->clk_id_out_m_sel], in mt8365_dai_i2s_prepare()
641 afe_priv->clocks[i2s_data->clk_id_out], in mt8365_dai_i2s_prepare()
642 rate * i2s_data->clk_out_mult); in mt8365_dai_i2s_prepare()
644 mt8365_dai_set_enable(afe, i2s_data, false, true); in mt8365_dai_i2s_prepare()
650 afe_priv->clocks[i2s_data->clk_id_in_m_sel], in mt8365_dai_i2s_prepare()
656 afe_priv->clocks[i2s_data->clk_id_in], in mt8365_dai_i2s_prepare()
657 rate * i2s_data->clk_in_mult); in mt8365_dai_i2s_prepare()
659 mt8365_dai_set_enable(afe, i2s_data, true, true); in mt8365_dai_i2s_prepare()