Skip to content

Commit cdcc1fe

Browse files
Sugar Zhangrkhuangtao
authored andcommitted
ASoC: codecs: add support for rk3328
Change-Id: I66ff61c18fe70135fd7ac0569954263743263a3a Signed-off-by: Sugar Zhang <[email protected]>
1 parent f99b018 commit cdcc1fe

File tree

5 files changed

+767
-0
lines changed

5 files changed

+767
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* Rockchip Rk3328 internal codec
2+
3+
Required properties:
4+
5+
- compatible: "rockchip,rk3328-codec"
6+
- reg: physical base address of the controller and length of memory mapped
7+
region.
8+
- rockchip,grf: the phandle of the syscon node for GRF register.
9+
- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
10+
- clock-names: should be "pclk".
11+
- spk-depop-time-ms: speak depop time msec.
12+
13+
Example for rk3328 internal codec:
14+
15+
codec: codec@ff410000 {
16+
compatible = "rockchip,rk3328-codec";
17+
reg = <0x0 0xff410000 0x0 0x1000>;
18+
rockchip,grf = <&grf>;
19+
clocks = <&cru PCLK_ACODEC>;
20+
clock-names = "pclk";
21+
spk-depop-time-ms = 100;
22+
status = "disabled";
23+
};

sound/soc/codecs/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ config SND_SOC_ALL_CODECS
9191
select SND_SOC_PCM3008
9292
select SND_SOC_PCM512x_I2C if I2C
9393
select SND_SOC_PCM512x_SPI if SPI_MASTER
94+
select SND_SOC_RK3328
9495
select SND_SOC_RT286 if I2C
9596
select SND_SOC_RT298 if I2C
9697
select SND_SOC_RT5616 if I2C
@@ -548,6 +549,10 @@ config SND_SOC_PCM512x_SPI
548549
select SND_SOC_PCM512x
549550
select REGMAP_SPI
550551

552+
config SND_SOC_RK3328
553+
select REGMAP_MMIO
554+
tristate "Rockchip RK3328 CODEC"
555+
551556
config SND_SOC_RL6231
552557
tristate
553558
default y if SND_SOC_RT5616=y

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ snd-soc-pcm3008-objs := pcm3008.o
8686
snd-soc-pcm512x-objs := pcm512x.o
8787
snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
8888
snd-soc-pcm512x-spi-objs := pcm512x-spi.o
89+
snd-soc-rk3328-objs := rk3328_codec.o
8990
snd-soc-rl6231-objs := rl6231.o
9091
snd-soc-rl6347a-objs := rl6347a.o
9192
snd-soc-rt286-objs := rt286.o
@@ -288,6 +289,7 @@ obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
288289
obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o
289290
obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o
290291
obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o
292+
obj-$(CONFIG_SND_SOC_RK3328) += snd-soc-rk3328.o
291293
obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o
292294
obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o
293295
obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o

0 commit comments

Comments
 (0)