diff --git a/sound/soc/amlogic/auge/tdm.c b/sound/soc/amlogic/auge/tdm.c index 545c24c1999a..fb3ef019b050 100644 --- a/sound/soc/amlogic/auge/tdm.c +++ b/sound/soc/amlogic/auge/tdm.c @@ -801,8 +801,10 @@ static int aml_dai_set_tdm_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) if (cpu_dai->capture_active && p_tdm->chipinfo && p_tdm->chipinfo->adc_fn - && p_tdm->acodec_adc) + && p_tdm->acodec_adc){ aml_update_tdmin_skew(p_tdm->actrl, p_tdm->id, 4); + aml_update_tdmin_rev_ws(p_tdm->actrl, p_tdm->id, 0); + } return 0; } diff --git a/sound/soc/amlogic/auge/tdm_hw.c b/sound/soc/amlogic/auge/tdm_hw.c index d76614f17e94..c167b448480d 100644 --- a/sound/soc/amlogic/auge/tdm_hw.c +++ b/sound/soc/amlogic/auge/tdm_hw.c @@ -414,6 +414,17 @@ void aml_update_tdmin_skew(struct aml_audio_controller *actrl, 0x7 << 16, skew << 16); } +void aml_update_tdmin_rev_ws(struct aml_audio_controller *actrl, + int idx, int is_rev) +{ + unsigned int reg_in, off_set; + + off_set = EE_AUDIO_TDMIN_B_CTRL - EE_AUDIO_TDMIN_A_CTRL; + reg_in = EE_AUDIO_TDMIN_A_CTRL + off_set * idx; + aml_audiobus_update_bits(actrl, reg_in, + 0x1 << 25, is_rev << 25); +} + void aml_tdm_set_slot_out( struct aml_audio_controller *actrl, int index, int slots, int slot_width, diff --git a/sound/soc/amlogic/auge/tdm_hw.h b/sound/soc/amlogic/auge/tdm_hw.h index 103c73287c85..7e47302aba75 100644 --- a/sound/soc/amlogic/auge/tdm_hw.h +++ b/sound/soc/amlogic/auge/tdm_hw.h @@ -91,6 +91,9 @@ extern void aml_tdm_set_format( extern void aml_update_tdmin_skew(struct aml_audio_controller *actrl, int idx, int skew); +extern void aml_update_tdmin_rev_ws(struct aml_audio_controller *actrl, + int idx, int is_rev); + extern void aml_tdm_set_slot_out( struct aml_audio_controller *actrl, int index, int slots, int slot_width,