From bc3f1e5ac7b292a3851a9229f57097e721f2ed9d Mon Sep 17 00:00:00 2001 From: Sudheer Papothi Date: Tue, 17 Sep 2019 04:03:10 +0530 Subject: [PATCH] ASoC: tx-macro: Disable wakeup source for soundwire tx data gpio soundwire tx data gpio is wakeup source capable. Disable the interrupt capable during voice activation usecase to let the device enter into power collapse during voice activation usecase on headset. Change-Id: I64a0b5da249dd3da37310fb80909a0ac5fefae54 Signed-off-by: Sudheer Papothi --- asoc/codecs/bolero/tx-macro.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/asoc/codecs/bolero/tx-macro.c b/asoc/codecs/bolero/tx-macro.c index 67b3287f2548..f058c2ab255e 100644 --- a/asoc/codecs/bolero/tx-macro.c +++ b/asoc/codecs/bolero/tx-macro.c @@ -1605,14 +1605,19 @@ static int tx_macro_register_event_listener(struct snd_soc_component *component, return -EINVAL; } if (tx_priv->swr_ctrl_data) { - if (enable) + if (enable) { ret = swrm_wcd_notify( tx_priv->swr_ctrl_data[0].tx_swr_pdev, SWR_REGISTER_WAKEUP, NULL); - else + msm_cdc_pinctrl_set_wakeup_capable( + tx_priv->tx_swr_gpio_p, false); + } else { + msm_cdc_pinctrl_set_wakeup_capable( + tx_priv->tx_swr_gpio_p, true); ret = swrm_wcd_notify( tx_priv->swr_ctrl_data[0].tx_swr_pdev, SWR_DEREGISTER_WAKEUP, NULL); + } } return ret;