From 5e7cf016e25f16ca509a75954b8e777933a0c8a6 Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Mon, 13 Jan 2020 14:35:30 +0800 Subject: [PATCH] asoc: bolero: check if va is enabled when register/deregister wakeup irq When LPI SVA is enabled, start recording and stop LPI SVA, wakeup irq is not deregistered as tx_swr_clk_cnt is not 0. Add new check for va_swr_clk_cnt to resolve the issue. Change-Id: I441394f26b42f554169400194d021309ef70af9e Signed-off-by: Meng Wang --- asoc/codecs/bolero/tx-macro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/bolero/tx-macro.c b/asoc/codecs/bolero/tx-macro.c index e41d62ee150e..fb25c686eb38 100644 --- a/asoc/codecs/bolero/tx-macro.c +++ b/asoc/codecs/bolero/tx-macro.c @@ -2449,7 +2449,8 @@ static int tx_macro_register_event_listener(struct snd_soc_component *component, "%s: priv is null for macro!\n", __func__); return -EINVAL; } - if (tx_priv->swr_ctrl_data && !tx_priv->tx_swr_clk_cnt) { + if (tx_priv->swr_ctrl_data && + (!tx_priv->tx_swr_clk_cnt || !tx_priv->va_swr_clk_cnt)) { if (enable) { ret = swrm_wcd_notify( tx_priv->swr_ctrl_data[0].tx_swr_pdev,