diff options
author | Wilson Sung <wilsonsung@google.com> | 2022-01-05 18:30:26 +0800 |
---|---|---|
committer | Wilson Sung <wilsonsung@google.com> | 2022-01-05 18:30:26 +0800 |
commit | 7dc18a6a211368994cd9355ade0c79165ba2ff15 (patch) | |
tree | d9846ae5eaae25f7b46e287265d7fbfffc523f76 | |
parent | bf3dae15e6d4f78f67b674d9dc68fa305fb082a6 (diff) | |
parent | 61eab15caa87ae09b5cf63846e6505aeaec7da21 (diff) | |
download | msm-extra-7dc18a6a211368994cd9355ade0c79165ba2ff15.tar.gz |
Merge branch 'LA.UM.9.12.C10.11.00.00.840.201' into HEAD
Change-Id: I81665aae9d704afcbcb3a969a67245508b2e31f9
-rw-r--r-- | asoc/codecs/wcd937x/wcd937x.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index f181cdd6..428c9814 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. */ #include <linux/module.h> @@ -987,6 +987,22 @@ static int wcd937x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD937X_DIGITAL_PDM_WD_CTL0, 0x17, 0x00); + usleep_range(10000, 10010); + /* disable EAR CnP FSM */ + snd_soc_component_update_bits(component, + WCD937X_EAR_EAR_EN_REG, + 0x02, 0x00); + /* toggle EAR PA to let PA control registers take effect */ + snd_soc_component_update_bits(component, + WCD937X_ANA_EAR, + 0x80, 0x80); + snd_soc_component_update_bits(component, + WCD937X_ANA_EAR, + 0x80, 0x00); + /* enable EAR CnP FSM */ + snd_soc_component_update_bits(component, + WCD937X_EAR_EAR_EN_REG, + 0x02, 0x02); break; }; return ret; |