Skip to contentSkip to conversation

ASoC: rt5645: add register setting for TDM

PATCH Superseded Bard Liao 2 participants 2 messages Nov 12, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/1 ASoC: rt5645: add register setting for TDM

We need to set extra register to avoid a recording issue in TDM mode.

---
 sound/soc/codecs/rt5645.c | 5 ++++-
 sound/soc/codecs/rt5645.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5645.c +4 -1
index d6298b3..ac7a52a 100644
@@ -2114,8 +2114,11 @@ static int rt5645_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 	struct snd_soc_codec *codec = dai->codec;
 	unsigned int val = 0;
 
-	if (rx_mask || tx_mask)
+	if (rx_mask || tx_mask) {
 		val |= (1 << 14);
+		regmap_update_bits(rt5645->regmap, RT5645_BASS_BACK,
+			RT5645_G_BB_BST_MASK, RT5645_G_BB_BST_25DB);
+	}
 
 	switch (slots) {
 	case 4:
sound/soc/codecs/rt5645.h +1 -0
index 82f681b..196daf0 100644
@@ -1855,6 +1855,7 @@
 #define RT5645_M_BB_HPF_R_SFT			6
 #define RT5645_G_BB_BST_MASK			(0x3f)
 #define RT5645_G_BB_BST_SFT			0
+#define RT5645_G_BB_BST_25DB			0x14
 
 /* MP3 Plus Control 1 (0xd0) */
 #define RT5645_M_MP3_L_MASK			(0x1 << 15)
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer
#1 lore raw
Quoted 2 lines · Bard Liao

We need to set extra register to avoid a recording issue in TDM mode.

Reverted since it didn't build in x86_64 allmodconfig.