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 <nkumpat@codeaurora.org>
This commit is contained in:
Prasad Kumpatla
2020-05-09 11:49:54 +05:30
committed by Gerrit - the friendly Code Review server
parent e7efdae360
commit 521ea726c2

View File

@@ -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;