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

Commit 7f70656c authored by Meng Wang's avatar Meng Wang
Browse files

asoc: mbhc: update mode for analog type-c headset check



POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER is not supported on new
kernel-5.4. Update mode to TYPEC_ACCESSORY_AUDIO for analog
type-c headset.

Change-Id: Id46ea2eebea8257a48134431f07a81b6ed7e6c7d
Signed-off-by: default avatarMeng Wang <mengw@codeaurora.org>
parent 669089fd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/firmware.h>
#include <linux/completion.h>
#include <linux/soc/qcom/fsa4480-i2c.h>
#include <linux/usb/typec.h>
#include <sound/soc.h>
#include <sound/jack.h>
#include <asoc/msm-cdc-pinctrl.h>
@@ -1633,7 +1634,7 @@ static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,

	dev_dbg(mbhc->component->dev, "%s: mode = %lu\n", __func__, mode);

	if (mode == POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER) {
	if (mode == TYPEC_ACCESSORY_AUDIO) {
		if (mbhc->mbhc_cb->clk_setup)
			mbhc->mbhc_cb->clk_setup(mbhc->component, true);
		/* insertion detected, enable L_DET_EN */