Lines Matching full:afe

10 #include "mt8183-afe-common.h"
63 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); in mtk_adda_ul_event() local
64 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event()
66 dev_dbg(afe->dev, "%s(), name %s, event 0x%x\n", in mtk_adda_ul_event()
74 regmap_update_bits(afe->regmap, AFE_ADDA_MTKAIF_RX_CFG0, in mtk_adda_ul_event()
78 regmap_update_bits(afe->regmap, AFE_ADDA_MTKAIF_RX_CFG0, in mtk_adda_ul_event()
80 regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, in mtk_adda_ul_event()
82 regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, in mtk_adda_ul_event()
86 regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, in mtk_adda_ul_event()
88 regmap_update_bits(afe->regmap, AFE_ADDA_UL_SRC_CON0, in mtk_adda_ul_event()
93 /* should delayed 1/fs(smallest is 8k) = 125us before afe off */ in mtk_adda_ul_event()
117 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); in mt8183_adda_dmic_get() local
118 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_adda_dmic_get()
129 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); in mt8183_adda_dmic_set() local
130 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mt8183_adda_dmic_set()
138 dev_info(afe->dev, "%s(), kcontrol name %s, mtkaif_dmic %d\n", in mt8183_adda_dmic_set()
217 static int set_mtkaif_rx(struct mtk_base_afe *afe) in set_mtkaif_rx() argument
219 struct mt8183_afe_private *afe_priv = afe->platform_priv; in set_mtkaif_rx()
225 regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x38); in set_mtkaif_rx()
226 regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x39); in set_mtkaif_rx()
228 regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, in set_mtkaif_rx()
242 regmap_update_bits(afe->regmap, in set_mtkaif_rx()
247 regmap_update_bits(afe->regmap, in set_mtkaif_rx()
253 regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31); in set_mtkaif_rx()
254 regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, in set_mtkaif_rx()
258 regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31); in set_mtkaif_rx()
259 regmap_write(afe->regmap, AFE_ADDA_MTKAIF_CFG0, 0x0); in set_mtkaif_rx()
273 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); in mtk_dai_adda_hw_params() local
276 dev_dbg(afe->dev, "%s(), id %d, stream %d, rate %d\n", in mtk_dai_adda_hw_params()
284 regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON0, 0); in mtk_dai_adda_hw_params()
285 regmap_write(afe->regmap, AFE_ADDA_PREDIS_CON1, 0); in mtk_dai_adda_hw_params()
288 dl_src2_con0 = mtk_adda_dl_rate_transform(afe, rate) << 28; in mtk_dai_adda_hw_params()
318 regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON0, dl_src2_con0); in mtk_dai_adda_hw_params()
319 regmap_write(afe->regmap, AFE_ADDA_DL_SRC2_CON1, dl_src2_con1); in mtk_dai_adda_hw_params()
322 regmap_update_bits(afe->regmap, in mtk_dai_adda_hw_params()
331 set_mtkaif_rx(afe); in mtk_dai_adda_hw_params()
334 regmap_update_bits(afe->regmap, in mtk_dai_adda_hw_params()
339 voice_mode = mtk_adda_ul_rate_transform(afe, rate); in mtk_dai_adda_hw_params()
348 regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_02_01, 0x00000000); in mtk_dai_adda_hw_params()
349 regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_04_03, 0x00003FB8); in mtk_dai_adda_hw_params()
350 regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_06_05, 0x3FB80000); in mtk_dai_adda_hw_params()
351 regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_08_07, 0x3FB80000); in mtk_dai_adda_hw_params()
352 regmap_write(afe->regmap, AFE_ADDA_IIR_COEF_10_09, 0x0000C048); in mtk_dai_adda_hw_params()
354 regmap_write(afe->regmap, AFE_ADDA_UL_SRC_CON0, ul_src_con0); in mtk_dai_adda_hw_params()
357 regmap_update_bits(afe->regmap, in mtk_dai_adda_hw_params()
406 int mt8183_dai_adda_register(struct mtk_base_afe *afe) in mt8183_dai_adda_register() argument
410 dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); in mt8183_dai_adda_register()
414 list_add(&dai->list, &afe->sub_dais); in mt8183_dai_adda_register()