|
@@ -330,7 +330,7 @@ static int lpass_cdc_va_macro_event_handler(struct snd_soc_component *component,
|
|
|
}
|
|
|
ret = lpass_cdc_clk_rsc_request_clock(va_priv->dev,
|
|
|
va_priv->default_clk_id,
|
|
|
- VA_CORE_CLK, true);
|
|
|
+ va_priv->clk_id, true);
|
|
|
if (ret < 0)
|
|
|
dev_err_ratelimited(va_priv->dev,
|
|
|
"%s, failed to enable clk, ret:%d\n",
|
|
@@ -338,7 +338,7 @@ static int lpass_cdc_va_macro_event_handler(struct snd_soc_component *component,
|
|
|
else
|
|
|
lpass_cdc_clk_rsc_request_clock(va_priv->dev,
|
|
|
va_priv->default_clk_id,
|
|
|
- VA_CORE_CLK, false);
|
|
|
+ va_priv->clk_id, false);
|
|
|
lpass_cdc_va_macro_core_vote(va_priv, false);
|
|
|
break;
|
|
|
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
|
@@ -417,6 +417,13 @@ static int lpass_cdc_va_macro_swr_pwr_event(struct snd_soc_dapm_widget *w,
|
|
|
&va_priv, __func__))
|
|
|
return -EINVAL;
|
|
|
|
|
|
+ /**
|
|
|
+ * no need to switch to va_core_clk if va is chosen to
|
|
|
+ * run based off tx_core_clk
|
|
|
+ */
|
|
|
+ if (va_priv->clk_id == TX_CORE_CLK)
|
|
|
+ return 0;
|
|
|
+
|
|
|
dev_dbg(va_dev, "%s: event = %d, lpi_enable = %d\n",
|
|
|
__func__, event, va_priv->lpi_enable);
|
|
|
|
|
@@ -559,16 +566,10 @@ static int lpass_cdc_va_macro_mclk_event(struct snd_soc_dapm_widget *w,
|
|
|
if (!ret)
|
|
|
va_priv->dapm_tx_clk_status++;
|
|
|
|
|
|
- if (va_priv->lpi_enable)
|
|
|
- ret = lpass_cdc_va_macro_mclk_enable(va_priv, 1, true);
|
|
|
- else
|
|
|
- ret = lpass_cdc_tx_mclk_enable(component, 1);
|
|
|
+ ret = lpass_cdc_va_macro_mclk_enable(va_priv, 1, true);
|
|
|
break;
|
|
|
case SND_SOC_DAPM_POST_PMD:
|
|
|
- if (va_priv->lpi_enable)
|
|
|
- lpass_cdc_va_macro_mclk_enable(va_priv, 0, true);
|
|
|
- else
|
|
|
- lpass_cdc_tx_mclk_enable(component, 0);
|
|
|
+ lpass_cdc_va_macro_mclk_enable(va_priv, 0, true);
|
|
|
|
|
|
if (va_priv->dapm_tx_clk_status > 0) {
|
|
|
lpass_cdc_clk_rsc_request_clock(va_priv->dev,
|
|
@@ -2479,9 +2480,9 @@ static int lpass_cdc_va_macro_probe(struct platform_device *pdev)
|
|
|
if (ret) {
|
|
|
dev_err(&pdev->dev, "%s: could not find %s entry in dt\n",
|
|
|
__func__, "qcom,default-clk-id");
|
|
|
- default_clk_id = VA_CORE_CLK;
|
|
|
+ default_clk_id = TX_CORE_CLK;
|
|
|
}
|
|
|
- va_priv->clk_id = VA_CORE_CLK;
|
|
|
+ va_priv->clk_id = TX_CORE_CLK;
|
|
|
va_priv->default_clk_id = default_clk_id;
|
|
|
va_priv->current_clk_id = TX_CORE_CLK;
|
|
|
|