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

@@ -2802,7 +2802,6 @@ static void wsa_macro_init_reg(struct snd_soc_component *component)
static int wsa_macro_core_vote(void *handle, bool enable)
{
struct wsa_macro_priv *wsa_priv = (struct wsa_macro_priv *) handle;
int ret = 0;
if (wsa_priv == NULL) {
pr_err("%s: wsa priv data is NULL\n", __func__);
@@ -2814,7 +2813,10 @@ static int wsa_macro_core_vote(void *handle, bool enable)
pm_runtime_mark_last_busy(wsa_priv->dev);
}
return ret;
if (bolero_check_core_votes(wsa_priv->dev))
return 0;
else
return -EINVAL;
}
static int wsa_swrm_clock(void *handle, bool enable)