ASoC: bolero: check clock source before clock switch

Check soundwire clock source before clock switch to avoid
redundant soundwire device suspend for the same clock source.

Change-Id: I613789b23c171959a60c9a059a30b3f1494f3dfa
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Este commit está contenido en:
Sudheer Papothi
2019-12-05 01:36:13 +05:30
cometido por Gerrit - the friendly Code Review server
padre f34687bd3a
commit 93bc6299f3
Se han modificado 4 ficheros con 147 adiciones y 16 borrados

Ver fichero

@@ -1005,9 +1005,11 @@ EXPORT_SYMBOL(bolero_register_wake_irq);
*
* @component: pointer to codec component instance.
*
* @clk_src: 0 for TX_RCG and 1 for VA_RCG
*
* Returns 0 on success or -EINVAL on error.
*/
int bolero_tx_clk_switch(struct snd_soc_component *component)
int bolero_tx_clk_switch(struct snd_soc_component *component, int clk_src)
{
struct bolero_priv *priv = NULL;
int ret = 0;
@@ -1025,7 +1027,8 @@ int bolero_tx_clk_switch(struct snd_soc_component *component)
}
if (priv->macro_params[TX_MACRO].clk_switch)
ret = priv->macro_params[TX_MACRO].clk_switch(component);
ret = priv->macro_params[TX_MACRO].clk_switch(component,
clk_src);
return ret;
}