diff --git a/sound/soc/amlogic/auge/ddr_mngr.c b/sound/soc/amlogic/auge/ddr_mngr.c index 5e72772151f3..884720c7d533 100644 --- a/sound/soc/amlogic/auge/ddr_mngr.c +++ b/sound/soc/amlogic/auge/ddr_mngr.c @@ -494,9 +494,8 @@ unsigned int aml_toddr_read1(struct toddr *to) unsigned int reg_base = to->reg_base; unsigned int reg; - reg = calc_toddr_address(EE_AUDIO_TODDR_A_CTRL1, reg_base); - - return aml_audiobus_read(actrl, reg); + reg = calc_toddr_address(EE_AUDIO_TODDR_A_CTRL0, reg_base); + aml_audiobus_update_bits(actrl, reg, 1<<30, enable<<30); } void aml_toddr_write1(struct toddr *to, unsigned int val) @@ -578,7 +577,7 @@ static void aml_resample_enable( pr_info("toddr %d selects data to %s resample_%c for module:%s\n", to->fifo_id, enable ? "enable" : "disable", - (p_attach_resample->id == RESAMPLE_A) ? 'a' : 'b', + (p_attach_resample->id == 0) ? 'a' : 'b', toddr_src_get_str(p_attach_resample->attach_module) ); diff --git a/sound/soc/amlogic/auge/resample.c b/sound/soc/amlogic/auge/resample.c index f3a99483eec3..21e6f4de92f6 100644 --- a/sound/soc/amlogic/auge/resample.c +++ b/sound/soc/amlogic/auge/resample.c @@ -286,10 +286,13 @@ int resample_set(enum resample_idx id, enum samplerate_index index) #endif p_resample->asrc_rate_idx = index; - resample_rate = resample_idx2rate(index); - ret = audio_resample_set(p_resample, (bool)index, resample_rate); - if (ret) - return ret; + pr_info("%s resample_%c %s\n", + __func__, + (id == 0) ? 'a' : 'b', + auge_resample_texts[index]); + + if (audio_resample_set(p_resample, (bool)index, resample_rate)) + return 0; if (index == RATE_OFF) resample_disable(p_resample->id); diff --git a/sound/soc/amlogic/auge/spdif.c b/sound/soc/amlogic/auge/spdif.c index 62dd3a2cf782..ba24b1fe333d 100644 --- a/sound/soc/amlogic/auge/spdif.c +++ b/sound/soc/amlogic/auge/spdif.c @@ -51,9 +51,6 @@ /*#define __SPDIFIN_AUDIO_TYPE_HW__*/ -static int aml_dai_set_spdif_sysclk(struct snd_soc_dai *cpu_dai, - int clk_id, unsigned int freq, int dir); - struct spdif_chipinfo { enum SPDIF_ID id; @@ -708,6 +705,7 @@ static void spdifin_status_event(struct aml_spdif *p_spdif) if (!spdifin_check_audiotype_by_sw(p_spdif)) resample_set(p_spdif->asrc_id, RATE_OFF); #endif +#endif #endif } if (intrpt_status & 0x10) @@ -1131,7 +1129,7 @@ static void aml_dai_spdif_shutdown( #ifdef __SPDIFIN_AUDIO_TYPE_HW__ /* resample disabled, by hw */ if (!spdifin_check_audiotype_by_sw(p_spdif)) - resample_set(p_spdif->asrc_id, RATE_OFF); + resample_set(p_spdif->asrc_id, 0); #endif clk_disable_unprepare(p_spdif->clk_spdifin); clk_disable_unprepare(p_spdif->fixed_clk);