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

Commit e62d857f authored by Aviral Gupta's avatar Aviral Gupta Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm8939: update the qfuse setting for the tomtom based target



Update the qfuse settings for the tomtom based targets for the LAB
feature.

Change-Id: I67d79a3338d07ad1b14a3d2e4d3e874585b0fde9
Signed-off-by: default avatarAviral Gupta <aviralg@codeaurora.org>
parent 4a9b5e30
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -979,6 +979,17 @@ out:
	return err;
}

static void codec_enable_qfuse(struct snd_soc_codec *codec)
{
	if (codec == NULL ||
		strcmp(codec->name, "tomtom_codec"))
		return;

	msm_snd_enable_codec_ext_clk(codec, 1, false);
	tomtom_enable_qfuse_sensing(codec);
	msm_snd_enable_codec_ext_clk(codec, 0, false);
}

static void hs_detect_work(struct work_struct *work)
{
	struct delayed_work *dwork;
@@ -997,6 +1008,7 @@ static void hs_detect_work(struct work_struct *work)
	if (ret < 0)
		pr_err("%s: Failed to intialise mbhc %d\n", __func__, ret);

	codec_enable_qfuse(pdata->codec);
	/*
	 *  Set pdata->codec back to NULL, to ensure codec pointer
	 *  is not referenced further from this structure.