Skip to content

Commit 1708796

Browse files
Nicolin Chenbroonie
authored andcommitted
ASoC: cs53l30: Fix bit shift issue of TDM mode
The TDM mode using PCM format now has two-bit right shift due to the format configuration in the driver. According to Figure 4-13 in the CS53L30 datasheet, using ASP_SCLK_INV = 0 and SHIFT_LEFT = 1 should be the correct combination to create one-bit right shift for the DSP type A format. Signed-off-by: Nicolin Chen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 6220193 commit 1708796

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sound/soc/codecs/cs53l30.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,12 @@ static int cs53l30_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
592592
aspctl1 |= CS53L30_ASP_TDM_PDN;
593593
break;
594594
case SND_SOC_DAIFMT_DSP_A:
595-
/* Clear TDM_PDN and SHIFT_LEFT, invert SCLK */
596-
aspcfg |= CS53L30_ASP_SCLK_INV;
595+
/*
596+
* Clear TDM_PDN to turn on TDM mode; Use ASP_SCLK_INV = 0
597+
* with SHIFT_LEFT = 1 combination as Figure 4-13 shows in
598+
* the CS53L30 datasheet
599+
*/
600+
aspctl1 |= CS53L30_SHIFT_LEFT;
597601
break;
598602
default:
599603
return -EINVAL;

0 commit comments

Comments
 (0)