summaryrefslogtreecommitdiff
path: root/asoc
diff options
context:
space:
mode:
authorLaxminath Kasam <lkasam@codeaurora.org>2020-09-18 15:43:21 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-09-28 01:09:06 -0700
commitaee057e0150bd401b063c193b1d16c9350763fe4 (patch)
tree2d5cdebd055ddce43132663d9345303d742d17bd /asoc
parent21b3cad0bef4d429a802e960705ce003405e073f (diff)
downloadmsm-extra-aee057e0150bd401b063c193b1d16c9350763fe4.tar.gz
asoc: va-macro: Update widget order for VA_MCLK and VA_SWR_PWR
Update widget order for widgets VA_MCLK and VA_SWR_PWR. As both are having widget supply priority -1, sometimes dapm is triggering both widget callbacks simultaneously causing race condition in handling the SWR clock release with proper request for VA_CLK instead of TX_CLK and next usecase powerup is impacted. Change-Id: I3d3a3fadcdb897287ad070dc9e81e354c6f970b0 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Diffstat (limited to 'asoc')
-rw-r--r--asoc/codecs/bolero/va-macro.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/asoc/codecs/bolero/va-macro.c b/asoc/codecs/bolero/va-macro.c
index f0a85ac0..5ce2ec12 100644
--- a/asoc/codecs/bolero/va-macro.c
+++ b/asoc/codecs/bolero/va-macro.c
@@ -509,7 +509,6 @@ static int va_macro_mclk_event(struct snd_soc_dapm_widget *w,
int ret = 0;
struct device *va_dev = NULL;
struct va_macro_priv *va_priv = NULL;
- int clk_src = 0;
if (!va_macro_get_data(component, &va_dev, &va_priv, __func__))
return -EINVAL;
@@ -531,22 +530,6 @@ static int va_macro_mclk_event(struct snd_soc_dapm_widget *w,
break;
case SND_SOC_DAPM_POST_PMD:
if (va_priv->lpi_enable) {
- if (va_priv->version == BOLERO_VERSION_2_1) {
- if (va_priv->swr_ctrl_data) {
- clk_src = CLK_SRC_TX_RCG;
- ret = swrm_wcd_notify(
- va_priv->swr_ctrl_data[0].va_swr_pdev,
- SWR_REQ_CLK_SWITCH, &clk_src);
- if (ret)
- dev_dbg(va_dev,
- "%s: clock switch failed\n",
- __func__);
- }
- } else if (bolero_tx_clk_switch(component,
- CLK_SRC_TX_RCG)) {
- dev_dbg(va_dev, "%s: clock switch failed\n",
- __func__);
- }
va_macro_mclk_enable(va_priv, 0, true);
} else {
bolero_tx_mclk_enable(component, 0);
@@ -1919,7 +1902,7 @@ static const struct snd_soc_dapm_widget va_macro_dapm_widgets_v2[] = {
VA_MACRO_AIF3_CAP, 0,
va_aif3_cap_mixer_v2, ARRAY_SIZE(va_aif3_cap_mixer_v2)),
- SND_SOC_DAPM_SUPPLY_S("VA_SWR_PWR", -1, SND_SOC_NOPM, 0, 0,
+ SND_SOC_DAPM_SUPPLY_S("VA_SWR_PWR", -2, SND_SOC_NOPM, 0, 0,
va_macro_swr_pwr_event_v2,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
@@ -1961,7 +1944,7 @@ static const struct snd_soc_dapm_widget va_macro_dapm_widgets_v3[] = {
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
- SND_SOC_DAPM_SUPPLY_S("VA_SWR_PWR", -1, SND_SOC_NOPM, 0, 0,
+ SND_SOC_DAPM_SUPPLY_S("VA_SWR_PWR", -2, SND_SOC_NOPM, 0, 0,
va_macro_swr_pwr_event,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
};