Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt1015: DAC volume range modification.
@ 2020-07-01  6:08 jack.yu
  0 siblings, 0 replies; only message in thread
From: jack.yu @ 2020-07-01  6:08 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: oder_chiou, jack.yu, alsa-devel, lars, kent_chen, kenny_chen,
	derek.fang, shumingf, flove

From: Jack Yu <jack.yu@realtek.com>

RT1015 dac volume range modification.

Signed-off-by: Jack Yu <jack.yu@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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-01  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-01  6:08 [PATCH] ASoC: rt1015: DAC volume range modification jack.yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox