Skip to content

Commit 359d9ab

Browse files
Sugar Zhangbroonie
authored andcommitted
ASoC: rockchip: i2s: rename I2S_CKR_TRCM_TX/RXSHARE to I2S_CKR_TRCM_TX/RXONLY
this patch make it more reasonable and readable, because when we chose I2S_CKR_TRCM_TXONLY, we only output clk_lrck_tx, and hardware need to confirm this signal is wired to external codec lrck_tx/rx at the same time. for convenience, we just handle lrck_txonly if we enable symmetric_rates in driver and dai_link. otherwise, we use the separate lrck_tx/rx. Signed-off-by: Sugar Zhang <[email protected]> Signed-off-by: Xing Zheng <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 9211009 commit 359d9ab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sound/soc/rockchip/rockchip_i2s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
339339
I2S_DMACR_RDL(16));
340340

341341
val = I2S_CKR_TRCM_TXRX;
342-
if (dai->driver->symmetric_rates || rtd->dai_link->symmetric_rates)
343-
val = I2S_CKR_TRCM_TXSHARE;
342+
if (dai->driver->symmetric_rates && rtd->dai_link->symmetric_rates)
343+
val = I2S_CKR_TRCM_TXONLY;
344344

345345
regmap_update_bits(i2s->regmap, I2S_CKR,
346346
I2S_CKR_TRCM_MASK,

sound/soc/rockchip/rockchip_i2s.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
#define I2S_CKR_TRCM_SHIFT 28
8282
#define I2S_CKR_TRCM(x) (x << I2S_CKR_TRCM_SHIFT)
8383
#define I2S_CKR_TRCM_TXRX (0 << I2S_CKR_TRCM_SHIFT)
84-
#define I2S_CKR_TRCM_TXSHARE (1 << I2S_CKR_TRCM_SHIFT)
85-
#define I2S_CKR_TRCM_RXSHARE (2 << I2S_CKR_TRCM_SHIFT)
84+
#define I2S_CKR_TRCM_TXONLY (1 << I2S_CKR_TRCM_SHIFT)
85+
#define I2S_CKR_TRCM_RXONLY (2 << I2S_CKR_TRCM_SHIFT)
8686
#define I2S_CKR_TRCM_MASK (3 << I2S_CKR_TRCM_SHIFT)
8787
#define I2S_CKR_MSS_SHIFT 27
8888
#define I2S_CKR_MSS_MASTER (0 << I2S_CKR_MSS_SHIFT)

0 commit comments

Comments
 (0)