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

Commit 657d8f8a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd937x: Fix headset record pop during SSR"

parents 1332a0dd 018dbd2d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -1587,14 +1587,13 @@ static int wcd937x_event_notify(struct notifier_block *block,
		break;
	case BOLERO_WCD_EVT_SSR_UP:
		wcd937x_reset(wcd937x->dev);
		/* allow reset to take effect */
		usleep_range(10000, 10010);
		wcd937x_get_logical_addr(wcd937x->tx_swr_dev);
		wcd937x_get_logical_addr(wcd937x->rx_swr_dev);
		wcd937x_init_reg(component);
		regcache_mark_dirty(wcd937x->regmap);
		regcache_sync(wcd937x->regmap);
		/* Enable surge protection */
		snd_soc_component_update_bits(component,
				WCD937X_HPH_SURGE_HPHLR_SURGE_EN,
				0xFF, 0xD9);
		/* Initialize MBHC module */
		mbhc = &wcd937x->mbhc->wcd_mbhc;
		ret = wcd937x_mbhc_post_ssr_init(wcd937x->mbhc, component);