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

Commit b7853f7a authored by Sudheer Papothi's avatar Sudheer Papothi Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wsa881x: Fix boost enable sequence



Boost is getting disabled when the smart boost mixer control
is set to zero. This results in mute during audio playback.
Enable boost during audio playback independent of smart boost
mixer control value.

Change-Id: I5cb9b44d5798506e21237cb9014c8558c39b8dbf
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
parent 4f1f60e0
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -758,14 +758,12 @@ static int wsa881x_rdac_event(struct snd_soc_dapm_widget *w,
	switch (event) {
	case SND_SOC_DAPM_PRE_PMU:
		wsa881x_resource_acquire(codec, ENABLE);
		if (wsa881x->boost_enable)
		wsa881x_boost_ctrl(codec, ENABLE);
		break;
	case SND_SOC_DAPM_POST_PMD:
		swr_slvdev_datapath_control(wsa881x->swr_slave,
					    wsa881x->swr_slave->dev_num,
					    false);
		if (wsa881x->boost_enable)
		wsa881x_boost_ctrl(codec, DISABLE);
		wsa881x_resource_acquire(codec, DISABLE);
		break;