Lines Matching +full:mt8188 +full:- +full:afe
1 // SPDX-License-Identifier: GPL-2.0
3 * MediaTek ALSA SoC AFE platform driver for 8188
8 * Chun-Chia Chiu <chun-chia.chiu@mediatek.com>
11 #include <linux/arm-smccc.h>
13 #include <linux/dma-mapping.h>
24 #include "mt8188-afe-common.h"
25 #include "mt8188-afe-clk.h"
26 #include "mt8188-reg.h"
27 #include "../common/mtk-afe-platform-driver.h"
28 #include "../common/mtk-afe-fe-dai.h"
88 return -EINVAL; in mt8188_afe_fs_timing()
96 struct mtk_base_afe *afe = NULL; in mt8188_memif_fs() local
101 int id = snd_soc_rtd_to_cpu(rtd, 0)->id; in mt8188_memif_fs()
104 return -EINVAL; in mt8188_memif_fs()
108 return -EINVAL; in mt8188_memif_fs()
110 afe = snd_soc_component_get_drvdata(component); in mt8188_memif_fs()
111 memif = &afe->memif[id]; in mt8188_memif_fs()
113 switch (memif->data->id) { in mt8188_memif_fs()
124 afe_priv = afe->platform_priv; in mt8188_memif_fs()
125 memif_priv = afe_priv->dai_priv[id]; in mt8188_memif_fs()
126 if (memif_priv->fs_timing) in mt8188_memif_fs()
127 fs = memif_priv->fs_timing; in mt8188_memif_fs()
232 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); in mt8188_afe_found_cm() local
233 int id = -EINVAL; in mt8188_afe_found_cm()
235 if (mt8188_afe_memif_is_ul(dai->id) == 0) in mt8188_afe_found_cm()
238 switch (dai->id) { in mt8188_afe_found_cm()
253 dev_dbg(afe->dev, "%s, memif %d cannot find CM!\n", __func__, dai->id); in mt8188_afe_found_cm()
260 static int mt8188_afe_config_cm(struct mtk_base_afe *afe, in mt8188_afe_config_cm() argument
265 return -EINVAL; in mt8188_afe_config_cm()
267 regmap_update_bits(afe->regmap, in mt8188_afe_config_cm()
268 cm->reg, in mt8188_afe_config_cm()
269 cm->sel_maskbit << cm->sel_shift, in mt8188_afe_config_cm()
270 cm->sel_default << cm->sel_shift); in mt8188_afe_config_cm()
272 regmap_update_bits(afe->regmap, in mt8188_afe_config_cm()
273 cm->reg, in mt8188_afe_config_cm()
274 cm->ch_num_maskbit << cm->ch_num_shift, in mt8188_afe_config_cm()
275 (channels - 1) << cm->ch_num_shift); in mt8188_afe_config_cm()
277 regmap_update_bits(afe->regmap, in mt8188_afe_config_cm()
278 cm->reg, in mt8188_afe_config_cm()
279 cm->update_cnt_maskbit << cm->update_cnt_shift, in mt8188_afe_config_cm()
280 cm->update_cnt_default << cm->update_cnt_shift); in mt8188_afe_config_cm()
285 static int mt8188_afe_enable_cm(struct mtk_base_afe *afe, in mt8188_afe_enable_cm() argument
290 return -EINVAL; in mt8188_afe_enable_cm()
292 regmap_update_bits(afe->regmap, in mt8188_afe_enable_cm()
293 cm->reg, in mt8188_afe_enable_cm()
294 cm->en_maskbit << cm->en_shift, in mt8188_afe_enable_cm()
295 enable << cm->en_shift); in mt8188_afe_enable_cm()
304 struct snd_pcm_runtime *runtime = substream->runtime; in mt8188_afe_fe_startup()
305 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); in mt8188_afe_fe_startup() local
306 int id = snd_soc_rtd_to_cpu(rtd, 0)->id; in mt8188_afe_fe_startup()
322 dev_dbg(afe->dev, "hw_constraint_minmax failed\n"); in mt8188_afe_fe_startup()
338 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); in mt8188_afe_fe_hw_params() local
339 int id = snd_soc_rtd_to_cpu(rtd, 0)->id; in mt8188_afe_fe_hw_params()
340 struct mtk_base_afe_memif *memif = &afe->memif[id]; in mt8188_afe_fe_hw_params()
341 const struct mtk_base_memif_data *data = memif->data; in mt8188_afe_fe_hw_params()
345 mt8188_afe_config_cm(afe, cm, channels); in mt8188_afe_fe_hw_params()
347 if (data->ch_num_reg >= 0) { in mt8188_afe_fe_hw_params()
348 regmap_update_bits(afe->regmap, data->ch_num_reg, in mt8188_afe_fe_hw_params()
349 data->ch_num_maskbit << data->ch_num_shift, in mt8188_afe_fe_hw_params()
350 channels << data->ch_num_shift); in mt8188_afe_fe_hw_params()
359 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); in mt8188_afe_fe_trigger() local
362 struct snd_pcm_runtime * const runtime = substream->runtime; in mt8188_afe_fe_trigger()
363 int id = snd_soc_rtd_to_cpu(rtd, 0)->id; in mt8188_afe_fe_trigger()
364 struct mtk_base_afe_memif *memif = &afe->memif[id]; in mt8188_afe_fe_trigger()
365 struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage]; in mt8188_afe_fe_trigger()
366 const struct mtk_base_irq_data *irq_data = irqs->irq_data; in mt8188_afe_fe_trigger()
367 unsigned int counter = runtime->period_size; in mt8188_afe_fe_trigger()
374 mt8188_afe_enable_cm(afe, cm, true); in mt8188_afe_fe_trigger()
376 ret = mtk_memif_set_enable(afe, id); in mt8188_afe_fe_trigger()
378 dev_err(afe->dev, "%s(), error, id %d, memif enable, ret %d\n", in mt8188_afe_fe_trigger()
384 regmap_update_bits(afe->regmap, irq_data->irq_cnt_reg, in mt8188_afe_fe_trigger()
385 irq_data->irq_cnt_maskbit << irq_data->irq_cnt_shift, in mt8188_afe_fe_trigger()
386 counter << irq_data->irq_cnt_shift); in mt8188_afe_fe_trigger()
389 fs = afe->irq_fs(substream, runtime->rate); in mt8188_afe_fe_trigger()
392 return -EINVAL; in mt8188_afe_fe_trigger()
394 if (irq_data->irq_fs_reg >= 0) in mt8188_afe_fe_trigger()
395 regmap_update_bits(afe->regmap, irq_data->irq_fs_reg, in mt8188_afe_fe_trigger()
396 irq_data->irq_fs_maskbit << irq_data->irq_fs_shift, in mt8188_afe_fe_trigger()
397 fs << irq_data->irq_fs_shift); in mt8188_afe_fe_trigger()
400 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in mt8188_afe_fe_trigger()
404 (runtime->channels * runtime->sample_bits - 1)) / in mt8188_afe_fe_trigger()
405 (runtime->channels * runtime->sample_bits) + 1; in mt8188_afe_fe_trigger()
407 udelay(sample_delay * 1000000 / runtime->rate); in mt8188_afe_fe_trigger()
411 regmap_set_bits(afe->regmap, irq_data->irq_en_reg, in mt8188_afe_fe_trigger()
412 BIT(irq_data->irq_en_shift)); in mt8188_afe_fe_trigger()
416 mt8188_afe_enable_cm(afe, cm, false); in mt8188_afe_fe_trigger()
418 ret = mtk_memif_set_disable(afe, id); in mt8188_afe_fe_trigger()
420 dev_err(afe->dev, "%s(), error, id %d, memif enable, ret %d\n", in mt8188_afe_fe_trigger()
425 regmap_clear_bits(afe->regmap, irq_data->irq_en_reg, in mt8188_afe_fe_trigger()
426 BIT(irq_data->irq_en_shift)); in mt8188_afe_fe_trigger()
428 regmap_write(afe->regmap, irq_data->irq_clr_reg, in mt8188_afe_fe_trigger()
429 BIT(irq_data->irq_clr_shift)); in mt8188_afe_fe_trigger()
432 return -EINVAL; in mt8188_afe_fe_trigger()
1605 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); in mt8188_memif_1x_en_sel_put() local
1606 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_memif_1x_en_sel_put()
1608 unsigned int dai_id = kcontrol->id.device; in mt8188_memif_1x_en_sel_put()
1609 long val = ucontrol->value.integer.value[0]; in mt8188_memif_1x_en_sel_put()
1612 memif_priv = afe_priv->dai_priv[dai_id]; in mt8188_memif_1x_en_sel_put()
1614 if (val == memif_priv->asys_timing_sel) in mt8188_memif_1x_en_sel_put()
1619 memif_priv->asys_timing_sel = val; in mt8188_memif_1x_en_sel_put()
1629 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); in mt8188_asys_irq_1x_en_sel_put() local
1630 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_asys_irq_1x_en_sel_put()
1631 unsigned int id = kcontrol->id.device; in mt8188_asys_irq_1x_en_sel_put()
1632 long val = ucontrol->value.integer.value[0]; in mt8188_asys_irq_1x_en_sel_put()
1635 if (val == afe_priv->irq_priv[id].asys_timing_sel) in mt8188_asys_irq_1x_en_sel_put()
1640 afe_priv->irq_priv[id].asys_timing_sel = val; in mt8188_asys_irq_1x_en_sel_put()
1649 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); in mt8188_memif_fs_timing_sel_get() local
1650 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_memif_fs_timing_sel_get()
1652 unsigned int dai_id = kcontrol->id.device; in mt8188_memif_fs_timing_sel_get()
1653 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in mt8188_memif_fs_timing_sel_get()
1655 memif_priv = afe_priv->dai_priv[dai_id]; in mt8188_memif_fs_timing_sel_get()
1657 ucontrol->value.enumerated.item[0] = in mt8188_memif_fs_timing_sel_get()
1658 snd_soc_enum_val_to_item(e, memif_priv->fs_timing); in mt8188_memif_fs_timing_sel_get()
1667 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); in mt8188_memif_fs_timing_sel_put() local
1668 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_memif_fs_timing_sel_put()
1670 unsigned int dai_id = kcontrol->id.device; in mt8188_memif_fs_timing_sel_put()
1671 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in mt8188_memif_fs_timing_sel_put()
1672 unsigned int *item = ucontrol->value.enumerated.item; in mt8188_memif_fs_timing_sel_put()
1675 if (item[0] >= e->items) in mt8188_memif_fs_timing_sel_put()
1676 return -EINVAL; in mt8188_memif_fs_timing_sel_put()
1678 memif_priv = afe_priv->dai_priv[dai_id]; in mt8188_memif_fs_timing_sel_put()
1680 prev_item = snd_soc_enum_val_to_item(e, memif_priv->fs_timing); in mt8188_memif_fs_timing_sel_put()
1685 memif_priv->fs_timing = snd_soc_enum_item_to_val(e, item[0]); in mt8188_memif_fs_timing_sel_put()
1913 .mono_reg = -1,
1915 .int_odd_flag_reg = -1,
1940 .mono_reg = -1,
1942 .int_odd_flag_reg = -1,
1967 .mono_reg = -1,
1969 .int_odd_flag_reg = -1,
1991 .fs_reg = -1,
1994 .mono_reg = -1,
1996 .int_odd_flag_reg = -1,
2021 .mono_reg = -1,
2023 .int_odd_flag_reg = -1,
2048 .mono_reg = -1,
2050 .int_odd_flag_reg = -1,
2075 .mono_reg = -1,
2077 .int_odd_flag_reg = -1,
2099 .fs_reg = -1,
2112 .ch_num_reg = -1,
2139 .ch_num_reg = -1,
2166 .ch_num_reg = -1,
2193 .ch_num_reg = -1,
2220 .ch_num_reg = -1,
2234 .fs_reg = -1,
2247 .ch_num_reg = -1,
2274 .ch_num_reg = -1,
2301 .ch_num_reg = -1,
2328 .ch_num_reg = -1,
2341 .irq_cnt_reg = -1,
2344 .irq_fs_reg = -1,
2355 .irq_cnt_reg = -1,
2358 .irq_fs_reg = -1,
2372 .irq_fs_reg = -1,
2383 .irq_cnt_reg = -1,
2386 .irq_fs_reg = -1,
2400 .irq_fs_reg = -1,
2411 .irq_cnt_reg = -1,
2414 .irq_fs_reg = -1,
2670 /* these auto-gen reg has read-only bit, so put it as volatile */ in mt8188_is_volatile_reg()
2930 struct mtk_base_afe *afe = dev_id; in mt8188_afe_irq_handler() local
2940 ret = regmap_read(afe->regmap, AFE_IRQ_STATUS, &val); in mt8188_afe_irq_handler()
2942 dev_err(afe->dev, "%s irq status err\n", __func__); in mt8188_afe_irq_handler()
2948 ret = regmap_read(afe->regmap, AFE_IRQ_MASK, &mcu_irq_mask); in mt8188_afe_irq_handler()
2950 dev_err(afe->dev, "%s read irq mask err\n", __func__); in mt8188_afe_irq_handler()
2960 struct mtk_base_afe_memif *memif = &afe->memif[i]; in mt8188_afe_irq_handler()
2963 if (memif->irq_usage < 0) in mt8188_afe_irq_handler()
2966 irq_data = afe->irqs[memif->irq_usage].irq_data; in mt8188_afe_irq_handler()
2968 irq_status_bits = BIT(irq_data->irq_status_shift); in mt8188_afe_irq_handler()
2969 irq_clr_bits = BIT(irq_data->irq_clr_shift); in mt8188_afe_irq_handler()
2974 if (irq_data->irq_clr_reg == ASYS_IRQ_CLR) in mt8188_afe_irq_handler()
2979 snd_pcm_period_elapsed(memif->substream); in mt8188_afe_irq_handler()
2985 regmap_write(afe->regmap, ASYS_IRQ_CLR, asys_irq_clr_bits); in mt8188_afe_irq_handler()
2987 regmap_write(afe->regmap, AFE_IRQ_MCU_CLR, afe_irq_clr_bits); in mt8188_afe_irq_handler()
2994 struct mtk_base_afe *afe = dev_get_drvdata(dev); in mt8188_afe_runtime_suspend() local
2995 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_afe_runtime_suspend()
2997 if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) in mt8188_afe_runtime_suspend()
3000 mt8188_afe_disable_main_clock(afe); in mt8188_afe_runtime_suspend()
3002 regcache_cache_only(afe->regmap, true); in mt8188_afe_runtime_suspend()
3003 regcache_mark_dirty(afe->regmap); in mt8188_afe_runtime_suspend()
3006 mt8188_afe_disable_reg_rw_clk(afe); in mt8188_afe_runtime_suspend()
3013 struct mtk_base_afe *afe = dev_get_drvdata(dev); in mt8188_afe_runtime_resume() local
3014 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_afe_runtime_resume()
3021 mt8188_afe_enable_reg_rw_clk(afe); in mt8188_afe_runtime_resume()
3023 if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) in mt8188_afe_runtime_resume()
3026 regcache_cache_only(afe->regmap, false); in mt8188_afe_runtime_resume()
3027 regcache_sync(afe->regmap); in mt8188_afe_runtime_resume()
3029 mt8188_afe_enable_main_clock(afe); in mt8188_afe_runtime_resume()
3034 static int init_memif_priv_data(struct mtk_base_afe *afe) in init_memif_priv_data() argument
3036 struct mt8188_afe_private *afe_priv = afe->platform_priv; in init_memif_priv_data()
3041 memif_priv = devm_kzalloc(afe->dev, in init_memif_priv_data()
3045 return -ENOMEM; in init_memif_priv_data()
3047 afe_priv->dai_priv[i] = memif_priv; in init_memif_priv_data()
3053 static int mt8188_dai_memif_register(struct mtk_base_afe *afe) in mt8188_dai_memif_register() argument
3057 dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); in mt8188_dai_memif_register()
3059 return -ENOMEM; in mt8188_dai_memif_register()
3061 list_add(&dai->list, &afe->sub_dais); in mt8188_dai_memif_register()
3063 dai->dai_drivers = mt8188_memif_dai_driver; in mt8188_dai_memif_register()
3064 dai->num_dai_drivers = ARRAY_SIZE(mt8188_memif_dai_driver); in mt8188_dai_memif_register()
3066 dai->dapm_widgets = mt8188_memif_widgets; in mt8188_dai_memif_register()
3067 dai->num_dapm_widgets = ARRAY_SIZE(mt8188_memif_widgets); in mt8188_dai_memif_register()
3068 dai->dapm_routes = mt8188_memif_routes; in mt8188_dai_memif_register()
3069 dai->num_dapm_routes = ARRAY_SIZE(mt8188_memif_routes); in mt8188_dai_memif_register()
3070 dai->controls = mt8188_memif_controls; in mt8188_dai_memif_register()
3071 dai->num_controls = ARRAY_SIZE(mt8188_memif_controls); in mt8188_dai_memif_register()
3073 return init_memif_priv_data(afe); in mt8188_dai_memif_register()
3097 static int mt8188_afe_init_registers(struct mtk_base_afe *afe) in mt8188_afe_init_registers() argument
3099 return regmap_multi_reg_write(afe->regmap, in mt8188_afe_init_registers()
3104 static int mt8188_afe_parse_of(struct mtk_base_afe *afe, in mt8188_afe_parse_of() argument
3108 struct mt8188_afe_private *afe_priv = afe->platform_priv; in mt8188_afe_parse_of()
3110 afe_priv->topckgen = syscon_regmap_lookup_by_phandle(afe->dev->of_node, in mt8188_afe_parse_of()
3112 if (IS_ERR(afe_priv->topckgen)) in mt8188_afe_parse_of()
3113 return dev_err_probe(afe->dev, PTR_ERR(afe_priv->topckgen), in mt8188_afe_parse_of()
3177 struct mtk_base_afe *afe; in mt8188_afe_pcm_dev_probe() local
3179 struct device *dev = &pdev->dev; in mt8188_afe_pcm_dev_probe()
3188 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(33)); in mt8188_afe_pcm_dev_probe()
3192 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); in mt8188_afe_pcm_dev_probe()
3193 if (!afe) in mt8188_afe_pcm_dev_probe()
3194 return -ENOMEM; in mt8188_afe_pcm_dev_probe()
3196 afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv), in mt8188_afe_pcm_dev_probe()
3198 if (!afe->platform_priv) in mt8188_afe_pcm_dev_probe()
3199 return -ENOMEM; in mt8188_afe_pcm_dev_probe()
3201 afe_priv = afe->platform_priv; in mt8188_afe_pcm_dev_probe()
3202 afe->dev = &pdev->dev; in mt8188_afe_pcm_dev_probe()
3204 afe->base_addr = devm_platform_ioremap_resource(pdev, 0); in mt8188_afe_pcm_dev_probe()
3205 if (IS_ERR(afe->base_addr)) in mt8188_afe_pcm_dev_probe()
3206 return dev_err_probe(dev, PTR_ERR(afe->base_addr), in mt8188_afe_pcm_dev_probe()
3207 "AFE base_addr not found\n"); in mt8188_afe_pcm_dev_probe()
3209 infra_ao = syscon_regmap_lookup_by_phandle(dev->of_node, in mt8188_afe_pcm_dev_probe()
3241 ret = mt8188_afe_init_clock(afe); in mt8188_afe_pcm_dev_probe()
3245 spin_lock_init(&afe_priv->afe_ctrl_lock); in mt8188_afe_pcm_dev_probe()
3247 mutex_init(&afe->irq_alloc_lock); in mt8188_afe_pcm_dev_probe()
3250 afe->irqs_size = MT8188_AFE_IRQ_NUM; in mt8188_afe_pcm_dev_probe()
3251 afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs), in mt8188_afe_pcm_dev_probe()
3253 if (!afe->irqs) in mt8188_afe_pcm_dev_probe()
3254 return -ENOMEM; in mt8188_afe_pcm_dev_probe()
3256 for (i = 0; i < afe->irqs_size; i++) in mt8188_afe_pcm_dev_probe()
3257 afe->irqs[i].irq_data = &irq_data[i]; in mt8188_afe_pcm_dev_probe()
3260 afe->memif_size = MT8188_AFE_MEMIF_NUM; in mt8188_afe_pcm_dev_probe()
3261 afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), in mt8188_afe_pcm_dev_probe()
3263 if (!afe->memif) in mt8188_afe_pcm_dev_probe()
3264 return -ENOMEM; in mt8188_afe_pcm_dev_probe()
3266 for (i = 0; i < afe->memif_size; i++) { in mt8188_afe_pcm_dev_probe()
3267 afe->memif[i].data = &memif_data[i]; in mt8188_afe_pcm_dev_probe()
3268 afe->memif[i].irq_usage = mt8188_afe_memif_const_irqs[i]; in mt8188_afe_pcm_dev_probe()
3269 afe->memif[i].const_irq = 1; in mt8188_afe_pcm_dev_probe()
3270 afe->irqs[afe->memif[i].irq_usage].irq_occupyed = true; in mt8188_afe_pcm_dev_probe()
3279 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); in mt8188_afe_pcm_dev_probe()
3281 return dev_err_probe(dev, ret, "could not request_irq for asys-isr\n"); in mt8188_afe_pcm_dev_probe()
3284 INIT_LIST_HEAD(&afe->sub_dais); in mt8188_afe_pcm_dev_probe()
3287 ret = dai_register_cbs[i](afe); in mt8188_afe_pcm_dev_probe()
3293 ret = mtk_afe_combine_sub_dai(afe); in mt8188_afe_pcm_dev_probe()
3297 afe->mtk_afe_hardware = &mt8188_afe_hardware; in mt8188_afe_pcm_dev_probe()
3298 afe->memif_fs = mt8188_memif_fs; in mt8188_afe_pcm_dev_probe()
3299 afe->irq_fs = mt8188_irq_fs; in mt8188_afe_pcm_dev_probe()
3301 afe->runtime_resume = mt8188_afe_runtime_resume; in mt8188_afe_pcm_dev_probe()
3302 afe->runtime_suspend = mt8188_afe_runtime_suspend; in mt8188_afe_pcm_dev_probe()
3304 platform_set_drvdata(pdev, afe); in mt8188_afe_pcm_dev_probe()
3306 ret = mt8188_afe_parse_of(afe, pdev->dev.of_node); in mt8188_afe_pcm_dev_probe()
3315 afe_priv->pm_runtime_bypass_reg_ctl = true; in mt8188_afe_pcm_dev_probe()
3320 afe->regmap = devm_regmap_init_mmio(&pdev->dev, afe->base_addr, in mt8188_afe_pcm_dev_probe()
3322 if (IS_ERR(afe->regmap)) { in mt8188_afe_pcm_dev_probe()
3323 ret = PTR_ERR(afe->regmap); in mt8188_afe_pcm_dev_probe()
3327 ret = regmap_register_patch(afe->regmap, mt8188_cg_patch, in mt8188_afe_pcm_dev_probe()
3336 afe->dai_drivers, afe->num_dai_drivers); in mt8188_afe_pcm_dev_probe()
3342 mt8188_afe_init_registers(afe); in mt8188_afe_pcm_dev_probe()
3344 pm_runtime_put_sync(&pdev->dev); in mt8188_afe_pcm_dev_probe()
3345 afe_priv->pm_runtime_bypass_reg_ctl = false; in mt8188_afe_pcm_dev_probe()
3347 regcache_cache_only(afe->regmap, true); in mt8188_afe_pcm_dev_probe()
3348 regcache_mark_dirty(afe->regmap); in mt8188_afe_pcm_dev_probe()
3358 { .compatible = "mediatek,mt8188-afe", },
3370 .name = "mt8188-audio",
3379 MODULE_DESCRIPTION("MediaTek SoC AFE platform driver for ALSA 8188");
3380 MODULE_AUTHOR("Chun-Chia.Chiu <chun-chia.chiu@mediatek.com>");