From cea5de36f8b25e6e575f0a06ca11310a84445c84 Mon Sep 17 00:00:00 2001 From: Matthew Rice Date: Fri, 10 Jun 2022 18:17:30 -0700 Subject: [PATCH] asoc: codecs: Reinitialize WSA SWR Params during SSR During any restart scenario, it is possible for WSA L and WSA R to be enumerated differently than bootup, causing them to get assinged with different swr dev_num than during bootup. Add logic to ensure that during restarts, the swr port params from device tree are reset in swrm driver to ensure that they match with the new dev_num. Change-Id: Ied3eca08a95c8d6a92397c446f7c10f41886f29e Signed-off-by: Matthew Rice --- asoc/codecs/wsa884x/wsa884x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/asoc/codecs/wsa884x/wsa884x.c b/asoc/codecs/wsa884x/wsa884x.c index 342f887bdc..4e51351bd3 100644 --- a/asoc/codecs/wsa884x/wsa884x.c +++ b/asoc/codecs/wsa884x/wsa884x.c @@ -1805,6 +1805,9 @@ static int wsa884x_event_notify(struct notifier_block *nb, /* Add delay to allow enumerate */ usleep_range(20000, 20010); wsa884x_swr_reset(wsa884x); + dev_err(wsa884x->dev, "%s: BOLERO_SLV_EVT_SSR_UP Called", __func__); + swr_init_port_params(wsa884x->swr_slave, WSA884X_MAX_SWR_PORTS, + wsa884x->swr_wsa_port_params); break; case BOLERO_SLV_EVT_PA_ON_POST_FSCLK: