diff options
author | Niranjan H Y <niranjan.hy@pathpartnertech.com> | 2020-11-24 13:00:40 +0530 |
---|---|---|
committer | Vincent Tew <vincenttew@google.com> | 2020-11-25 10:47:46 +0000 |
commit | bcf2d0e684b274413c9988b00fed6f9719350c86 (patch) | |
tree | 1fc393e3e6b30079cf7113beac92a2c991fe662a | |
parent | 119052193b108009612345c7306cee906bd690eb (diff) | |
download | msm-extra-bcf2d0e684b274413c9988b00fed6f9719350c86.tar.gz |
asoc: codecs: Disable DSP communication on power down
* The functionality of following mixer control is moved such
that when the TAS device enters into power down mode, the
algo communication is disabled.
- tinymix TAS25XX_SMARTPA_ENABLE DISABLE
* This change will stop the unwanted DSP communication after
Rx port close which leads to module instatntiation which
is unwanted.
Test: build pass, MT/MO voice/voip, pickup/drop call
Bug: 172902030
Change-Id: Ieea08ecb43af199c9f95693f3bde319b686f0f72
Signed-off-by: Peeyush Gupta <a0875211@ti.com>
Signed-off-by: vincenttew <vincenttew@google.com>
-rw-r--r-- | asoc/codecs/tas256x/algo/src/tas25xx-algo-kbin-intf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/asoc/codecs/tas256x/algo/src/tas25xx-algo-kbin-intf.c b/asoc/codecs/tas256x/algo/src/tas25xx-algo-kbin-intf.c index bd2f9ed1..9d61cf09 100644 --- a/asoc/codecs/tas256x/algo/src/tas25xx-algo-kbin-intf.c +++ b/asoc/codecs/tas256x/algo/src/tas25xx-algo-kbin-intf.c @@ -109,16 +109,21 @@ static int get_calibrated_re_tcalib(uint32_t *rdc_fix, uint32_t *tv_fix, int cha } #endif /*CONFIG_SET_RE_IN_KERNEL*/ -void tas25xx_algo_set_inactive (void) +void tas25xx_algo_set_inactive(void) { - pr_debug("[TI-SmartPA:%s]", __func__); atomic_set(&algo_active, 0); + s_tas_smartamp_enable = 0; + + pr_info("[TI-SmartPA:%s] algo disabled..", __func__); + + bin_file_set_profile_id(0); + s_calib_test_flag = 0; } -void tas25xx_algo_set_active (void) +void tas25xx_algo_set_active(void) { atomic_set(&algo_active, 1); - schedule_delayed_work (&query_tisa_algo_wrk, msecs_to_jiffies(1000)); + schedule_delayed_work(&query_tisa_algo_wrk, msecs_to_jiffies(1000)); } static void query_tisa_algo(struct work_struct *wrk) @@ -575,11 +580,6 @@ static int tas25xx_smartamp_enable_set_kbin(struct snd_kcontrol *pKcontrol, s_tas_smartamp_enable = user_data; if (s_tas_smartamp_enable == 0) { - - tas25xx_algo_set_inactive(); - - bin_file_set_profile_id(0); - s_calib_test_flag = 0; pr_info("TI-SmartPA: %s: Disable called\n", __func__); return 0; } |