/sound/soc/mediatek/common/ |
D | mtk-afe-fe-dai.c | 46 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mtk_afe_fe_startup() local 49 struct mtk_base_afe_memif *memif = &afe->memif[memif_num]; in mtk_afe_fe_startup() 50 const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware; in mtk_afe_fe_startup() 58 mtk_regmap_update_bits(afe->regmap, memif->data->agent_disable_reg, in mtk_afe_fe_startup() 77 dev_err(afe->dev, "hw_constraint_minmax failed\n"); in mtk_afe_fe_startup() 85 dev_err(afe->dev, "snd_pcm_hw_constraint_integer failed\n"); in mtk_afe_fe_startup() 89 int irq_id = mtk_dynamic_irq_acquire(afe); in mtk_afe_fe_startup() 91 if (irq_id != afe->irqs_size) { in mtk_afe_fe_startup() 95 dev_err(afe->dev, "%s() error: no more asys irq\n", in mtk_afe_fe_startup() 108 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mtk_afe_fe_shutdown() local [all …]
|
D | mtk-afe-platform-driver.c | 28 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mtk_afe_pcm_pointer() local 29 struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id]; in mtk_afe_pcm_pointer() 31 struct regmap *regmap = afe->regmap; in mtk_afe_pcm_pointer() 32 struct device *dev = afe->dev; in mtk_afe_pcm_pointer() 67 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mtk_afe_pcm_new() local 69 size = afe->mtk_afe_hardware->buffer_bytes_max; in mtk_afe_pcm_new()
|
D | Makefile | 15 snd-soc-mtk-common-objs := mtk-afe-platform-driver.o mtk-afe-fe-dai.o
|
D | mtk-afe-fe-dai.h | 40 int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe); 41 int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id);
|
/sound/soc/mediatek/mt2701/ |
D | mt2701-afe-clock-ctrl.c | 71 int mt2701_init_clock(struct mtk_base_afe *afe) in mt2701_init_clock() argument 73 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_init_clock() 77 afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]); in mt2701_init_clock() 79 dev_warn(afe->dev, "%s devm_clk_get %s fail\n", in mt2701_init_clock() 88 int mt2701_afe_enable_clock(struct mtk_base_afe *afe) in mt2701_afe_enable_clock() argument 92 ret = mt2701_turn_on_a1sys_clock(afe); in mt2701_afe_enable_clock() 94 dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n", in mt2701_afe_enable_clock() 99 ret = mt2701_turn_on_a2sys_clock(afe); in mt2701_afe_enable_clock() 101 dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n", in mt2701_afe_enable_clock() 103 mt2701_turn_off_a1sys_clock(afe); in mt2701_afe_enable_clock() [all …]
|
D | mt2701-afe-pcm.c | 72 static int mt2701_dai_num_to_i2s(struct mtk_base_afe *afe, int num) in mt2701_dai_num_to_i2s() argument 77 dev_err(afe->dev, "%s, num not available, num %d, val %d\n", in mt2701_dai_num_to_i2s() 99 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mt2701_afe_i2s_startup() local 100 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_afe_i2s_startup() 101 int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); in mt2701_afe_i2s_startup() 111 dev_err(afe->dev, "Failed to enable mclk for I2S: %d\n", in mt2701_afe_i2s_startup() 122 struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); in mt2701_afe_i2s_path_shutdown() local 123 struct mt2701_afe_private *afe_priv = afe->platform_priv; in mt2701_afe_i2s_path_shutdown() 124 int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); in mt2701_afe_i2s_path_shutdown() 144 dev_warn(afe->dev, "i2s_path->on: %d, dir: %d\n", in mt2701_afe_i2s_path_shutdown() [all …]
|
D | mt2701-afe-clock-ctrl.h | 22 int mt2701_init_clock(struct mtk_base_afe *afe); 23 int mt2701_afe_enable_clock(struct mtk_base_afe *afe); 24 void mt2701_afe_disable_clock(struct mtk_base_afe *afe); 26 int mt2701_turn_on_a1sys_clock(struct mtk_base_afe *afe); 27 void mt2701_turn_off_a1sys_clock(struct mtk_base_afe *afe); 29 int mt2701_turn_on_a2sys_clock(struct mtk_base_afe *afe); 30 void mt2701_turn_off_a2sys_clock(struct mtk_base_afe *afe); 32 int mt2701_turn_on_afe_clock(struct mtk_base_afe *afe); 33 void mt2701_turn_off_afe_clock(struct mtk_base_afe *afe); 35 void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
|
D | Makefile | 15 snd-soc-mt2701-afe-objs := mt2701-afe-pcm.o mt2701-afe-clock-ctrl.o 16 obj-$(CONFIG_SND_SOC_MT2701) += snd-soc-mt2701-afe.o
|
/sound/soc/mediatek/mt8173/ |
D | mt8173-afe-pcm.c | 204 static int mt8173_afe_set_i2s(struct mtk_base_afe *afe, unsigned int rate) in mt8173_afe_set_i2s() argument 213 regmap_update_bits(afe->regmap, AFE_ADDA_TOP_CON0, 0x1, 0x1); in mt8173_afe_set_i2s() 214 regmap_update_bits(afe->regmap, AFE_ADDA2_TOP_CON0, 0x1, 0x1); in mt8173_afe_set_i2s() 221 regmap_update_bits(afe->regmap, AFE_I2S_CON2, ~AFE_I2S_CON2_EN, val); in mt8173_afe_set_i2s() 228 regmap_update_bits(afe->regmap, AFE_I2S_CON1, ~AFE_I2S_CON1_EN, val); in mt8173_afe_set_i2s() 232 static void mt8173_afe_set_i2s_enable(struct mtk_base_afe *afe, bool enable) in mt8173_afe_set_i2s_enable() argument 236 regmap_read(afe->regmap, AFE_I2S_CON2, &val); in mt8173_afe_set_i2s_enable() 241 regmap_update_bits(afe->regmap, AFE_I2S_CON2, 0x1, enable); in mt8173_afe_set_i2s_enable() 244 regmap_update_bits(afe->regmap, AFE_I2S_CON1, 0x1, enable); in mt8173_afe_set_i2s_enable() 247 static int mt8173_afe_dais_enable_clks(struct mtk_base_afe *afe, in mt8173_afe_dais_enable_clks() argument [all …]
|
D | Makefile | 3 obj-$(CONFIG_SND_SOC_MT8173) += mt8173-afe-pcm.o
|