Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f35768b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: bolero: Add core_vote before gfmux access"

parents d01dff99 70dbfce3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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__);
+3 −0
Original line number Diff line number Diff line
@@ -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__);