mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: es7202: provide configuration for i2c_bus_num/mic_max_channels
Configuration is flexible than hard code, and minimal changes. Change-Id: I15835fcbf198252410feb3feb6080ca047388ce1 Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
@@ -607,6 +607,21 @@ config SND_SOC_ES7134
|
||||
config SND_SOC_ES7202
|
||||
tristate "Everest Semi ES7202 PDM 2CH ADC"
|
||||
|
||||
config SND_SOC_ES7202_MIC_MAX_CHANNELS
|
||||
int "the maximum channels of es7202's microphone"
|
||||
depends on SND_SOC_ES7202
|
||||
default 4
|
||||
range 2 16
|
||||
help
|
||||
Should be one of MIC_CHN_* of sound/soc/codecs/es7202.h.
|
||||
|
||||
config SND_SOC_ES7202_I2C_BUS
|
||||
int "i2c bus number"
|
||||
depends on SND_SOC_ES7202
|
||||
default 1
|
||||
help
|
||||
Used to hard code an i2c bus number.
|
||||
|
||||
config SND_SOC_ES7210
|
||||
tristate "Everest Semi ES7210 CODEC"
|
||||
depends on I2C
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define MIC_CHN_4 4
|
||||
#define MIC_CHN_2 2
|
||||
|
||||
#define ES7202_CHANNELS_MAX MIC_CHN_4
|
||||
#define ES7202_CHANNELS_MAX CONFIG_SND_SOC_ES7202_MIC_MAX_CHANNELS
|
||||
|
||||
#if ES7202_CHANNELS_MAX == MIC_CHN_2
|
||||
#define ADC_DEV_MAXNUM 1
|
||||
@@ -84,7 +84,7 @@
|
||||
#endif
|
||||
|
||||
/* select I2C bus number for es7202 */
|
||||
#define ES7202_I2C_BUS_NUM 1
|
||||
#define ES7202_I2C_BUS_NUM CONFIG_SND_SOC_ES7202_I2C_BUS
|
||||
|
||||
/*
|
||||
* select DTS or I2C Detect method for es7202
|
||||
|
||||
Reference in New Issue
Block a user