/linux-6.6.21/sound/soc/mediatek/mt8186/ |
D | mt8186-afe-clk.c | 76 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_set_audio_int_bus_parent() local 79 ret = clk_set_parent(afe_priv->clk[CLK_MUX_AUDIOINTBUS], in mt8186_set_audio_int_bus_parent() 80 afe_priv->clk[clk_id]); in mt8186_set_audio_int_bus_parent() 93 struct mt8186_afe_private *afe_priv = afe->platform_priv; in apll1_mux_setting() local 97 ret = clk_prepare_enable(afe_priv->clk[CLK_TOP_MUX_AUD_1]); in apll1_mux_setting() 103 ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1], in apll1_mux_setting() 104 afe_priv->clk[CLK_TOP_APLL1_CK]); in apll1_mux_setting() 113 ret = clk_prepare_enable(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]); in apll1_mux_setting() 119 ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1], in apll1_mux_setting() 120 afe_priv->clk[CLK_TOP_APLL1_D8]); in apll1_mux_setting() [all …]
|
D | mt8186-misc-control.c | 79 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_sgen_get() local 81 ucontrol->value.integer.value[0] = afe_priv->sgen_mode; in mt8186_sgen_get() 91 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_sgen_set() local 105 if (mode == afe_priv->sgen_mode) in mt8186_sgen_set() 123 afe_priv->sgen_mode = mode; in mt8186_sgen_set() 133 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_sgen_rate_get() local 135 ucontrol->value.integer.value[0] = afe_priv->sgen_rate; in mt8186_sgen_rate_get() 145 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_sgen_rate_set() local 156 if (rate == afe_priv->sgen_rate) in mt8186_sgen_rate_set() 167 afe_priv->sgen_rate = rate; in mt8186_sgen_rate_set() [all …]
|
D | mt8186-dai-adda.c | 75 struct mt8186_afe_private *afe_priv = afe->platform_priv; in get_adda_priv_by_name() local 83 return afe_priv->dai_priv[dai_id]; in get_adda_priv_by_name() 247 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() local 248 int mtkaif_dmic = afe_priv->mtkaif_dmic; in mtk_adda_ul_event() 288 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_adda_pad_top_event() local 292 if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) in mtk_adda_pad_top_event() 310 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_adda_mtkaif_cfg_event() local 316 if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) { in mtk_adda_mtkaif_cfg_event() 325 if (afe_priv->mtkaif_chosen_phase[0] < 0 && in mtk_adda_mtkaif_cfg_event() 326 afe_priv->mtkaif_chosen_phase[1] < 0) { in mtk_adda_mtkaif_cfg_event() [all …]
|
D | mt8186-dai-tdm.c | 105 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_tdm_en_event() local 107 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_tdm_en_event() 132 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_tdm_mck_en_event() local 134 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_tdm_mck_en_event() 204 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_afe_tdm_mclk_connect() local 206 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_afe_tdm_mclk_connect() 217 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_afe_tdm_mclk_apll_connect() local 219 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_afe_tdm_mclk_apll_connect() 234 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mtk_afe_tdm_hd_connect() local 236 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_afe_tdm_hd_connect() [all …]
|
D | mt8186-audsys-clk.c | 90 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_audsys_clk_unregister() local 95 if (!afe_priv) in mt8186_audsys_clk_unregister() 99 cl = afe_priv->lookup[i]; in mt8186_audsys_clk_unregister() 112 struct mt8186_afe_private *afe_priv = afe->platform_priv; in mt8186_audsys_clk_register() local 117 afe_priv->lookup = devm_kcalloc(afe->dev, CLK_AUD_NR_CLK, in mt8186_audsys_clk_register() 118 sizeof(*afe_priv->lookup), in mt8186_audsys_clk_register() 121 if (!afe_priv->lookup) in mt8186_audsys_clk_register() 147 afe_priv->lookup[i] = cl; in mt8186_audsys_clk_register()
|
/linux-6.6.21/sound/soc/mediatek/mt8183/ |
D | mt8183-afe-clk.c | 94 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_init_clock() local 97 afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk), in mt8183_init_clock() 99 if (!afe_priv->clk) in mt8183_init_clock() 103 afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]); in mt8183_init_clock() 104 if (IS_ERR(afe_priv->clk[i])) { in mt8183_init_clock() 107 PTR_ERR(afe_priv->clk[i])); in mt8183_init_clock() 108 return PTR_ERR(afe_priv->clk[i]); in mt8183_init_clock() 117 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_afe_enable_clock() local 120 ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_SYS_AUDIO]); in mt8183_afe_enable_clock() 127 ret = clk_prepare_enable(afe_priv->clk[CLK_MUX_AUDIO]); in mt8183_afe_enable_clock() [all …]
|
D | mt8183-dai-adda.c | 148 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() local 156 if (afe_priv->mtkaif_dmic) { in mtk_adda_ul_event() 202 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_adda_dmic_get() local 204 ucontrol->value.integer.value[0] = afe_priv->mtkaif_dmic; in mt8183_adda_dmic_get() 214 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_adda_dmic_set() local 220 afe_priv->mtkaif_dmic = ucontrol->value.integer.value[0]; in mt8183_adda_dmic_set() 223 __func__, kcontrol->id.name, afe_priv->mtkaif_dmic); in mt8183_adda_dmic_set() 303 struct mt8183_afe_private *afe_priv = afe->platform_priv; in set_mtkaif_rx() local 307 switch (afe_priv->mtkaif_protocol) { in set_mtkaif_rx() 315 if (afe_priv->mtkaif_phase_cycle[0] >= in set_mtkaif_rx() [all …]
|
/linux-6.6.21/sound/soc/mediatek/mt8192/ |
D | mt8192-afe-clk.c | 66 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mt8192_set_audio_int_bus_parent() local 69 ret = clk_set_parent(afe_priv->clk[CLK_MUX_AUDIOINTBUS], in mt8192_set_audio_int_bus_parent() 70 afe_priv->clk[clk_id]); in mt8192_set_audio_int_bus_parent() 82 struct mt8192_afe_private *afe_priv = afe->platform_priv; in apll1_mux_setting() local 86 ret = clk_prepare_enable(afe_priv->clk[CLK_TOP_MUX_AUD_1]); in apll1_mux_setting() 92 ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1], in apll1_mux_setting() 93 afe_priv->clk[CLK_TOP_APLL1_CK]); in apll1_mux_setting() 102 ret = clk_prepare_enable(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]); in apll1_mux_setting() 108 ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1], in apll1_mux_setting() 109 afe_priv->clk[CLK_TOP_APLL1_D4]); in apll1_mux_setting() [all …]
|
D | mt8192-dai-adda.c | 303 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() local 304 int mtkaif_dmic = afe_priv->mtkaif_dmic; in mtk_adda_ul_event() 341 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ch34_ul_event() local 342 int mtkaif_dmic = afe_priv->mtkaif_dmic_ch34; in mtk_adda_ch34_ul_event() 343 int mtkaif_adda6_only = afe_priv->mtkaif_adda6_only; in mtk_adda_ch34_ul_event() 382 afe_priv->mtkaif_dmic_ch34 = 0; in mtk_adda_ch34_ul_event() 403 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_adda_pad_top_event() local 407 if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) in mtk_adda_pad_top_event() 425 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_adda_mtkaif_cfg_event() local 431 if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) { in mtk_adda_mtkaif_cfg_event() [all …]
|
D | mt8192-mt6359-rt1015-rt5682.c | 154 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mt8192_mt6359_mtkaif_calibration() local 177 regmap_update_bits(afe_priv->topckgen, in mt8192_mt6359_mtkaif_calibration() 181 afe_priv->mtkaif_calibration_num_phase = 42; /* mt6359: 0 ~ 42 */ in mt8192_mt6359_mtkaif_calibration() 182 afe_priv->mtkaif_chosen_phase[0] = -1; in mt8192_mt6359_mtkaif_calibration() 183 afe_priv->mtkaif_chosen_phase[1] = -1; in mt8192_mt6359_mtkaif_calibration() 184 afe_priv->mtkaif_chosen_phase[2] = -1; in mt8192_mt6359_mtkaif_calibration() 187 phase <= afe_priv->mtkaif_calibration_num_phase && in mt8192_mt6359_mtkaif_calibration() 193 regmap_update_bits(afe_priv->topckgen, in mt8192_mt6359_mtkaif_calibration() 206 regmap_read(afe_priv->topckgen, in mt8192_mt6359_mtkaif_calibration() 238 afe_priv->mtkaif_chosen_phase[0] < 0) { in mt8192_mt6359_mtkaif_calibration() [all …]
|
D | mt8192-dai-tdm.c | 250 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_tdm_en_event() local 252 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_tdm_en_event() 282 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_tdm_bck_en_event() local 284 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_tdm_bck_en_event() 314 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_tdm_mck_en_event() local 316 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_tdm_mck_en_event() 383 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_afe_tdm_apll_connect() local 385 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id]; in mtk_afe_tdm_apll_connect() 518 struct mt8192_afe_private *afe_priv = afe->platform_priv; in mtk_dai_tdm_hw_params() local 520 struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[tdm_id]; in mtk_dai_tdm_hw_params() [all …]
|
/linux-6.6.21/sound/soc/mediatek/mt6797/ |
D | mt6797-afe-clk.c | 36 struct mt6797_afe_private *afe_priv = afe->platform_priv; in mt6797_init_clock() local 39 afe_priv->clk = devm_kcalloc(afe->dev, CLK_NUM, sizeof(*afe_priv->clk), in mt6797_init_clock() 41 if (!afe_priv->clk) in mt6797_init_clock() 45 afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]); in mt6797_init_clock() 46 if (IS_ERR(afe_priv->clk[i])) { in mt6797_init_clock() 49 PTR_ERR(afe_priv->clk[i])); in mt6797_init_clock() 50 return PTR_ERR(afe_priv->clk[i]); in mt6797_init_clock() 59 struct mt6797_afe_private *afe_priv = afe->platform_priv; in mt6797_afe_enable_clock() local 62 ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_SYS_AUD]); in mt6797_afe_enable_clock() 69 ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_SYS_AUD_26M]); in mt6797_afe_enable_clock() [all …]
|
/linux-6.6.21/sound/soc/mediatek/mt2701/ |
D | mt2701-afe-clock-ctrl.c | 27 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_init_clock() local 31 afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]); in mt2701_init_clock() 32 if (IS_ERR(afe_priv->base_ck[i])) { in mt2701_init_clock() 34 return PTR_ERR(afe_priv->base_ck[i]); in mt2701_init_clock() 39 for (i = 0; i < afe_priv->soc->i2s_num; i++) { in mt2701_init_clock() 40 struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i]; in mt2701_init_clock() 90 afe_priv->mrgif_ck = devm_clk_get(afe->dev, "audio_mrgif_pd"); in mt2701_init_clock() 91 if (IS_ERR(afe_priv->mrgif_ck)) { in mt2701_init_clock() 92 if (PTR_ERR(afe_priv->mrgif_ck) == -EPROBE_DEFER) in mt2701_init_clock() 95 afe_priv->mrgif_ck = NULL; in mt2701_init_clock() [all …]
|
D | mt2701-afe-pcm.c | 86 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_dai_num_to_i2s() local 89 if (val < 0 || val >= afe_priv->soc->i2s_num) { in mt2701_dai_num_to_i2s() 112 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_afe_i2s_startup() local 114 bool mode = afe_priv->soc->has_one_heart_mode; in mt2701_afe_i2s_startup() 147 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_afe_i2s_shutdown() local 150 bool mode = afe_priv->soc->has_one_heart_mode; in mt2701_afe_i2s_shutdown() 155 i2s_path = &afe_priv->i2s_path[i2s_num]; in mt2701_afe_i2s_shutdown() 178 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_i2s_path_enable() local 202 if (afe_priv->soc->has_one_heart_mode) { in mt2701_i2s_path_enable() 235 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_afe_i2s_prepare() local [all …]
|
/linux-6.6.21/sound/soc/mediatek/mt8188/ |
D | mt8188-afe-clk.c | 254 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_afe_enable_tuner_clk() local 258 mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL]); in mt8188_afe_enable_tuner_clk() 259 mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL1_TUNER]); in mt8188_afe_enable_tuner_clk() 262 mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2]); in mt8188_afe_enable_tuner_clk() 263 mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2_TUNER]); in mt8188_afe_enable_tuner_clk() 275 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_afe_disable_tuner_clk() local 279 mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL1_TUNER]); in mt8188_afe_disable_tuner_clk() 280 mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL]); in mt8188_afe_disable_tuner_clk() 283 mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2_TUNER]); in mt8188_afe_disable_tuner_clk() 284 mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2]); in mt8188_afe_disable_tuner_clk() [all …]
|
D | mt8188-dai-etdm.c | 249 struct mt8188_afe_private *afe_priv = afe->platform_priv; in is_cowork_mode() local 254 etdm_data = afe_priv->dai_priv[dai->id]; in is_cowork_mode() 281 struct mt8188_afe_private *afe_priv = afe->platform_priv; in get_etdm_cowork_master_id() local 287 etdm_data = afe_priv->dai_priv[dai->id]; in get_etdm_cowork_master_id() 376 struct mt8188_afe_private *afe_priv = afe->platform_priv; in get_etdm_priv_by_name() local 383 return afe_priv->dai_priv[dai_id]; in get_etdm_priv_by_name() 388 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mtk_dai_etdm_enable_mclk() local 401 etdm_data = afe_priv->dai_priv[dai_id]; in mtk_dai_etdm_enable_mclk() 422 mt8188_afe_enable_clk(afe, afe_priv->clk[clkmux_id]); in mtk_dai_etdm_enable_mclk() 425 ret = mt8188_afe_set_clk_parent(afe, afe_priv->clk[clkmux_id], in mtk_dai_etdm_enable_mclk() [all …]
|
D | mt8188-dai-adda.c | 117 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_adda_mtkaif_init() local 118 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mt8188_adda_mtkaif_init() 222 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() local 223 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mtk_adda_ul_event() 246 struct mt8188_afe_private *afe_priv = afe->platform_priv; in get_adda_priv_by_name() local 249 return afe_priv->dai_priv[MT8188_AFE_IO_UL_SRC]; in get_adda_priv_by_name() 251 return afe_priv->dai_priv[MT8188_AFE_IO_DL_SRC]; in get_adda_priv_by_name() 399 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_adda_dmic_get() local 400 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mt8188_adda_dmic_get() 411 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_adda_dmic_set() local [all …]
|
D | mt8188-audsys-clk.c | 144 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_audsys_clk_unregister() local 149 if (!afe_priv) in mt8188_audsys_clk_unregister() 153 cl = afe_priv->lookup[i]; in mt8188_audsys_clk_unregister() 166 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_audsys_clk_register() local 171 afe_priv->lookup = devm_kcalloc(afe->dev, CLK_AUD_NR_CLK, in mt8188_audsys_clk_register() 172 sizeof(*afe_priv->lookup), in mt8188_audsys_clk_register() 175 if (!afe_priv->lookup) in mt8188_audsys_clk_register() 202 afe_priv->lookup[i] = cl; in mt8188_audsys_clk_register()
|
/linux-6.6.21/sound/soc/mediatek/mt8195/ |
D | mt8195-afe-clk.c | 243 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_afe_enable_tuner_clk() local 247 mt8195_afe_enable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL]); in mt8195_afe_enable_tuner_clk() 248 mt8195_afe_enable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL1_TUNER]); in mt8195_afe_enable_tuner_clk() 251 mt8195_afe_enable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL2]); in mt8195_afe_enable_tuner_clk() 252 mt8195_afe_enable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL2_TUNER]); in mt8195_afe_enable_tuner_clk() 264 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_afe_disable_tuner_clk() local 268 mt8195_afe_disable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL1_TUNER]); in mt8195_afe_disable_tuner_clk() 269 mt8195_afe_disable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL]); in mt8195_afe_disable_tuner_clk() 272 mt8195_afe_disable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL2_TUNER]); in mt8195_afe_disable_tuner_clk() 273 mt8195_afe_disable_clk(afe, afe_priv->clk[MT8195_CLK_AUD_APLL2]); in mt8195_afe_disable_tuner_clk() [all …]
|
D | mt8195-dai-adda.c | 124 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_adda_mtkaif_init() local 125 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mt8195_adda_mtkaif_init() 269 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() local 270 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mtk_adda_ul_event() 296 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mtk_adda6_ul_event() local 297 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mtk_adda6_ul_event() 332 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mtk_audio_hires_event() local 333 struct clk *clk = afe_priv->clk[MT8195_CLK_TOP_AUDIO_H_SEL]; in mtk_audio_hires_event() 341 clk_parent = afe_priv->clk[MT8195_CLK_TOP_APLL1]; in mtk_audio_hires_event() 344 clk_parent = afe_priv->clk[MT8195_CLK_XTAL_26M]; in mtk_audio_hires_event() [all …]
|
D | mt8195-dai-etdm.c | 270 struct mt8195_afe_private *afe_priv = afe->platform_priv; in is_cowork_mode() local 276 etdm_data = afe_priv->dai_priv[dai->id]; in is_cowork_mode() 302 struct mt8195_afe_private *afe_priv = afe->platform_priv; in get_etdm_cowork_master_id() local 309 etdm_data = afe_priv->dai_priv[dai->id]; in get_etdm_cowork_master_id() 1320 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_afe_enable_etdm() local 1327 etdm_data = afe_priv->dai_priv[dai_id]; in mt8195_afe_enable_etdm() 1328 spin_lock_irqsave(&afe_priv->afe_ctrl_lock, flags); in mt8195_afe_enable_etdm() 1339 spin_unlock_irqrestore(&afe_priv->afe_ctrl_lock, flags); in mt8195_afe_enable_etdm() 1347 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_afe_disable_etdm() local 1354 etdm_data = afe_priv->dai_priv[dai_id]; in mt8195_afe_disable_etdm() [all …]
|
D | mt8195-audsys-clk.c | 154 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_audsys_clk_unregister() local 159 if (!afe_priv) in mt8195_audsys_clk_unregister() 163 cl = afe_priv->lookup[i]; in mt8195_audsys_clk_unregister() 176 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_audsys_clk_register() local 181 afe_priv->lookup = devm_kcalloc(afe->dev, CLK_AUD_NR_CLK, in mt8195_audsys_clk_register() 182 sizeof(*afe_priv->lookup), in mt8195_audsys_clk_register() 185 if (!afe_priv->lookup) in mt8195_audsys_clk_register() 211 afe_priv->lookup[i] = cl; in mt8195_audsys_clk_register()
|
/linux-6.6.21/sound/soc/mediatek/mt8173/ |
D | mt8173-afe-pcm.c | 325 struct mt8173_afe_private *afe_priv = afe->platform_priv; in mt8173_afe_i2s_prepare() local 328 mt8173_afe_dais_set_clks(afe, afe_priv->clocks[MT8173_CLK_I2S1_M], in mt8173_afe_i2s_prepare() 330 mt8173_afe_dais_set_clks(afe, afe_priv->clocks[MT8173_CLK_I2S2_M], in mt8173_afe_i2s_prepare() 346 struct mt8173_afe_private *afe_priv = afe->platform_priv; in mt8173_afe_hdmi_startup() local 351 mt8173_afe_dais_enable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M], in mt8173_afe_hdmi_startup() 352 afe_priv->clocks[MT8173_CLK_I2S3_B]); in mt8173_afe_hdmi_startup() 360 struct mt8173_afe_private *afe_priv = afe->platform_priv; in mt8173_afe_hdmi_shutdown() local 365 mt8173_afe_dais_disable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M], in mt8173_afe_hdmi_shutdown() 366 afe_priv->clocks[MT8173_CLK_I2S3_B]); in mt8173_afe_hdmi_shutdown() 374 struct mt8173_afe_private *afe_priv = afe->platform_priv; in mt8173_afe_hdmi_prepare() local [all …]
|
/linux-6.6.21/sound/soc/mediatek/mt7986/ |
D | mt7986-afe-pcm.c | 323 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mt7986_init_clock() local 326 afe_priv->clks = devm_kcalloc(afe->dev, CLK_NUM, in mt7986_init_clock() 327 sizeof(*afe_priv->clks), GFP_KERNEL); in mt7986_init_clock() 328 if (!afe_priv->clks) in mt7986_init_clock() 330 afe_priv->num_clks = CLK_NUM; in mt7986_init_clock() 332 for (i = 0; i < afe_priv->num_clks; i++) in mt7986_init_clock() 333 afe_priv->clks[i].id = aud_clks[i]; in mt7986_init_clock() 335 ret = devm_clk_bulk_get(afe->dev, afe_priv->num_clks, afe_priv->clks); in mt7986_init_clock() 390 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mt7986_afe_runtime_suspend() local 392 if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) in mt7986_afe_runtime_suspend() [all …]
|
D | mt7986-dai-etdm.c | 122 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mtk_dai_etdm_startup() local 125 ret = clk_bulk_prepare_enable(afe_priv->num_clks, afe_priv->clks); in mtk_dai_etdm_startup() 139 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mtk_dai_etdm_shutdown() local 146 clk_bulk_disable_unprepare(afe_priv->num_clks, afe_priv->clks); in mtk_dai_etdm_shutdown() 168 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mtk_dai_etdm_config() local 169 struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; in mtk_dai_etdm_config() 279 struct mt7986_afe_private *afe_priv = afe->platform_priv; in mtk_dai_etdm_set_fmt() local 297 afe_priv->dai_priv[dai->id] = priv_data; in mtk_dai_etdm_set_fmt() 298 etdm_data = afe_priv->dai_priv[dai->id]; in mtk_dai_etdm_set_fmt()
|