asoc: bolero: Add core_vote before gfmux access

GFMUX access happen during WSA macro usecase.
Update wsa macro to do core_vote before clock
request.

Change-Id: I0b96e725e5150fff4d8bef0d6a50837fc9a3f873
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha 2020-11-10 14:27:00 +05:30
commit 70dbfce31b
2 changed files with 7 additions and 0 deletions

View file

@ -61,6 +61,8 @@ static int va_tx_unmute_delay = BOLERO_CDC_VA_TX_DMIC_UNMUTE_DELAY_MS;
module_param(va_tx_unmute_delay, int, 0664);
MODULE_PARM_DESC(va_tx_unmute_delay, "delay to unmute the tx path");
static int va_macro_core_vote(void *handle, bool enable);
enum {
VA_MACRO_AIF_INVALID = 0,
VA_MACRO_AIF1_CAP,
@ -303,6 +305,7 @@ static int va_macro_event_handler(struct snd_soc_component *component,
break;
case BOLERO_MACRO_EVT_PRE_SSR_UP:
/* enable&disable VA_CORE_CLK to reset GFMUX reg */
va_macro_core_vote(va_priv, true);
ret = bolero_clk_rsc_request_clock(va_priv->dev,
va_priv->default_clk_id,
VA_CORE_CLK, true);
@ -314,6 +317,7 @@ static int va_macro_event_handler(struct snd_soc_component *component,
bolero_clk_rsc_request_clock(va_priv->dev,
va_priv->default_clk_id,
VA_CORE_CLK, false);
va_macro_core_vote(va_priv, false);
break;
case BOLERO_MACRO_EVT_SSR_UP:
trace_printk("%s, enter SSR up\n", __func__);

View file

@ -142,6 +142,7 @@ static struct interp_sample_rate int_mix_sample_rate_val[] = {
#define WSA_MACRO_SWR_STRING_LEN 80
static int wsa_macro_core_vote(void *handle, bool enable);
static int wsa_macro_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai);
@ -1025,6 +1026,7 @@ static int wsa_macro_event_handler(struct snd_soc_component *component,
break;
case BOLERO_MACRO_EVT_PRE_SSR_UP:
/* enable&disable WSA_CORE_CLK to reset GFMUX reg */
wsa_macro_core_vote(wsa_priv, true);
ret = bolero_clk_rsc_request_clock(wsa_priv->dev,
wsa_priv->default_clk_id,
WSA_CORE_CLK, true);
@ -1036,6 +1038,7 @@ static int wsa_macro_event_handler(struct snd_soc_component *component,
bolero_clk_rsc_request_clock(wsa_priv->dev,
wsa_priv->default_clk_id,
WSA_CORE_CLK, false);
wsa_macro_core_vote(wsa_priv, false);
break;
case BOLERO_MACRO_EVT_SSR_UP:
trace_printk("%s, enter SSR up\n", __func__);