From ff2053b1fef684ca778eacaab1bafb637a2b187a Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Wed, 28 Oct 2020 14:58:33 +0530 Subject: [PATCH] soc: swr-mstr: Avoid underflow due to CPS spkr prot enabled Underflow is observed sometimes with CPS spkr prot enabled. Reduce no of retry count for wsa to 1 so as to optimize delay between reads on wsa and prevent underflow. Change-Id: I505fcf349b45bd6f2374e5cfee83473f032e4ad7 Signed-off-by: Vatsal Bucha --- soc/swr-mstr-ctrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index b4b14707cf96..f96bb0666d27 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -2444,6 +2444,10 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm) u32 temp = 0; int len = 0; + /* Change no of retry counts to 1 for wsa to avoid underflow */ + if (swrm->master_id == MASTER_ID_WSA) + retry_cmd_num = 1; + /* SW workaround to gate hw_ctl for SWR version >=1.6 */ if (swrm->version >= SWRM_VERSION_1_6) { if (swrm->swrm_hctl_reg) {