Merge audio function from 8901_P.

Root cause:
N/A

How to fix:
N/A

Change-Id: Id346f772c0aa28f5e252b02dfb81b20189410649
RiskArea:Audio
diff --git a/asoc/msm8952-dai-links.c b/asoc/msm8952-dai-links.c
old mode 100644
new mode 100755
index 1fa9ac6..feb52b0
--- a/asoc/msm8952-dai-links.c
+++ b/asoc/msm8952-dai-links.c
@@ -1261,32 +1261,16 @@
 	},
 };
 
-static struct snd_soc_dai_link msm8952_hdmi_dba_dai_link[] = {
-	{
-		.name = LPASS_BE_QUIN_MI2S_RX,
-		.stream_name = "Quinary MI2S Playback",
-		.cpu_dai_name = "msm-dai-q6-mi2s.5",
-		.platform_name = "msm-pcm-routing",
-		.codec_dai_name = "msm_hdmi_dba_codec_rx_dai",
-		.codec_name = "msm-hdmi-dba-codec-rx",
-		.no_pcm = 1,
-		.dpcm_playback = 1,
-		.id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
-		.be_hw_params_fixup = msm_quin_be_hw_params_fixup,
-		.ops = &msm8952_quin_mi2s_be_ops,
-		.ignore_pmdown_time = 1, /* dai link has playback support */
-		.ignore_suspend = 1,
-	},
-};
-
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -s
 static struct snd_soc_dai_link msm8952_quin_dai_link[] = {
 	{
 		.name = LPASS_BE_QUIN_MI2S_RX,
 		.stream_name = "Quinary MI2S Playback",
 		.cpu_dai_name = "msm-dai-q6-mi2s.5",
 		.platform_name = "msm-pcm-routing",
-		.codec_dai_name = "snd-soc-dummy-dai",
-		.codec_name = "snd-soc-dummy",
+		.codec_dai_name = "aw8898-aif",
+		.codec_name = "aw8898_smartpa",
+		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS,
 		.no_pcm = 1,
 		.dpcm_playback = 1,
 		.id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
@@ -1296,6 +1280,7 @@
 		.ignore_suspend = 1,
 	},
 };
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -e
 
 static struct snd_soc_dai_link msm8952_tdm_be_dai_link[] = {
 	/* TDM be dai links */
@@ -1367,14 +1352,16 @@
 static struct snd_soc_aux_dev *msm895x_aux_dev;
 static struct snd_soc_codec_conf *msm895x_codec_conf;
 
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -s
 static struct snd_soc_dai_link msm8952_tasha_dai_links[
 ARRAY_SIZE(msm8952_common_fe_dai) +
 ARRAY_SIZE(msm8952_tasha_fe_dai) +
 ARRAY_SIZE(msm8952_tdm_fe_dai) +
 ARRAY_SIZE(msm8952_common_be_dai) +
 ARRAY_SIZE(msm8952_tasha_be_dai) +
-ARRAY_SIZE(msm8952_hdmi_dba_dai_link) +
+ARRAY_SIZE(msm8952_quin_dai_link) +
 ARRAY_SIZE(msm8952_tdm_be_dai_link)];
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -e
 
 int msm8952_init_wsa_dev(struct platform_device *pdev,
 			struct snd_soc_card *card)
@@ -1611,9 +1598,13 @@
 	if (of_property_read_bool(dev->of_node, "qcom,hdmi-dba-codec-rx")) {
 		dev_dbg(dev, "%s(): hdmi dba audio support present\n",
 				__func__);
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -s
+		/*
 		memcpy(msm8952_dai_links + len5, msm8952_hdmi_dba_dai_link,
 			sizeof(msm8952_hdmi_dba_dai_link));
 		len5 += ARRAY_SIZE(msm8952_hdmi_dba_dai_link);
+		*/
+//[FairPhone][Audio][jinjia]=2018.11.21=smart amp porting. -e
 	} else {
 		dev_dbg(dev, "%s(): No hdmi dba present, add quin dai\n",
 				__func__);
diff --git a/asoc/msm8952-slimbus.c b/asoc/msm8952-slimbus.c
old mode 100644
new mode 100755
index 4200c95..b26fee3
--- a/asoc/msm8952-slimbus.c
+++ b/asoc/msm8952-slimbus.c
@@ -189,7 +189,7 @@
 		return NULL;
 
 #define S(X, Y) ((WCD_MBHC_CAL_PLUG_TYPE_PTR(tasha_wcd_cal)->X) = (Y))
-	S(v_hs_max, 1500);
+	S(v_hs_max, 1600);
 #undef S
 #define S(X, Y) ((WCD_MBHC_CAL_BTN_DET_PTR(tasha_wcd_cal)->X) = (Y))
 	S(num_btn, WCD_MBHC_DEF_BUTTONS);
@@ -199,6 +199,17 @@
 	btn_high = ((void *)&btn_cfg->_v_btn_low) +
 		(sizeof(btn_cfg->_v_btn_low[0]) * btn_cfg->num_btn);
 
+//[FairPhone][jinjia]=2019.01.23=Adjust the voltage range threshold for headset multi-key detection. -s
+#if 1
+	btn_high[0] = 75;
+	btn_high[1] = 125;
+	btn_high[2] = 237;
+	btn_high[3] = 450;
+	btn_high[4] = 450;
+	btn_high[5] = 450;
+	btn_high[6] = 450;
+	btn_high[7] = 450;
+#else
 	btn_high[0] = 75;
 	btn_high[1] = 150;
 	btn_high[2] = 237;
@@ -207,6 +218,9 @@
 	btn_high[5] = 450;
 	btn_high[6] = 450;
 	btn_high[7] = 450;
+#endif
+//[FairPhone][jinjia]=2019.01.23=Adjust the voltage range threshold for headset multi-key detection. -e
+
 
 	return tasha_wcd_cal;
 }