summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip/rockchip_i2s.h
diff options
context:
space:
mode:
authorSugar Zhang <sugar.zhang@rock-chips.com>2015-10-08 20:40:07 +0800
committerMark Brown <broonie@kernel.org>2015-10-23 01:50:45 +0900
commit4c9c018b2ac72e6ffaeae472723023dc4fd99a88 (patch)
tree8a1acce3305d20f833cc164b866d423ef7a299c9 /sound/soc/rockchip/rockchip_i2s.h
parent13531520e3106e73474225b68b889e9dc7da329e (diff)
downloadlinux-4c9c018b2ac72e6ffaeae472723023dc4fd99a88.tar.bz2
ASoC: rockchip: i2s: add 8 channels capture support
support max 8 channels capture, please add property 'rockchip,capture-channels' in dts to enable this, if not, support 2 channels capture default. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip/rockchip_i2s.h')
-rw-r--r--sound/soc/rockchip/rockchip_i2s.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s.h b/sound/soc/rockchip/rockchip_i2s.h
index 93f456f518a9..a54ee35e1e5c 100644
--- a/sound/soc/rockchip/rockchip_i2s.h
+++ b/sound/soc/rockchip/rockchip_i2s.h
@@ -49,6 +49,9 @@
* RXCR
* receive operation control register
*/
+#define I2S_RXCR_CSR_SHIFT 15
+#define I2S_RXCR_CSR(x) (x << I2S_RXCR_CSR_SHIFT)
+#define I2S_RXCR_CSR_MASK (3 << I2S_RXCR_CSR_SHIFT)
#define I2S_RXCR_HWT BIT(14)
#define I2S_RXCR_SJM_SHIFT 12
#define I2S_RXCR_SJM_R (0 << I2S_RXCR_SJM_SHIFT)
@@ -207,6 +210,13 @@ enum {
ROCKCHIP_DIV_BCLK,
};
+/* channel select */
+#define I2S_CSR_SHIFT 15
+#define I2S_CHN_2 (0 << I2S_CSR_SHIFT)
+#define I2S_CHN_4 (1 << I2S_CSR_SHIFT)
+#define I2S_CHN_6 (2 << I2S_CSR_SHIFT)
+#define I2S_CHN_8 (3 << I2S_CSR_SHIFT)
+
/* I2S REGS */
#define I2S_TXCR (0x0000)
#define I2S_RXCR (0x0004)