Audio: fixed app_type_cfg_supported in kernel

The app_type_cfg is always supported and uses.
It results in passing unexpected parameters to DSP which create the problem.
Fixed HFP issue.

Bug:117892070

Change-Id: I1b78215e48c896153d05998f26471f038b003aca
Signed-off-by: roy_li <Roy_Li@compal.com>
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index 51c2625..c11dfc3 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -607,6 +607,7 @@
 static struct msm_pcm_routing_app_type_data lsm_app_type_cfg[MAX_APP_TYPES];
 static struct msm_pcm_stream_app_type_cfg
 			 fe_dai_app_type_cfg[MSM_FRONTEND_DAI_MAX][2];
+static bool app_type_cfg_supported = false;
 
 /* The caller of this should aqcuire routing lock */
 void msm_pcm_routing_get_bedai_info(int be_idx,
@@ -1095,7 +1096,7 @@
 					sample_rate;
 				bit_width =
 				lsm_app_type_cfg[app_type_idx].bit_width;
-			} else if (app_type) {
+			} else if (app_type && app_type_cfg_supported) {
 				app_type_idx =
 					msm_pcm_routing_get_app_type_idx(
 						app_type);
@@ -1310,7 +1311,7 @@
 
 			app_type =
 			fe_dai_app_type_cfg[fedai_id][session_type].app_type;
-			if (app_type) {
+			if (app_type && app_type_cfg_supported) {
 				app_type_idx =
 				msm_pcm_routing_get_app_type_idx(app_type);
 				sample_rate =
@@ -1557,7 +1558,7 @@
 					sample_rate;
 				bits_per_sample =
 				lsm_app_type_cfg[app_type_idx].bit_width;
-			} else if (app_type) {
+			} else if (app_type && app_type_cfg_supported) {
 				app_type_idx =
 				msm_pcm_routing_get_app_type_idx(app_type);
 				sample_rate =
@@ -9567,6 +9568,7 @@
 				ucontrol->value.integer.value[i++];
 		app_type_cfg[j].bit_width =
 				ucontrol->value.integer.value[i++];
+		app_type_cfg_supported = true;
 	}
 
 	return 0;
@@ -13598,7 +13600,7 @@
 					sample_rate;
 				bits_per_sample =
 				lsm_app_type_cfg[app_type_idx].bit_width;
-			} else if (app_type) {
+			} else if (app_type && app_type_cfg_supported) {
 				app_type_idx =
 				msm_pcm_routing_get_app_type_idx(app_type);
 				sample_rate =