From 02b0f7c72434de81e10f28ccbf7a75ecf96a8a62 Mon Sep 17 00:00:00 2001 From: liaohj Date: Sun, 21 Apr 2019 00:07:27 +0800 Subject: [PATCH] modules:tfa98xx: send tfa cal just on speaker mode. - send tfa cal just on speaker mode. if set tfa cal on handset mode, algorithm no ready, afe_callback will return fail and set this_afe.status to 1, once other modules want to get the status at the same time, will get the fail status. the call on handset screne, open capture pcm low probality to get the status at the same time, so open capture pcm fail,cause call no sound. so send tfa cal just on speaker mode. nxp smart pa is bypass on handset mode. Change-Id: Ib977fc68d48931d8617ec4339dc5494da9986ca4 Signed-off-by: liaohj Reviewed-on: https://gerrit.mot.com/1339597 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wanlong Zhou Reviewed-by: Hujun Liao Submit-Approved: Jira Key --- sound/soc/codecs/tfa98xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/tfa98xx.c b/sound/soc/codecs/tfa98xx.c index 7c3cf40e2632..ad2b243ea10c 100644 --- a/sound/soc/codecs/tfa98xx.c +++ b/sound/soc/codecs/tfa98xx.c @@ -1630,7 +1630,9 @@ static int tfa98xx_algo_set_gain_ctl(struct snd_kcontrol *kcontrol, buff[nr++] = 0x00; buff[nr++] = buff[0]; /* 00:0dB, ff:-127.5dB, 0.5dB/scale */ - ret = send_tfa_cal_in_band(&buff[1], nr - 1); + if(0 == tfa98xx_mixer_profile) { + ret = send_tfa_cal_in_band(&buff[1], nr - 1); + } return ret; }