Skip to content

Commit a5a5687

Browse files
padmav16broonie
authored andcommitted
ASoC: samsung: add support for exynos7 I2S controller
Exynos7 I2S controller has no internal dma, supports more no. of root clock sampling frequencies and has more no.of Rx fifos to support 7.1CH recording in TDM mode. Due to more no. of root clock frequency values some of the bit offsets got shifted up by one. Also I2S1 on previous Samsung platforms uses v3 dai type but on Exynos7 it is upgraded to v5 with slightly modified register offsets for supporting more no.of RFS values. Due to the above changes, the driver has to be modified to handle all versions of I2S controller. For this I introduced a new structure to hold modified bit offsets and masks which is passed as dai data. Signed-off-by: Padmavathi Venna <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent b075973 commit a5a5687

File tree

4 files changed

+174
-71
lines changed

4 files changed

+174
-71
lines changed

Documentation/devicetree/bindings/sound/samsung-i2s.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ Required SoC Specific Properties:
66
- samsung,s3c6410-i2s: for 8/16/24bit stereo I2S.
77
- samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with
88
secondary fifo, s/w reset control and internal mux for root clk src.
9-
- samsung,exynos5420-i2s: for 8/16/24bit multichannel(7.1) I2S with
10-
secondary fifo, s/w reset control, internal mux for root clk src and
11-
TDM support. TDM (Time division multiplexing) is to allow transfer of
12-
multiple channel audio data on single data line.
9+
- samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for
10+
playback, sterio channel capture, secondary fifo using internal
11+
or external dma, s/w reset control, internal mux for root clk src
12+
and 7.1 channel TDM support for playback. TDM (Time division multiplexing)
13+
is to allow transfer of multiple channel audio data on single data line.
14+
- samsung,exynos7-i2s: with all the available features of exynos5 i2s,
15+
exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo
16+
with only external dma and more no.of root clk sampling frequencies.
17+
- samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
18+
stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with
19+
slightly modified bit offsets.
1320

1421
- reg: physical base address of the controller and length of memory mapped
1522
region.

sound/soc/samsung/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config SND_SOC_SAMSUNG
22
tristate "ASoC support for Samsung"
3-
depends on PLAT_SAMSUNG
3+
depends on (PLAT_SAMSUNG || ARCH_EXYNOS)
44
depends on S3C64XX_PL080 || !ARCH_S3C64XX
55
depends on S3C24XX_DMAC || !ARCH_S3C24XX
66
select SND_SOC_GENERIC_DMAENGINE_PCM

sound/soc/samsung/i2s-regs.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
#define I2SLVL3ADDR 0x3c
3434
#define I2SSTR1 0x40
3535
#define I2SVER 0x44
36-
#define I2SFIC2 0x48
36+
#define I2SFIC1 0x48
3737
#define I2STDM 0x4c
38+
#define I2SFSTA 0x50
3839

3940
#define CON_RSTCLR (1 << 31)
4041
#define CON_FRXOFSTATUS (1 << 26)
@@ -93,8 +94,6 @@
9394
#define MOD_BLC_24BIT (2 << 13)
9495
#define MOD_BLC_MASK (3 << 13)
9596

96-
#define MOD_IMS_SYSMUX (1 << 10)
97-
#define MOD_SLAVE (1 << 11)
9897
#define MOD_TXONLY (0 << 8)
9998
#define MOD_RXONLY (1 << 8)
10099
#define MOD_TXRX (2 << 8)
@@ -132,7 +131,10 @@
132131
#define EXYNOS5420_MOD_BCLK_256FS 8
133132
#define EXYNOS5420_MOD_BCLK_MASK 0xf
134133

135-
#define MOD_CDCLKCON (1 << 12)
134+
#define EXYNOS7_MOD_RCLK_64FS 4
135+
#define EXYNOS7_MOD_RCLK_128FS 5
136+
#define EXYNOS7_MOD_RCLK_96FS 6
137+
#define EXYNOS7_MOD_RCLK_192FS 7
136138

137139
#define PSR_PSREN (1 << 15)
138140

0 commit comments

Comments
 (0)