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

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

Merge "asoc: codec: Add pre ssr up event for all macros"

parents 64154bc5 efdb3934
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -835,11 +835,19 @@ static int bolero_ssr_enable(struct device *dev, void *data)
				priv->component,
				BOLERO_MACRO_EVT_CLK_RESET, 0x0);
	}
	trace_printk("%s: clk count reset\n", __func__);

	if (priv->rsc_clk_cb)
		priv->rsc_clk_cb(priv->clk_dev, BOLERO_MACRO_EVT_SSR_GFMUX_UP);

	trace_printk("%s: clk count reset\n", __func__);
	for (macro_idx = START_MACRO; macro_idx < MAX_MACRO; macro_idx++) {
		if (!priv->macro_params[macro_idx].event_handler)
			continue;
		priv->macro_params[macro_idx].event_handler(
			priv->component,
			BOLERO_MACRO_EVT_PRE_SSR_UP, 0x0);
	}

	regcache_cache_only(priv->regmap, false);
	mutex_lock(&priv->clk_lock);
	priv->dev_up = true;
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ enum {
	BOLERO_MACRO_EVT_RX_COMPANDER_SOFT_RST,
	BOLERO_MACRO_EVT_BCS_CLK_OFF,
	BOLERO_MACRO_EVT_SSR_GFMUX_UP,
	BOLERO_MACRO_EVT_PRE_SSR_UP,
};

enum {
+7 −5
Original line number Diff line number Diff line
@@ -1389,11 +1389,7 @@ static int rx_macro_event_handler(struct snd_soc_component *component,
			}
		}
		break;
	case BOLERO_MACRO_EVT_SSR_UP:
		trace_printk("%s, enter SSR up\n", __func__);
		rx_priv->dev_up = true;
		/* reset swr after ssr/pdr */
		rx_priv->reset_swr = true;
	case BOLERO_MACRO_EVT_PRE_SSR_UP:
		/* enable&disable RX_CORE_CLK to reset GFMUX reg */
		ret = bolero_clk_rsc_request_clock(rx_priv->dev,
						rx_priv->default_clk_id,
@@ -1406,6 +1402,12 @@ static int rx_macro_event_handler(struct snd_soc_component *component,
			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__);
		rx_priv->dev_up = true;
		/* reset swr after ssr/pdr */
		rx_priv->reset_swr = true;

		if (rx_priv->swr_ctrl_data)
			swrm_wcd_notify(
+3 −0
Original line number Diff line number Diff line
@@ -411,6 +411,9 @@ static int tx_macro_event_handler(struct snd_soc_component *component,
		else
			tx_priv->hs_slow_insert_complete = false;
		break;
	default:
		pr_debug("%s Invalid Event\n", __func__);
		break;
	}
	return 0;
}
+4 −2
Original line number Diff line number Diff line
@@ -299,8 +299,7 @@ static int va_macro_event_handler(struct snd_soc_component *component,
				"%s: va_mclk_users is non-zero still, audio SSR fail!!\n",
				__func__);
		break;
	case BOLERO_MACRO_EVT_SSR_UP:
		trace_printk("%s, enter SSR up\n", __func__);
	case BOLERO_MACRO_EVT_PRE_SSR_UP:
		/* enable&disable VA_CORE_CLK to reset GFMUX reg */
		ret = bolero_clk_rsc_request_clock(va_priv->dev,
						va_priv->default_clk_id,
@@ -313,6 +312,9 @@ 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);
		break;
	case BOLERO_MACRO_EVT_SSR_UP:
		trace_printk("%s, enter SSR up\n", __func__);
		/* reset swr after ssr/pdr */
		va_priv->reset_swr = true;
		if (va_priv->swr_ctrl_data)
Loading