From c0b9e1dcd84d1ddcb30e8657a6a4990e42d00325 Mon Sep 17 00:00:00 2001 From: Vijay Kumar Maddula Date: Wed, 12 Oct 2022 16:36:13 +0530 Subject: [PATCH] asoc: tavil: modify TX routes and dapm widgets Observed audio capture has no data after upgrade to 5.4 kernel due to change in dapm power up sequence in 5.4 kernel. Modified tavil TX routes and dapm widgets to meet the recent kenrel dapm power up sequence. Change-Id: I15965a4f221b396e670a5b2888a60557c302db51 Signed-off-by: Vijay Kumar Maddula --- asoc/codecs/wcd934x/wcd934x-routing.h | 10 +++++++--- asoc/codecs/wcd934x/wcd934x.c | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/asoc/codecs/wcd934x/wcd934x-routing.h b/asoc/codecs/wcd934x/wcd934x-routing.h index 85ff7db3d9b6..77ca86896dd4 100644 --- a/asoc/codecs/wcd934x/wcd934x-routing.h +++ b/asoc/codecs/wcd934x/wcd934x-routing.h @@ -212,9 +212,13 @@ const struct snd_soc_dapm_route tavil_audio_map[] = { */ /* Virtual input widgets */ - {"AIF1 CAP", NULL, "AIF1_CAP Mixer"}, - {"AIF2 CAP", NULL, "AIF2_CAP Mixer"}, - {"AIF3 CAP", NULL, "AIF3_CAP Mixer"}, + {"AIF1 CAP", NULL, "AIF1_CAP_MIX"}, + {"AIF2 CAP", NULL, "AIF2_CAP_MIX"}, + {"AIF3 CAP", NULL, "AIF3_CAP_MIX"}, + + {"AIF1_CAP_MIX", NULL, "AIF1_CAP Mixer"}, + {"AIF2_CAP_MIX", NULL, "AIF2_CAP Mixer"}, + {"AIF3_CAP_MIX", NULL, "AIF3_CAP Mixer"}, /* WDMA3 */ {"WDMA3 PORT0 MUX", "DEC0", "ADC MUX0"}, diff --git a/asoc/codecs/wcd934x/wcd934x.c b/asoc/codecs/wcd934x/wcd934x.c index 98c5b011e060..bd98a054572c 100644 --- a/asoc/codecs/wcd934x/wcd934x.c +++ b/asoc/codecs/wcd934x/wcd934x.c @@ -8187,15 +8187,21 @@ static const struct snd_soc_dapm_widget tavil_dapm_widgets[] = { tavil_codec_force_enable_micbias, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), - SND_SOC_DAPM_AIF_OUT_E("AIF1 CAP", "AIF1 Capture", 0, SND_SOC_NOPM, - AIF1_CAP, 0, tavil_codec_enable_tx, - SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), - SND_SOC_DAPM_AIF_OUT_E("AIF2 CAP", "AIF2 Capture", 0, SND_SOC_NOPM, - AIF2_CAP, 0, tavil_codec_enable_tx, - SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), - SND_SOC_DAPM_AIF_OUT_E("AIF3 CAP", "AIF3 Capture", 0, SND_SOC_NOPM, - AIF3_CAP, 0, tavil_codec_enable_tx, - SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + SND_SOC_DAPM_AIF_OUT("AIF1 CAP", "AIF1 Capture", 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("AIF2 CAP", "AIF2 Capture", 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("AIF3 CAP", "AIF3 Capture", 0, SND_SOC_NOPM, 0, 0), + + SND_SOC_DAPM_MIXER_E("AIF1_CAP_MIX", SND_SOC_NOPM, AIF1_CAP, 0, + NULL, 0, tavil_codec_enable_tx, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + + SND_SOC_DAPM_MIXER_E("AIF2_CAP_MIX", SND_SOC_NOPM, AIF2_CAP, 0, + NULL, 0, tavil_codec_enable_tx, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), + + SND_SOC_DAPM_MIXER_E("AIF3_CAP_MIX", SND_SOC_NOPM, AIF3_CAP, 0, + NULL, 0, tavil_codec_enable_tx, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), SND_SOC_DAPM_MIXER("SLIM TX0", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("SLIM TX1", SND_SOC_NOPM, 0, 0, NULL, 0),