ASoC: wcd937x: Fix pop after PDR

Pop is heard after PDR is triggered. This is
because while device down PA is still on.
Disable PA before SSR device down to prevent pop.

Change-Id: I6bfe3e731bdf60fba8fee90ab39c03a0512006ce
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha
2018-11-13 19:49:34 +05:30
parent 53b4e14f94
commit 79da9fb84a
2 changed files with 6 additions and 0 deletions

View File

@@ -123,6 +123,7 @@ enum {
enum {
BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR = 1,
BOLERO_WCD_EVT_PA_OFF_PRE_SSR,
BOLERO_WCD_EVT_SSR_DOWN,
BOLERO_WCD_EVT_SSR_UP,
};

View File

@@ -1246,6 +1246,11 @@ static int wcd937x_event_notify(struct notifier_block *block,
mask = 0x20;
snd_soc_update_bits(codec, reg, mask, 0x00);
break;
case BOLERO_WCD_EVT_PA_OFF_PRE_SSR:
snd_soc_update_bits(codec, WCD937X_ANA_HPH, 0xC0, 0x00);
snd_soc_update_bits(codec, WCD937X_ANA_EAR, 0x80, 0x00);
snd_soc_update_bits(codec, WCD937X_AUX_AUXPA, 0x80, 0x00);
break;
case BOLERO_WCD_EVT_SSR_DOWN:
wcd937x_reset_low(wcd937x->dev);
break;