From d823215a3e7dcaf3619e9ca36d55fef0663cbaec Mon Sep 17 00:00:00 2001 From: Jianxin Pan Date: Sun, 21 Apr 2019 19:08:07 -0700 Subject: [PATCH] Revert "audio: enable hw resmaple pause thd [1/1]" This reverts commit 8398f8a917504fd4f3efd82306fcce1e2a1d8b80. Change-Id: I76a3c8fc66b528b62e57630603ad3887b0b3abdc Signed-off-by: Jianxin Pan --- sound/soc/amlogic/auge/resample.c | 12 ++++++------ sound/soc/amlogic/auge/resample_hw.c | 11 ----------- sound/soc/amlogic/auge/resample_hw.h | 1 - 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/sound/soc/amlogic/auge/resample.c b/sound/soc/amlogic/auge/resample.c index 90791ef..8678361 100644 --- a/sound/soc/amlogic/auge/resample.c +++ b/sound/soc/amlogic/auge/resample.c @@ -440,11 +440,11 @@ static const struct snd_kcontrol_new asrc_a_controls[] = { resample_set_enum), SOC_SINGLE_EXT_TLV("Hw resample pause enable", EE_AUDIO_RESAMPLEA_CTRL2, 24, 0x1, 0, - mixer_audiobus_read, NULL, + mixer_audiobus_read, mixer_audiobus_write, NULL), SOC_SINGLE_EXT_TLV("Hw resample pause thd", - EE_AUDIO_RESAMPLEA_CTRL2, 11, 0x1fff, 0, - mixer_audiobus_read, NULL, + EE_AUDIO_RESAMPLEA_CTRL2, 0, 0xffffff, 0, + mixer_audiobus_read, mixer_audiobus_write, NULL), SOC_ENUM_EXT("Hw resample module", auge_resample_module_enum, @@ -459,11 +459,11 @@ static const struct snd_kcontrol_new asrc_b_controls[] = { resample_set_enum), SOC_SINGLE_EXT_TLV("Hw resample b pause enable", EE_AUDIO_RESAMPLEB_CTRL2, 24, 0x1, 0, - mixer_audiobus_read, NULL, + mixer_audiobus_read, mixer_audiobus_write, NULL), SOC_SINGLE_EXT_TLV("Hw resample b pause thd", - EE_AUDIO_RESAMPLEB_CTRL2, 11, 0x1fff, 0, - mixer_audiobus_read, NULL, + EE_AUDIO_RESAMPLEB_CTRL2, 0, 0xffffff, 0, + mixer_audiobus_read, mixer_audiobus_write, NULL), SOC_ENUM_EXT("Hw resample b module", auge_resample_module_enum, diff --git a/sound/soc/amlogic/auge/resample_hw.c b/sound/soc/amlogic/auge/resample_hw.c index 73c7dd3..03ca3aa 100644 --- a/sound/soc/amlogic/auge/resample_hw.c +++ b/sound/soc/amlogic/auge/resample_hw.c @@ -115,7 +115,6 @@ int resample_set_hw_param(enum resample_idx id, reg = EE_AUDIO_RESAMPLEA_CTRL2 + offset * id; audiobus_update_bits(reg, 1 << 25, 1 << 25); - resample_set_hw_pause_thd(id, 128); return 0; } @@ -161,13 +160,3 @@ void resample_ctrl_write(enum resample_idx id, int value) audiobus_write(reg, value); } - -int resample_set_hw_pause_thd(enum resample_idx id, unsigned int thd) -{ - int offset = EE_AUDIO_RESAMPLEB_CTRL2 - EE_AUDIO_RESAMPLEA_CTRL2; - int reg = EE_AUDIO_RESAMPLEA_CTRL2 + offset * id; - - audiobus_write(reg, 1 << 24 | thd << 11); - - return 0; -} diff --git a/sound/soc/amlogic/auge/resample_hw.h b/sound/soc/amlogic/auge/resample_hw.h index 61b0629..5d7c3dd 100644 --- a/sound/soc/amlogic/auge/resample_hw.h +++ b/sound/soc/amlogic/auge/resample_hw.h @@ -41,6 +41,5 @@ extern void resample_format_set(enum resample_idx id, int ch_num, int bits); extern int resample_ctrl_read(enum resample_idx id); extern void resample_ctrl_write(enum resample_idx id, int value); -int resample_set_hw_pause_thd(enum resample_idx id, unsigned int thd); #endif -- 2.7.4