mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ASoC: es7210: add es7210 I2S adc support
ES7210 is a 4-ch ADC with I2S interface for Microphone Array Replace digital_mute with mute_stream Change-Id: I71faf344eb8b058349a7a889eae296115cc788c8 Signed-off-by: Binyuan Lan <lby@rock-chips.com> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -786,6 +786,10 @@ config SND_SOC_ES7134
|
||||
config SND_SOC_ES7202
|
||||
tristate "Everest Semi ES7202 PDM 2CH ADC"
|
||||
|
||||
config SND_SOC_ES7210
|
||||
tristate "Everest Semi ES7210 CODEC"
|
||||
depends on I2C
|
||||
|
||||
config SND_SOC_ES7241
|
||||
tristate "Everest Semi ES7241 CODEC"
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ snd-soc-dmic-objs := dmic.o
|
||||
snd-soc-dummy-codec-objs := dummy-codec.o
|
||||
snd-soc-es7134-objs := es7134.o
|
||||
snd-soc-es7202-objs := es7202.o
|
||||
snd-soc-es7210-objs := es7210.o
|
||||
snd-soc-es7241-objs := es7241.o
|
||||
snd-soc-es7243e-objs := es7243e.o
|
||||
snd-soc-es8311-objs := es8311.o
|
||||
@@ -407,6 +408,7 @@ obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o
|
||||
obj-$(CONFIG_SND_SOC_DUMMY_CODEC) += snd-soc-dummy-codec.o
|
||||
obj-$(CONFIG_SND_SOC_ES7134) += snd-soc-es7134.o
|
||||
obj-$(CONFIG_SND_SOC_ES7202) += snd-soc-es7202.o
|
||||
obj-$(CONFIG_SND_SOC_ES7210) += snd-soc-es7210.o
|
||||
obj-$(CONFIG_SND_SOC_ES7241) += snd-soc-es7241.o
|
||||
obj-$(CONFIG_SND_SOC_ES7243E) += snd-soc-es7243e.o
|
||||
obj-$(CONFIG_SND_SOC_ES8311) += snd-soc-es8311.o
|
||||
|
||||
@@ -689,9 +689,12 @@ static void pcm_pop_work_events(struct work_struct *work)
|
||||
es7210_unmute();
|
||||
es7210_init_reg = 1;
|
||||
}
|
||||
static int es7210_mute(struct snd_soc_dai *dai, int mute)
|
||||
static int es7210_mute(struct snd_soc_dai *dai, int mute, int stream)
|
||||
{
|
||||
printk("enter into %s, mute = %d\n", __func__, mute);
|
||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
return 0;
|
||||
|
||||
if (mute) {
|
||||
es7210_multi_chips_update_bits(ES7210_ADC34_MUTE_REG14, 0x03, 0x03);
|
||||
es7210_multi_chips_update_bits(ES7210_ADC12_MUTE_REG15, 0x03, 0x03);
|
||||
@@ -767,7 +770,7 @@ static struct snd_soc_dai_ops es7210_ops = {
|
||||
.hw_params = es7210_pcm_hw_params,
|
||||
.set_fmt = es7210_set_dai_fmt,
|
||||
.set_sysclk = es7210_set_dai_sysclk,
|
||||
.digital_mute = es7210_mute,
|
||||
.mute_stream = es7210_mute,
|
||||
};
|
||||
#if ES7210_CHANNELS_MAX > 0
|
||||
static struct snd_soc_dai_driver es7210_dai0 = {
|
||||
|
||||
Reference in New Issue
Block a user