mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
ASoC: rockchip: add support for rk1000 codec
Change-Id: I025415287f8436d5672b8f1f8d81d87c8273772a Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
* Rockchip RK1000 codec
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "rockchip,rk1000-codec"
|
||||
- reg : the I2C address of the device.
|
||||
- rockchip,spk-en-gpio: the enable gpio of spk.
|
||||
- rockchip,pa-en-time-ms: pa enable dealy time(ms).
|
||||
- rockchip,ctl: phandle to the rk1000 core controller.
|
||||
|
||||
Example for rk1000 codec:
|
||||
|
||||
rk1000_codec: rk1000-codec@60 {
|
||||
compatible = "rockchip,rk1000_codec";
|
||||
reg = <0x60>;
|
||||
rockchip,spk-en-gpio = <&gpio3 31 GPIO_ACTIVE_LOW>;
|
||||
rockchip,pa-en-time-ms = <5000>;
|
||||
rockchip,ctl = <&rk1000_ctl>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -91,6 +91,7 @@ config SND_SOC_ALL_CODECS
|
||||
select SND_SOC_PCM3008
|
||||
select SND_SOC_PCM512x_I2C if I2C
|
||||
select SND_SOC_PCM512x_SPI if SPI_MASTER
|
||||
select SND_SOC_RK1000 if I2C
|
||||
select SND_SOC_RK3328
|
||||
select SND_SOC_RT286 if I2C
|
||||
select SND_SOC_RT298 if I2C
|
||||
@@ -549,6 +550,10 @@ config SND_SOC_PCM512x_SPI
|
||||
select SND_SOC_PCM512x
|
||||
select REGMAP_SPI
|
||||
|
||||
config SND_SOC_RK1000
|
||||
tristate "Rockchip RK1000 CODEC"
|
||||
depends on MFD_RK1000
|
||||
|
||||
config SND_SOC_RK3328
|
||||
select REGMAP_MMIO
|
||||
tristate "Rockchip RK3328 CODEC"
|
||||
|
||||
@@ -86,6 +86,7 @@ snd-soc-pcm3008-objs := pcm3008.o
|
||||
snd-soc-pcm512x-objs := pcm512x.o
|
||||
snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
|
||||
snd-soc-pcm512x-spi-objs := pcm512x-spi.o
|
||||
snd-soc-rk1000-objs := rk1000_codec.o
|
||||
snd-soc-rk3328-objs := rk3328_codec.o
|
||||
snd-soc-rl6231-objs := rl6231.o
|
||||
snd-soc-rl6347a-objs := rl6347a.o
|
||||
@@ -289,6 +290,7 @@ obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
|
||||
obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o
|
||||
obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o
|
||||
obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o
|
||||
obj-$(CONFIG_SND_SOC_RK1000) += snd-soc-rk1000.o
|
||||
obj-$(CONFIG_SND_SOC_RK3328) += snd-soc-rk3328.o
|
||||
obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o
|
||||
obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o
|
||||
|
||||
1093
sound/soc/codecs/rk1000_codec.c
Executable file → Normal file
1093
sound/soc/codecs/rk1000_codec.c
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
5
sound/soc/codecs/rk1000_codec.h
Executable file → Normal file
5
sound/soc/codecs/rk1000_codec.h
Executable file → Normal file
@@ -323,4 +323,9 @@
|
||||
#define GPIO_HIGH 1
|
||||
#define GPIO_LOW 0
|
||||
|
||||
/* rk1000 ctl register */
|
||||
#define CODEC_CON 0x01
|
||||
#define CODEC_ON 0X00
|
||||
#define CODEC_OFF 0x0d
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user