audio: add audio codec es7243 driver

PD#153483: codec: add sound codec es7243 driver

Change-Id: I3e4e76026bca7ea75df2ad8b0c5e6a730826c4bc
Signed-off-by: Peipeng Zhao <peipeng.zhao@amlogic.com>
This commit is contained in:
Peipeng Zhao
2017-10-31 20:18:27 +08:00
parent 8e96d0d385
commit f6a3271ab8
7 changed files with 1160 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
ALSA SoC ES7243 adc driver
The ES7243 serial control bus communicates through the I2C protocol only. The
serial bus is also used for periodic codec fault checking/reporting during
audio playback. For more product information please see the links below:
Required properties:
- compatible : "MicArray_0";
- reg : I2C slave address
Example:
es7243_10: es7243_10@10 {
compatible = "MicArray_0";
#sound-dai-cells = <0>;
reg = <0x10>;
status = "okay";
};
es7243_12: es7243_12@12 {
compatible = "MicArray_1";
#sound-dai-cells = <0>;
reg = <0x12>;
status = "okay";
};
es7243_13: es7243_13@13 {
compatible = "MicArray_2";
#sound-dai-cells = <0>;
reg = <0x13>;
status = "okay";
};
es7243_11: es7243_11@11 {
compatible = "MicArray_3";
#sound-dai-cells = <0>;
reg = <0x11>;
status = "okay";
};

View File

@@ -14133,3 +14133,9 @@ F: arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts
AMLOGIC ADD P230 BUILDROOT DTS
M: liangzhuo Xie <liangzhuo.xie@amlogic.com>
F: arch/arm64/boot/dts/amlogic/gxl_p230_2g_buildroot.dts
AMLOGIC sound codec
M: Peipeng Zhao <peipeng.zhao@amlogic.com>
F: sound/soc/codec/amlogic/es7243.c
F: sound/soc/codec/amlogic/es7243.h
F: Documentation/devicetree/bindings/sound/es7243.txt

View File

@@ -402,6 +402,7 @@ CONFIG_AMLOGIC_SND_SOC_PCM186X=y
CONFIG_AMLOGIC_SND_SOC_SSM3525=y
CONFIG_AMLOGIC_SND_SOC_SSM3515=y
CONFIG_AMLOGIC_SND_SOC_TAS575X=y
CONFIG_AMLOGIC_SND_SOC_ES7243=y
CONFIG_AMLOGIC_SND_SOC=y
CONFIG_AMLOGIC_SND_SOC_MESON=y
CONFIG_AMLOGIC_SND_SOC_AUGE=y

View File

@@ -122,5 +122,16 @@ config AMLOGIC_SND_SOC_TAS575X
help
Enable Support for Texas INstruments TAS575X CODEC.
Select this if your TAS575X is connected via an I2C bus.
Enable Support for Texas INstruments TAS575X CODEC.
Select this if your TAS575X is connected via an I2C bus.
config AMLOGIC_SND_SOC_ES7243
bool "EVEREST SEMI ES7243"
depends on AMLOGIC_SND_SOC_CODECS
depends on I2C
default n
help
Enable Support for EVEREST SEMI ES7243 CODEC.
Select this if your ES7243 is connected via an I2C bus.
Enable Support for EVEREST SEMI ES7243 CODEC.
Select this if your ES7243 is connected via an I2C bus.
#endif #AMLOGIC_SND_SOC_CODECS

View File

@@ -29,4 +29,4 @@ obj-$(CONFIG_AMLOGIC_SND_SOC_PCM186X) += snd-soc-pcm186x.o
obj-$(CONFIG_AMLOGIC_SND_SOC_SSM3515) += snd-soc-ssm3515.o
obj-$(CONFIG_AMLOGIC_SND_SOC_SSM3525) += snd-soc-ssm3525.o
obj-$(CONFIG_AMLOGIC_SND_SOC_TAS575X) += tas575x.o
obj-$(CONFIG_AMLOGIC_SND_SOC_ES7243) += es7243.o

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
/*
* ALSA SoC ES7243 codec driver
*
* Author: David Yang, <yangxiaohua@everest-semi.com>
* Copyright: (C) 2017 Everest Semiconductor Co., Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _ES7243_H
#define _ES7243_H
/* Codec TLV320AIC23 */
#define ES7243_MODECFG_REG00 0x00
#define ES7243_SDPFMT_REG01 0x01
#define ES7243_LRCDIV_REG02 0x02
#define ES7243_BCKDIV_REG03 0x03
#define ES7243_CLKDIV_REG04 0x04
#define ES7243_MUTECTL_REG05 0x05
#define ES7243_STATECTL_REG06 0x06
#define ES7243_ANACTL0_REG07 0x07
#define ES7243_ANACTL1_REG08 0x08
#define ES7243_ANACTL2_REG09 0x09
#define ES7243_ANACHARG_REG0A 0x0A
#define ES7243_INISTATE_REG0B 0x0B
#define ES7243_BIAS_REG0C 0x0C
#define ES7243_STMOSR_REG0D 0x0D
#define ES7243_CHIPID_REG0E 0x0E
#endif /* _ES7243_H_ */