Browse Source

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 <[email protected]>
Matthew Rice 2 years ago
parent
commit
cea5de36f8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      asoc/codecs/wsa884x/wsa884x.c

+ 3 - 0
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: