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

Commit b7d9db26 authored by Aditya Bavanari's avatar Aditya Bavanari
Browse files

ASoC: msm: qdsp6v2: Fix for audio noise due to TDM clk attribute



Use clock attribute Q6AFE_LPASS_CLK_ATTRIBUTE_INVERT_COUPLE_NO
as default clk attribute and set the attribute for dai
based on platform using the device tree entry if the clock
attribute is to be changed for a platform.

CRs-fixed: 2005119
Change-Id: I5fb6dca07d1dd49bd22142d314f70a973d5eb535
Signed-off-by: default avatarAditya Bavanari <abavanar@codeaurora.org>
parent 3f91f859
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ static struct afe_clk_set tdm_clk_set = {
	AFE_API_VERSION_CLOCK_SET,
	Q6AFE_LPASS_CLK_ID_QUAD_TDM_EBIT,
	Q6AFE_LPASS_IBIT_CLK_DISABLE,
	Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_NO,
	Q6AFE_LPASS_CLK_ATTRIBUTE_INVERT_COUPLE_NO,
	Q6AFE_LPASS_CLK_ROOT_DEFAULT,
	0,
};
@@ -4096,6 +4096,16 @@ static int msm_dai_tdm_q6_probe(struct platform_device *pdev)
	dev_dbg(&pdev->dev, "%s: Clk Rate from DT file %d\n",
		__func__, tdm_clk_set.clk_freq_in_hz);

	rc = of_property_read_u16(pdev->dev.of_node,
		"qcom,msm-cpudai-tdm-clk-attribute",
		&tdm_clk_set.clk_attri);
	if (rc) {
		dev_dbg(&pdev->dev, "%s: No Clk attribute in DT file %s\n",
			__func__, "qcom,msm-cpudai-tdm-clk-attribute");
	}
	dev_dbg(&pdev->dev, "%s: Clk Attribute from DT file %d\n",
		__func__, tdm_clk_set.clk_attri);

	/* other initializations within device group */
	atomic_set(&tdm_group_ref[group_idx], 0);