Skip to contentSkip to conversation

ASoC: rt5645: set RT5645_PRIV_INDEX as volatile

PATCH In review Bard Liao 2 participants 4 messages Jul 6, 2016 – Jul 7, 2016

Subsystems (3)
lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/2 ASoC: rt5645: set RT5645_PRIV_INDEX as volatile

RT5645_PRIV_INDEX(0x6a) indicate the address of PR- registers. So, it should be volatile.

---
 sound/soc/codecs/rt5645.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5645.c +1 -0
index 97bf96e..9251720 100644
@@ -441,6 +441,7 @@ static bool rt5645_volatile_register(struct device *dev, unsigned int reg)
 
 	switch (reg) {
 	case RT5645_RESET:
+	case RT5645_PRIV_INDEX:
 	case RT5645_PRIV_DATA:
 	case RT5645_IN1_CTRL1:
 	case RT5645_IN1_CTRL2:
Signature · 1 line
1.8.1.1.439.g50a6b54
author
#1 lore raw

PATCH 2/2 ASoC: rt5645: add DAC1 soft volume func control

This patch add an alsa control for DAC1 digital volume control function selection. The options are:
0: Gain update immediately
1: Gain update when a zero crossing
2: Gain update when a zero crossing with a soft ramp

---
 sound/soc/codecs/rt5645.c | 4 ++++
 sound/soc/codecs/rt5645.h | 3 +++
 2 files changed, 7 insertions(+)
sound/soc/codecs/rt5645.c +4 -0
index 9251720..036628c 100644
@@ -808,6 +808,10 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {
 	SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT,
 		1, 1),
 	RT5645_HWEQ("Speaker HWEQ"),
+
+	/* Digiatl Soft Volume Control */
+	SOC_SINGLE("DAC1 Digital Volume Control Func",
+		RT5645_PR_BASE, RT5645_DA1_ZDET_SFT, 3, 0),
 };
 
 /**
sound/soc/codecs/rt5645.h +3 -0
index 205e071..cfc5f97 100644
@@ -2018,6 +2018,9 @@
 
 
 /* Codec Private Register definition */
+/* DAC ADC Digital Volume (0x00) */
+#define RT5645_DA1_ZDET_SFT			6
+
 /* 3D Speaker Control (0x63) */
 #define RT5645_3D_SPK_MASK			(0x1 << 15)
 #define RT5645_3D_SPK_SFT			15
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer
#2 lore raw

Re: [PATCH 2/2] ASoC: rt5645: add DAC1 soft volume func control

Quoted 5 lines · Bard Liao

This patch add an alsa control for DAC1 digital volume control function selection. The options are:
0: Gain update immediately
1: Gain update when a zero crossing
2: Gain update when a zero crossing with a soft ramp

This seems like it should be an enum?

maintainer
#3 lore raw

Applied "ASoC: rt5645: set RT5645_PRIV_INDEX as volatile" to the asoc tree

In reply to Bard Liao

The patch

ASoC: rt5645: set RT5645_PRIV_INDEX as volatile

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 81467efcc88298ecd821c26fab04ce1b2c9d1b65 Mon Sep 17 00:00:00 2001

From: Bard Liao <[email protected]>
Date: Wed, 6 Jul 2016 09:55:14 +0800
Subject: [PATCH] ASoC: rt5645: set RT5645_PRIV_INDEX as volatile

RT5645_PRIV_INDEX(0x6a) indicate the address of PR- registers. So, it should be volatile.

---
 sound/soc/codecs/rt5645.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5645.c +1 -0
index 3c6594da6c9c..c0438e4e045b 100644
@@ -440,6 +440,7 @@ static bool rt5645_volatile_register(struct device *dev, unsigned int reg)
 
 	switch (reg) {
 	case RT5645_RESET:
+	case RT5645_PRIV_INDEX:
 	case RT5645_PRIV_DATA:
 	case RT5645_IN1_CTRL1:
 	case RT5645_IN1_CTRL2:
Signature · 1 line
2.8.1