ASoC: rockchip: pdm_v2: make the volume TLV to match the units 0.01dB

The volume have a step of 0.375dB, but TLV uses the units 0.01dB. It should
be changed to a step of 0.75dB to match the units of TLV.

Change-Id: Ia7a8b8449b0236f01ade5ba89064f117f5671964
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu
2024-05-10 11:56:07 +08:00
committed by Tao Huang
parent 3ea5c21bd5
commit 320cb810fe
2 changed files with 3 additions and 3 deletions

View File

@@ -414,7 +414,7 @@ static const char * const hpf_cutoff_text[] = {
static SOC_ENUM_SINGLE_DECL(hpf_cutoff_enum, PDM_V2_FILTER_CTRL,
19, hpf_cutoff_text);
static const DECLARE_TLV_DB_SCALE(pdm_v2_digtal_gain_tlv, -6525, 375, 0);
static const DECLARE_TLV_DB_SCALE(pdm_v2_digtal_gain_tlv, -6563, 75, 0);
static const struct snd_kcontrol_new rockchip_pdm_v2_controls[] = {
SOC_ENUM("Receive PATH3 Source Select", rpath3_enum),

View File

@@ -76,9 +76,9 @@
/* PDM_V2_FILTER_CTRL */
/* 0.375dB every step. 0: mute, 1: -65.25dB, 255: 30dB */
#define PDM_V2_GAIN_CTRL_MSK (0xff << 23)
#define PDM_V2_GAIN_CTRL_SHIFT 23
#define PDM_V2_GAIN_CTRL_SHIFT 24
#define PDM_V2_GAIN_MIN 0
#define PDM_V2_GAIN_MAX 0xff
#define PDM_V2_GAIN_MAX 0x7f
#define PDM_V2_GAIN_0DB (175 << 23)
#define PDM_V2_GAIN_24DB (239 << 23)
#define PDM_V2_HPF_R_MSK (0x1 << 21)