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.

Propagated from the 5.0 branch.

Change-Id: I9b20a242ad4e8375718844c9dfeb0e4996588a19
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
This commit is contained in:
Junkai Cai
2021-08-21 16:36:31 -07:00
parent 319e140119
commit c1fe3f72c2

View File

@@ -2498,6 +2498,10 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm)
u32 temp = 0; u32 temp = 0;
int len = 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 */ /* SW workaround to gate hw_ctl for SWR version >=1.6 */
if (swrm->version >= SWRM_VERSION_1_6) { if (swrm->version >= SWRM_VERSION_1_6) {
if (swrm->swrm_hctl_reg) { if (swrm->swrm_hctl_reg) {