Merge "audio-kernel: Synchronize hw vote and unvote requests"

This commit is contained in:
qctecmdr
2020-06-01 10:27:00 -07:00
committed by Gerrit - the friendly Code Review server
9 changed files with 192 additions and 18 deletions

View File

@@ -16,6 +16,7 @@
#include <asoc/msm-cdc-pinctrl.h>
#include <soc/swr-common.h>
#include <soc/swr-wcd.h>
#include <dsp/digital-cdc-rsc-mgr.h>
#include "bolero-cdc.h"
#include "bolero-cdc-registers.h"
#include "bolero-clk-rsc.h"
@@ -444,7 +445,8 @@ static int va_macro_swr_pwr_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
if (va_priv->lpass_audio_hw_vote) {
ret = clk_prepare_enable(va_priv->lpass_audio_hw_vote);
ret = digital_cdc_rsc_mgr_hw_vote_enable(
va_priv->lpass_audio_hw_vote);
if (ret)
dev_err(va_dev,
"%s: lpass audio hw enable failed\n",
@@ -467,7 +469,8 @@ static int va_macro_swr_pwr_event(struct snd_soc_dapm_widget *w,
if (bolero_tx_clk_switch(component, CLK_SRC_TX_RCG))
dev_dbg(va_dev, "%s: clock switch failed\n",__func__);
if (va_priv->lpass_audio_hw_vote)
clk_disable_unprepare(va_priv->lpass_audio_hw_vote);
digital_cdc_rsc_mgr_hw_vote_disable(
va_priv->lpass_audio_hw_vote);
break;
default:
dev_err(va_priv->dev,