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 <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1339597
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
liaohj 2019-04-21 00:07:27 +08:00 • committed by Hujun Liao
commit 02b0f7c724

View file

@ -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;
}