Lines Matching refs:etdm_data

250 	struct mtk_dai_etdm_priv *etdm_data;  in is_cowork_mode()  local
254 etdm_data = afe_priv->dai_priv[dai->id]; in is_cowork_mode()
256 return (etdm_data->cowork_slv_count > 0 || in is_cowork_mode()
257 etdm_data->cowork_source_id != COWORK_ETDM_NONE); in is_cowork_mode()
282 struct mtk_dai_etdm_priv *etdm_data; in get_etdm_cowork_master_id() local
287 etdm_data = afe_priv->dai_priv[dai->id]; in get_etdm_cowork_master_id()
288 dai_id = etdm_data->cowork_source_id; in get_etdm_cowork_master_id()
389 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_enable_mclk() local
401 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_enable_mclk()
403 apll = etdm_data->mclk_apll; in mtk_dai_etdm_enable_mclk()
417 if (etdm_data->mclk_dir == SND_SOC_CLOCK_OUT) in mtk_dai_etdm_enable_mclk()
432 etdm_data->mclk_freq); in mtk_dai_etdm_enable_mclk()
1733 struct mtk_dai_etdm_priv *etdm_data; in mt8188_etdm_sync_mode_slv() local
1741 etdm_data = afe_priv->dai_priv[dai_id]; in mt8188_etdm_sync_mode_slv()
1743 cowork_source_sel = etdm_cowork_slv_sel(etdm_data->cowork_source_id, in mt8188_etdm_sync_mode_slv()
1786 struct mtk_dai_etdm_priv *etdm_data; in mt8188_etdm_sync_mode_mst() local
1796 etdm_data = afe_priv->dai_priv[dai_id]; in mt8188_etdm_sync_mode_mst()
1798 cowork_source_sel = etdm_cowork_sync_sel(etdm_data->cowork_source_id); in mt8188_etdm_sync_mode_mst()
1846 struct mtk_dai_etdm_priv *etdm_data; in mt8188_etdm_sync_mode_configure() local
1850 etdm_data = afe_priv->dai_priv[dai_id]; in mt8188_etdm_sync_mode_configure()
1852 if (etdm_data->cowork_source_id == COWORK_ETDM_NONE) in mt8188_etdm_sync_mode_configure()
1855 if (etdm_data->slave_mode) in mt8188_etdm_sync_mode_configure()
1902 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_in_configure() local
1914 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_in_configure()
1915 slave_mode = etdm_data->slave_mode; in mtk_dai_etdm_in_configure()
1916 data_mode = etdm_data->data_mode; in mtk_dai_etdm_in_configure()
1917 lrck_width = etdm_data->lrck_width; in mtk_dai_etdm_in_configure()
1965 if (etdm_data->in_disable_ch[i] && in mtk_dai_etdm_in_configure()
1966 etdm_data->in_disable_ch[i + 1]) in mtk_dai_etdm_in_configure()
1982 if (etdm_data->lrck_inv) in mtk_dai_etdm_in_configure()
1984 if (etdm_data->bck_inv) in mtk_dai_etdm_in_configure()
1987 if (etdm_data->lrck_inv) in mtk_dai_etdm_in_configure()
1989 if (etdm_data->bck_inv) in mtk_dai_etdm_in_configure()
2001 if (etdm_data->in_disable_ch[i] && in mtk_dai_etdm_in_configure()
2002 !etdm_data->in_disable_ch[i + 1]) { in mtk_dai_etdm_in_configure()
2005 } else if (!etdm_data->in_disable_ch[i] && in mtk_dai_etdm_in_configure()
2006 etdm_data->in_disable_ch[i + 1]) { in mtk_dai_etdm_in_configure()
2020 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_out_configure() local
2031 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_out_configure()
2032 slave_mode = etdm_data->slave_mode; in mtk_dai_etdm_out_configure()
2033 lrck_width = etdm_data->lrck_width; in mtk_dai_etdm_out_configure()
2085 if (etdm_data->lrck_inv) in mtk_dai_etdm_out_configure()
2087 if (etdm_data->bck_inv) in mtk_dai_etdm_out_configure()
2090 if (etdm_data->lrck_inv) in mtk_dai_etdm_out_configure()
2092 if (etdm_data->bck_inv) in mtk_dai_etdm_out_configure()
2107 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_configure() local
2119 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_configure()
2120 slave_mode = etdm_data->slave_mode; in mtk_dai_etdm_configure()
2121 etdm_data->rate = rate; in mtk_dai_etdm_configure()
2128 __func__, etdm_data->format, etdm_data->data_mode, in mtk_dai_etdm_configure()
2129 etdm_data->lrck_inv, etdm_data->lrck_width, etdm_data->bck_inv, in mtk_dai_etdm_configure()
2130 etdm_data->slave_mode); in mtk_dai_etdm_configure()
2134 etdm_channels = (etdm_data->data_mode == MTK_DAI_ETDM_DATA_ONE_PIN) ? in mtk_dai_etdm_configure()
2150 val |= FIELD_PREP(ETDM_CON0_FORMAT_MASK, etdm_data->format); in mtk_dai_etdm_configure()
2236 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_cal_mclk() local
2242 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_cal_mclk()
2245 etdm_data->mclk_freq = freq; in mtk_dai_etdm_cal_mclk()
2249 if (etdm_data->mclk_fixed_apll == 0) in mtk_dai_etdm_cal_mclk()
2252 apll = etdm_data->mclk_apll; in mtk_dai_etdm_cal_mclk()
2266 if (etdm_data->mclk_fixed_apll == 0) in mtk_dai_etdm_cal_mclk()
2267 etdm_data->mclk_apll = apll; in mtk_dai_etdm_cal_mclk()
2268 etdm_data->mclk_freq = freq; in mtk_dai_etdm_cal_mclk()
2278 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_set_sysclk() local
2290 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_set_sysclk()
2291 etdm_data->mclk_dir = dir; in mtk_dai_etdm_set_sysclk()
2301 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_set_tdm_slot() local
2311 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_set_tdm_slot()
2316 etdm_data->slots = slots; in mtk_dai_etdm_set_tdm_slot()
2317 etdm_data->lrck_width = slot_width; in mtk_dai_etdm_set_tdm_slot()
2325 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_etdm_set_fmt() local
2329 etdm_data = afe_priv->dai_priv[dai->id]; in mtk_dai_etdm_set_fmt()
2333 etdm_data->format = MTK_DAI_ETDM_FORMAT_I2S; in mtk_dai_etdm_set_fmt()
2336 etdm_data->format = MTK_DAI_ETDM_FORMAT_LJ; in mtk_dai_etdm_set_fmt()
2339 etdm_data->format = MTK_DAI_ETDM_FORMAT_RJ; in mtk_dai_etdm_set_fmt()
2342 etdm_data->format = MTK_DAI_ETDM_FORMAT_DSPA; in mtk_dai_etdm_set_fmt()
2345 etdm_data->format = MTK_DAI_ETDM_FORMAT_DSPB; in mtk_dai_etdm_set_fmt()
2353 etdm_data->bck_inv = false; in mtk_dai_etdm_set_fmt()
2354 etdm_data->lrck_inv = false; in mtk_dai_etdm_set_fmt()
2357 etdm_data->bck_inv = false; in mtk_dai_etdm_set_fmt()
2358 etdm_data->lrck_inv = true; in mtk_dai_etdm_set_fmt()
2361 etdm_data->bck_inv = true; in mtk_dai_etdm_set_fmt()
2362 etdm_data->lrck_inv = false; in mtk_dai_etdm_set_fmt()
2365 etdm_data->bck_inv = true; in mtk_dai_etdm_set_fmt()
2366 etdm_data->lrck_inv = true; in mtk_dai_etdm_set_fmt()
2374 etdm_data->slave_mode = true; in mtk_dai_etdm_set_fmt()
2377 etdm_data->slave_mode = false; in mtk_dai_etdm_set_fmt()
2420 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_hdmitx_dptx_hw_params() local
2429 etdm_data = afe_priv->dai_priv[dai->id]; in mtk_dai_hdmitx_dptx_hw_params()
2444 etdm_data->data_mode = MTK_DAI_ETDM_DATA_ONE_PIN; in mtk_dai_hdmitx_dptx_hw_params()
2450 etdm_data->data_mode = MTK_DAI_ETDM_DATA_MULTI_PIN; in mtk_dai_hdmitx_dptx_hw_params()
2465 struct mtk_dai_etdm_priv *etdm_data; in mtk_dai_hdmitx_dptx_set_sysclk() local
2469 etdm_data = afe_priv->dai_priv[dai->id]; in mtk_dai_hdmitx_dptx_set_sysclk()
2474 etdm_data->mclk_dir = dir; in mtk_dai_hdmitx_dptx_set_sysclk()
2576 struct mtk_dai_etdm_priv *etdm_data; in mt8188_etdm_update_sync_info() local
2582 etdm_data = afe_priv->dai_priv[i]; in mt8188_etdm_update_sync_info()
2583 if (etdm_data->cowork_source_id != COWORK_ETDM_NONE) { in mt8188_etdm_update_sync_info()
2584 mst_dai_id = etdm_data->cowork_source_id; in mt8188_etdm_update_sync_info()
2599 struct mtk_dai_etdm_priv *etdm_data; in mt8188_dai_etdm_parse_of() local
2621 etdm_data = afe_priv->dai_priv[dai_id]; in mt8188_dai_etdm_parse_of()
2626 etdm_data->data_mode = of_property_read_bool(of_node, prop); in mt8188_dai_etdm_parse_of()
2636 etdm_data->cowork_source_id = COWORK_ETDM_NONE; in mt8188_dai_etdm_parse_of()
2639 etdm_data->cowork_source_id = in mt8188_dai_etdm_parse_of()
2643 etdm_data->cowork_source_id = COWORK_ETDM_NONE; in mt8188_dai_etdm_parse_of()
2650 etdm_data = afe_priv->dai_priv[dai_id]; in mt8188_dai_etdm_parse_of()
2666 etdm_data->in_disable_ch[disable_chn[j]] = true; in mt8188_dai_etdm_parse_of()