From f008d22120a50066c52c7ef24acf23bc3c47e6c8 Mon Sep 17 00:00:00 2001 From: Raja Mallik Date: Fri, 1 Jun 2018 07:48:38 +0530 Subject: [PATCH] ASoC: wcd9335: Add support for Microphone Activity Detection Microphone Activity Detection (MAD) hardware in the codec is used to perform detection of audio/beacon/ultrasound audio activity on the microphone. Add routing controls and configuration to enable the capture support for MAD in WCD9335 codec. Change-Id: I48359c6069bbebfc7f58efc24654544309912b69 Signed-off-by: Bhalchandra Gajare Signed-off-by: Raja Mallik --- asoc/codecs/wcd9335.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/asoc/codecs/wcd9335.c b/asoc/codecs/wcd9335.c index 854fb92878..d7db8ee1fa 100644 --- a/asoc/codecs/wcd9335.c +++ b/asoc/codecs/wcd9335.c @@ -11928,6 +11928,21 @@ static struct snd_soc_dai_driver tasha_i2s_dai[] = { }, .ops = &tasha_dai_ops, }, + { + .name = "tasha_mad1", + .id = AIF4_MAD_TX, + .capture = { + .stream_name = "AIF4 MAD TX", + .rates = SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000 | + SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_384000, + .formats = TASHA_FORMATS_S16_S24_S32_LE, + .rate_min = 16000, + .rate_max = 384000, + .channels_min = 1, + .channels_max = 1, + }, + .ops = &tasha_dai_ops, + }, }; static void tasha_codec_power_gate_digital_core(struct tasha_priv *tasha)