Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79da9fb8 authored by Vatsal Bucha's avatar Vatsal Bucha
Browse files

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: default avatarVatsal Bucha <vbucha@codeaurora.org>
parent 53b4e14f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
};
+5 −0
Original line number Diff line number Diff line
@@ -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;