]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: rt5645: add register setting for TDM
authorBard Liao <bardliao@realtek.com>
Thu, 13 Nov 2014 01:55:22 +0000 (09:55 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 13 Nov 2014 11:34:41 +0000 (11:34 +0000)
We need to set extra register to avoid a recording issue in TDM
mode.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c
sound/soc/codecs/rt5645.h

index 665f8b64efe9048c7e6c00da24524df879ea60f0..57afa12b2f549bdc5eb3f282d67f0d99d0bb6bbc 100644 (file)
@@ -2112,8 +2112,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);
+               snd_soc_update_bits(codec, RT5645_BASS_BACK,
+                       RT5645_G_BB_BST_MASK, RT5645_G_BB_BST_25DB);
+       }
 
        switch (slots) {
        case 4:
index 82f681b02949a605ff6659ee96cb6f398cbc7f74..196daf03fe2878660e15619e43c4c3f28626a860 100644 (file)
 #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)