|
@@ -350,6 +350,7 @@ struct rx_macro_bcl_pmic_params {
|
|
|
u8 ppid;
|
|
|
};
|
|
|
|
|
|
+static int rx_macro_core_vote(void *handle, bool enable);
|
|
|
static int rx_macro_hw_params(struct snd_pcm_substream *substream,
|
|
|
struct snd_pcm_hw_params *params,
|
|
|
struct snd_soc_dai *dai);
|
|
@@ -1274,6 +1275,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv,
|
|
|
if (rx_priv->rx_mclk_users == 0) {
|
|
|
if (rx_priv->is_native_on)
|
|
|
rx_priv->clk_id = RX_CORE_CLK;
|
|
|
+ rx_macro_core_vote(rx_priv, true);
|
|
|
ret = bolero_clk_rsc_request_clock(rx_priv->dev,
|
|
|
rx_priv->default_clk_id,
|
|
|
rx_priv->clk_id,
|
|
@@ -1327,6 +1329,7 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv,
|
|
|
0x01, 0x00);
|
|
|
bolero_clk_rsc_fs_gen_request(rx_priv->dev,
|
|
|
false);
|
|
|
+ rx_macro_core_vote(rx_priv, true);
|
|
|
bolero_clk_rsc_request_clock(rx_priv->dev,
|
|
|
rx_priv->default_clk_id,
|
|
|
rx_priv->clk_id,
|
|
@@ -1440,18 +1443,21 @@ static int rx_macro_event_handler(struct snd_soc_component *component,
|
|
|
}
|
|
|
break;
|
|
|
case BOLERO_MACRO_EVT_PRE_SSR_UP:
|
|
|
+ rx_macro_core_vote(rx_priv, true);
|
|
|
/* enable&disable RX_CORE_CLK to reset GFMUX reg */
|
|
|
ret = bolero_clk_rsc_request_clock(rx_priv->dev,
|
|
|
rx_priv->default_clk_id,
|
|
|
RX_CORE_CLK, true);
|
|
|
- if (ret < 0)
|
|
|
+ if (ret < 0) {
|
|
|
dev_err_ratelimited(rx_priv->dev,
|
|
|
"%s, failed to enable clk, ret:%d\n",
|
|
|
__func__, ret);
|
|
|
- else
|
|
|
+ } else {
|
|
|
+ rx_macro_core_vote(rx_priv, true);
|
|
|
bolero_clk_rsc_request_clock(rx_priv->dev,
|
|
|
rx_priv->default_clk_id,
|
|
|
RX_CORE_CLK, false);
|
|
|
+ }
|
|
|
break;
|
|
|
case BOLERO_MACRO_EVT_SSR_UP:
|
|
|
trace_printk("%s, enter SSR up\n", __func__);
|