diff options
author | Sugar Zhang <sugar.zhang@rock-chips.com> | 2016-05-23 23:47:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-30 11:19:41 -0400 |
commit | 359d9abdc208c662d8c9ff2966a7c6014124f715 (patch) | |
tree | 1189d9fb56c9fe409d1316d7fb5b5f98ac639b55 | |
parent | 9211009306826637942c6be0fd64198aaddfd32d (diff) |
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 <sugar.zhang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/rockchip/rockchip_i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/rockchip/rockchip_i2s.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 2f290f3a0ac7..652e8c5ea166 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c | |||
@@ -339,8 +339,8 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, | |||
339 | I2S_DMACR_RDL(16)); | 339 | I2S_DMACR_RDL(16)); |
340 | 340 | ||
341 | val = I2S_CKR_TRCM_TXRX; | 341 | val = I2S_CKR_TRCM_TXRX; |
342 | if (dai->driver->symmetric_rates || rtd->dai_link->symmetric_rates) | 342 | if (dai->driver->symmetric_rates && rtd->dai_link->symmetric_rates) |
343 | val = I2S_CKR_TRCM_TXSHARE; | 343 | val = I2S_CKR_TRCM_TXONLY; |
344 | 344 | ||
345 | regmap_update_bits(i2s->regmap, I2S_CKR, | 345 | regmap_update_bits(i2s->regmap, I2S_CKR, |
346 | I2S_CKR_TRCM_MASK, | 346 | I2S_CKR_TRCM_MASK, |
diff --git a/sound/soc/rockchip/rockchip_i2s.h b/sound/soc/rockchip/rockchip_i2s.h index 8e239d301bc7..31f11fd25393 100644 --- a/sound/soc/rockchip/rockchip_i2s.h +++ b/sound/soc/rockchip/rockchip_i2s.h | |||
@@ -81,8 +81,8 @@ | |||
81 | #define I2S_CKR_TRCM_SHIFT 28 | 81 | #define I2S_CKR_TRCM_SHIFT 28 |
82 | #define I2S_CKR_TRCM(x) (x << I2S_CKR_TRCM_SHIFT) | 82 | #define I2S_CKR_TRCM(x) (x << I2S_CKR_TRCM_SHIFT) |
83 | #define I2S_CKR_TRCM_TXRX (0 << I2S_CKR_TRCM_SHIFT) | 83 | #define I2S_CKR_TRCM_TXRX (0 << I2S_CKR_TRCM_SHIFT) |
84 | #define I2S_CKR_TRCM_TXSHARE (1 << I2S_CKR_TRCM_SHIFT) | 84 | #define I2S_CKR_TRCM_TXONLY (1 << I2S_CKR_TRCM_SHIFT) |
85 | #define I2S_CKR_TRCM_RXSHARE (2 << I2S_CKR_TRCM_SHIFT) | 85 | #define I2S_CKR_TRCM_RXONLY (2 << I2S_CKR_TRCM_SHIFT) |
86 | #define I2S_CKR_TRCM_MASK (3 << I2S_CKR_TRCM_SHIFT) | 86 | #define I2S_CKR_TRCM_MASK (3 << I2S_CKR_TRCM_SHIFT) |
87 | #define I2S_CKR_MSS_SHIFT 27 | 87 | #define I2S_CKR_MSS_SHIFT 27 |
88 | #define I2S_CKR_MSS_MASTER (0 << I2S_CKR_MSS_SHIFT) | 88 | #define I2S_CKR_MSS_MASTER (0 << I2S_CKR_MSS_SHIFT) |