Skip to contentSkip to conversation

ASoC: rt5645: set sel_i2s_pre_div1 to 2

PATCH In review Bard Liao 2 participants 4 messages Dec 27, 2016 – Jan 9, 2017

Subsystems (3)
lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/2 ASoC: rt5645: set sel_i2s_pre_div1 to 2

The i2s clock pre-divider 1 is used for both i2s1 and sysclk. The i2s1 is usually used for the main i2s and the pre-divider will be set in hw_params function.

However, if i2s2 is used, the pre-divider is not set in the hw_params function and the default value of i2s clock pre-divider 1 is too high for sysclk and DMIC usage. Fix by overriding default divider value to 2.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681

---
 sound/soc/codecs/rt5645.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/codecs/rt5645.c +3 -0
index 10c2a56..1ac96ef 100644
@@ -3833,6 +3833,9 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
 		}
 	}
 
+	regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,
+		RT5645_I2S_PD1_MASK, RT5645_I2S_PD1_2);
+
 	if (rt5645->pdata.jd_invert) {
 		regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
 			RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
Signature · 1 line
1.8.1.1.439.g50a6b54
author
#1 lore raw

PATCH 2/2 ASoC: rt5645: set high voltage for capless power

The default capless power mode is low voltage mode. We should set it to high voltage mode to get fair headphone performance.

---
 sound/soc/codecs/rt5645.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt5645.c +1 -1
index 1ac96ef..37fb2b6 100644
@@ -3109,7 +3109,7 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
 	unsigned int val;
 
 	if (jack_insert) {
-		regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0006);
+		regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0e06);
 
 		/* for jack type detect */
 		snd_soc_dapm_force_enable_pin(dapm, "LDO2");
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer
#2 lore raw

Applied "ASoC: rt5645: set high voltage for capless power" to the asoc tree

The patch

ASoC: rt5645: set high voltage for capless power

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 da369d0ab58cb21371f84a144084a16df7800783 Mon Sep 17 00:00:00 2001

From: Bard Liao <[email protected]>
Date: Tue, 27 Dec 2016 12:05:06 +0800
Subject: [PATCH] ASoC: rt5645: set high voltage for capless power

The default capless power mode is low voltage mode. We should set it to high voltage mode to get fair headphone performance.

---
 sound/soc/codecs/rt5645.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt5645.c +1 -1
index 1ac96ef9ee20..37fb2b6c34a5 100644
@@ -3109,7 +3109,7 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
 	unsigned int val;
 
 	if (jack_insert) {
-		regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0006);
+		regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0e06);
 
 		/* for jack type detect */
 		snd_soc_dapm_force_enable_pin(dapm, "LDO2");
Signature · 1 line
2.11.0
maintainer
#3 lore raw

Applied "ASoC: rt5645: set sel_i2s_pre_div1 to 2" to the asoc tree

In reply to Bard Liao

The patch

ASoC: rt5645: set sel_i2s_pre_div1 to 2

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 02c5c03283c52157d336abf5e44ffcda10579fbf Mon Sep 17 00:00:00 2001

From: Bard Liao <[email protected]>
Date: Tue, 27 Dec 2016 12:05:05 +0800
Subject: [PATCH] ASoC: rt5645: set sel_i2s_pre_div1 to 2

The i2s clock pre-divider 1 is used for both i2s1 and sysclk. The i2s1 is usually used for the main i2s and the pre-divider will be set in hw_params function.

However, if i2s2 is used, the pre-divider is not set in the hw_params function and the default value of i2s clock pre-divider 1 is too high for sysclk and DMIC usage. Fix by overriding default divider value to 2.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681

---
 sound/soc/codecs/rt5645.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/codecs/rt5645.c +3 -0
index 10c2a564a715..1ac96ef9ee20 100644
@@ -3833,6 +3833,9 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
 		}
 	}
 
+	regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,
+		RT5645_I2S_PD1_MASK, RT5645_I2S_PD1_2);
+
 	if (rt5645->pdata.jd_invert) {
 		regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
 			RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
Signature · 1 line
2.11.0