From a170ccba8cb7eca345e75cf0f7f189a92175ed42 Mon Sep 17 00:00:00 2001 From: Vidyakumar Athota Date: Wed, 21 Sep 2016 17:56:16 -0700 Subject: [PATCH] ASoC: msmcobalt: send ANC config for WCD9340 codec ADSP requires ANC configuration to run the ANC algorithm. Send the common configuration for both WCD9335 and WCD9340 codecs. Change-Id: I12154b0aa315fde6dd92267d4c8f4a78a6f0236f Signed-off-by: Vidyakumar Athota --- sound/soc/msm/msmcobalt.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sound/soc/msm/msmcobalt.c b/sound/soc/msm/msmcobalt.c index 17e78b25c6ca..a546d5dd394c 100644 --- a/sound/soc/msm/msmcobalt.c +++ b/sound/soc/msm/msmcobalt.c @@ -2486,17 +2486,18 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd) goto err_afe_cfg; } - if (!strcmp(dev_name(codec_dai->dev), "tasha_codec")) { - config_data = msm_codec_fn.get_afe_config_fn(codec, - AFE_AANC_VERSION); - if (config_data) { - ret = afe_set_config(AFE_AANC_VERSION, config_data, 0); - if (ret) { - pr_err("%s: Failed to set aanc version %d\n", - __func__, ret); - goto err_afe_cfg; - } + config_data = msm_codec_fn.get_afe_config_fn(codec, + AFE_AANC_VERSION); + if (config_data) { + ret = afe_set_config(AFE_AANC_VERSION, config_data, 0); + if (ret) { + pr_err("%s: Failed to set aanc version %d\n", + __func__, ret); + goto err_afe_cfg; } + } + + if (!strcmp(dev_name(codec_dai->dev), "tasha_codec")) { config_data = msm_codec_fn.get_afe_config_fn(codec, AFE_CDC_CLIP_REGISTERS_CONFIG); if (config_data) {