modules: cspl: check new context creation

check current and new usecase index and invoke QDSP/LPASS
new context creation only when there is actual usecase changes.

PROPAGATED_from: (CR)

Change-Id: Id335d253efaa1c0974715568233c8e91819b7d43
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1226431
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Yoon (Seungyoon) Lee 2018-08-14 11:49:43 -05:00 • committed by Seungyoon Lee
commit 198874112b

View file

@ -468,16 +468,18 @@ static int msm_crus_se_usecase(struct snd_kcontrol *kcontrol,
return -EINVAL;
}
cirrus_se_usecase = crus_set;
if (cirrus_se_usecase != crus_set) {
cirrus_se_usecase = crus_set;
case_ctrl.status_l = 0;
case_ctrl.status_r = 0;
case_ctrl.atemp = 0;
case_ctrl.value = cirrus_se_usecase;
case_ctrl.status_l = 0;
case_ctrl.status_r = 0;
case_ctrl.atemp = 0;
case_ctrl.value = cirrus_se_usecase;
crus_set_param(cirrus_ff_port, CIRRUS_SE,
CRUS_PARAM_RX_SET_USECASE, sizeof(case_ctrl),
(void *)&case_ctrl);
crus_set_param(cirrus_ff_port, CIRRUS_SE,
CRUS_PARAM_RX_SET_USECASE, sizeof(case_ctrl),
(void *)&case_ctrl);
}
return 0;
}