Browse Source

asoc: codecs: check the spkr status before access the wsa registers

Before access the wsa register check the spkr status bit in
power-down sequence.

Change-Id: I5e07ee56e17701275784fd4c413bc214c5893989
Signed-off-by: Prasad Kumpatla <[email protected]>
Prasad Kumpatla 4 years ago
parent
commit
521ea726c2
1 changed files with 4 additions and 3 deletions
  1. 4 3
      asoc/codecs/wsa883x/wsa883x.c

+ 4 - 3
asoc/codecs/wsa883x/wsa883x.c

@@ -1296,9 +1296,10 @@ static int wsa883x_event_notify(struct notifier_block *nb,
 
 	switch (event) {
 	case BOLERO_WSA_EVT_PA_OFF_PRE_SSR:
-		snd_soc_component_update_bits(wsa883x->component,
-					WSA883X_PA_FSM_CTL,
-					0x01, 0x00);
+		if (test_bit(SPKR_STATUS, &wsa883x->status_mask))
+			snd_soc_component_update_bits(wsa883x->component,
+						WSA883X_PA_FSM_CTL,
+						0x01, 0x00);
 		wsa883x_swr_down(wsa883x);
 		break;