[PATCH] ASoC: rt1015: DAC volume range modification.
jack.yu at realtek.com
jack.yu at realtek.com
Wed Jul 1 08:08:36 CEST 2020
From: Jack Yu <jack.yu at realtek.com>
RT1015 dac volume range modification.
Signed-off-by: Jack Yu <jack.yu at realtek.com>
---
sound/soc/codecs/rt1015.c | 4 ++--
sound/soc/codecs/rt1015.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index 548f68649064..90bd7e22ec3b 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -401,7 +401,7 @@ static bool rt1015_readable_register(struct device *dev, unsigned int reg)
}
}
-static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9525, 75, 0);
+static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0);
static const char * const rt1015_din_source_select[] = {
"Left",
@@ -517,7 +517,7 @@ static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol,
static const struct snd_kcontrol_new rt1015_snd_controls[] = {
SOC_SINGLE_TLV("DAC Playback Volume", RT1015_DAC1, RT1015_DAC_VOL_SFT,
- 127, 0, dac_vol_tlv),
+ 255, 0, dac_vol_tlv),
SOC_DOUBLE("DAC Playback Switch", RT1015_DAC3,
RT1015_DA_MUTE_SFT, RT1015_DVOL_MUTE_FLAG_SFT, 1, 1),
SOC_ENUM_EXT("Boost Mode", rt1015_boost_mode_enum,
diff --git a/sound/soc/codecs/rt1015.h b/sound/soc/codecs/rt1015.h
index 7bd159e8f958..cc1ae33ca753 100644
--- a/sound/soc/codecs/rt1015.h
+++ b/sound/soc/codecs/rt1015.h
@@ -214,8 +214,8 @@
#define RT1015_ID_VERB 0x1
/* 0x0102 */
-#define RT1015_DAC_VOL_MASK (0x7f << 9)
-#define RT1015_DAC_VOL_SFT 9
+#define RT1015_DAC_VOL_MASK (0xff << 8)
+#define RT1015_DAC_VOL_SFT 8
/* 0x0104 */
#define RT1015_DAC_CLK (0x1 << 13)
--
2.27.0
More information about the Alsa-devel
mailing list