mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
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:
@@ -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),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user