Skip to contentSkip to conversation

ASoC: rt5670: Fix the speaker mono output issue

PATCH RESEND Applied Bard Liao 2 participants 2 messages Mar 3, 2015 – Mar 4, 2015

Subsystems (3)
lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH RESEND 1/1 ASoC: rt5670: Fix the speaker mono output issue

We need to set left/right control for the speaker amp to get stereo output on speaker.

---
We need to set different value according to codec version. And the codec version is stored in in RT5670_VENDOR_ID register.

---
 sound/soc/codecs/rt5670.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/codecs/rt5670.c +6 -0
index 04ca247..ba8cc14 100644
@@ -2700,6 +2700,12 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
 
 	regmap_write(rt5670->regmap, RT5670_RESET, 0);
 
+	regmap_read(rt5670->regmap, RT5670_VENDOR_ID, &val);
+	if (val >= 4)
+		regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0980);
+	else
+		regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0d00);
+
 	ret = regmap_register_patch(rt5670->regmap, init_list,
 				    ARRAY_SIZE(init_list));
 	if (ret != 0)
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer Applied
#1 lore raw
Quoted 2 lines · Bard Liao

We need to set left/right control for the speaker amp to get stereo output on speaker.

Applied, thanks.