Skip to content

Commit

Permalink
ASoC: rt5645: add register setting for TDM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bard Liao authored and Mark Brown committed Nov 13, 2014
1 parent 5563502 commit 850577d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/codecs/rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/rt5645.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 850577d

Please sign in to comment.