Revert "(CR):SurfNA: earpiece no sound"

This reverts commit 21c63bd2b7406151248931be4991e86d5dba3c53.

Change-Id: I7ee0c40c0494d5a2a580091e6a9f270677961629
Reviewed-on: https://gerrit.mot.com/1357966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Yunfei Guo 2019-05-21 02:36:29 -05:00
commit 52d301d6de
2 changed files with 4 additions and 18 deletions

View file

@ -74,7 +74,6 @@ static int tfa98xx_kmsg_regs = 0;
static int tfa98xx_ftrace_regs = 0;
static uint32_t tfa98xx_rpc_send_delay = 0;
static bool tfa98xx_ampe_monitor = false;
static char *fw_name = "tfa98xx.cnt";
module_param(fw_name, charp, S_IRUGO | S_IWUSR);
@ -1326,6 +1325,7 @@ static int tfa98xx_set_profile(struct snd_kcontrol *kcontrol,
return 0;
new_profile = ucontrol->value.integer.value[0];
pr_err("%s:new_profile:%d profile :%d\n",__func__,new_profile, profile);
if (new_profile == profile)
return 0;
@ -1575,6 +1575,7 @@ static int tfa98xx_set_stereo_ctl(struct snd_kcontrol *kcontrol,
tfa98xx->flags |= TFA98XX_FLAG_CHIP_SELECTED;
tfa98xx->profile = 1;
tfa98xx_mixer_profile = 1;
pr_err("%s:profile:%d\n",__func__,tfa98xx->profile);
}
else
tfa98xx->flags &= ~TFA98XX_FLAG_CHIP_SELECTED;
@ -1634,8 +1635,8 @@ static int tfa98xx_algo_set_gain_ctl(struct snd_kcontrol *kcontrol,
if(0 == tfa98xx_mixer_profile) {
ret = send_tfa_cal_in_band(&buff[1], nr - 1);
} else {
pr_debug("%s:bypass mode current profile is %d\n", __func__, tfa98xx_mixer_profile);
}
pr_err("%s:bypass mode current profile is %d\n", __func__, tfa98xx_mixer_profile);
}
return ret;
}
@ -2936,8 +2937,6 @@ static int tfa98xx_mute(struct snd_soc_dai *dai, int mute, int stream)
tfa98xx_adsp_send_calib_values(tfa98xx);
} else {
pr_err("current profile:%d\n",tfa98xx->profile);
if(tfa98xx_ampe_monitor)
queue_delayed_work(tfa98xx->tfa98xx_wq, &tfa98xx->monitor_work, 5*HZ);
}
/* Start DSP */
if ((tfa98xx->flags & TFA98XX_FLAG_CHIP_SELECTED) &&
@ -3156,8 +3155,6 @@ static int tfa98xx_parse_dt(struct device *dev, struct tfa98xx *tfa98xx,
tfa98xx_rpc_send_delay = 2;
}
tfa98xx_ampe_monitor = of_property_read_bool(np, "rcv-ampe-monitor");
return 0;
}

View file

@ -3717,7 +3717,6 @@ enum Tfa98xx_Error tfa_status(struct tfa_device *tfa)
{
int value;
uint16_t val;
uint16_t val2;
/*
* check IC status bits: cold start
@ -3729,16 +3728,6 @@ enum Tfa98xx_Error tfa_status(struct tfa_device *tfa)
val = (uint16_t)value;
/* pr_debug("SYS_STATUS0: 0x%04x\n", val); */
value = TFA_READ_REG(tfa, AMPE);
if (value < 0)
return -value;
val2 = (uint16_t)value;
if (!TFA_GET_BF_VALUE(tfa, AMPE, val2)&& !TFA_GET_BF_VALUE(tfa, PWDN, val2)) {
pr_err("ERROR: AMPE=0, PWDN=0\n");
TFA_SET_BF_VOLATILE(tfa, AMPE, 1);
//return Tfa98xx_Error_DSP_not_running;
}
if (TFA_GET_BF_VALUE(tfa, ACS, val) ||
TFA_GET_BF_VALUE(tfa, WDS, val)) {