summaryrefslogtreecommitdiff
path: root/asoc
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2021-03-10 01:44:27 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2021-03-10 01:44:27 -0800
commit2531ff66b0391a5a44e1c58eccca039bc45363a4 (patch)
treefebb51ddd18d48258087e929defd152cc8725f54 /asoc
parent0a0c718a77ba6da31de9bf5d6726635f2a924b3d (diff)
parentcc71e4908e5d5a60892793d54a4b0be61d458421 (diff)
downloadmsm-extra-2531ff66b0391a5a44e1c58eccca039bc45363a4.tar.gz
Merge "asoc: bolero: Add core_vote before gfmux access"
Diffstat (limited to 'asoc')
-rw-r--r--asoc/codecs/bolero/rx-macro.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/asoc/codecs/bolero/rx-macro.c b/asoc/codecs/bolero/rx-macro.c
index f619c51a..9167088f 100644
--- a/asoc/codecs/bolero/rx-macro.c
+++ b/asoc/codecs/bolero/rx-macro.c
@@ -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);
@@ -1230,6 +1231,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,
@@ -1283,6 +1285,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,
@@ -1396,18 +1399,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__);