asoc: codec: wsa884x: check for spkr status before enabling PA

added condition to check for spkr status before enabling
GLOBAL_PA to make sure PA is enabled only when Speaker
is in Enabled state.

Change-Id: Ifa4eeb7d8561bb68193abae16221dd8b2464029c
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
This commit is contained in:
Ganapathiraju Sarath Varma
2023-09-05 20:33:39 +05:30
committed by Sarath Varma Ganapathiraju
parent 966a448ec3
commit 374374a0c4

View File

@@ -227,8 +227,10 @@ static int wsa884x_handle_post_irq(void *data)
if (!wsa884x->pa_mute) {
do {
wsa884x->pa_mute = 0;
regmap_update_bits(wsa884x->regmap,
REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01));
if (test_bit(SPKR_STATUS, &wsa884x->status_mask))
regmap_update_bits(wsa884x->regmap,
REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01));
usleep_range(1000, 1100);
regmap_read(wsa884x->regmap, WSA884X_INTR_STATUS0, &sts1);