asoc: codecs: Check for core votes count before accessing registers

Check for core votes count before accessing swrm registers
to avoid NOC errors.

Change-Id: I5689d6a6db0886ed4cc791738a28290f3d953412
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
Aditya Bavanari
2019-10-03 21:09:19 +05:30
parent ae5dca4830
commit d577af909c
5 changed files with 33 additions and 5 deletions

View File

@@ -1952,7 +1952,6 @@ static int tx_macro_clk_switch(struct snd_soc_component *component)
static int tx_macro_core_vote(void *handle, bool enable)
{
struct tx_macro_priv *tx_priv = (struct tx_macro_priv *) handle;
int ret = 0;
if (tx_priv == NULL) {
pr_err("%s: tx priv data is NULL\n", __func__);
@@ -1964,7 +1963,10 @@ static int tx_macro_core_vote(void *handle, bool enable)
pm_runtime_mark_last_busy(tx_priv->dev);
}
return ret;
if (bolero_check_core_votes(tx_priv->dev))
return 0;
else
return -EINVAL;
}
static int tx_macro_swrm_clock(void *handle, bool enable)