Bladeren bron

asoc: remove tdm optional properties boot logs

Move the tdm device property logs from probe function
to prepare function to print them only when tdm usecase
is started and not during bootup.

Change-Id: I3844709d501bf510620d6f20f270e30c68e78b78
Signed-off-by: Karthikeyan Mani <[email protected]>
Karthikeyan Mani 7 jaren geleden
bovenliggende
commit
b3c62d149e
1 gewijzigde bestanden met toevoegingen van 7 en 8 verwijderingen
  1. 7 8
      asoc/msm-dai-q6-v2.c

+ 7 - 8
asoc/msm-dai-q6-v2.c

@@ -5252,9 +5252,6 @@ static int msm_dai_tdm_q6_probe(struct platform_device *pdev)
 	dev_dbg(&pdev->dev, "%s: Group ID from DT file 0x%x\n",
 	dev_dbg(&pdev->dev, "%s: Group ID from DT file 0x%x\n",
 		__func__, tdm_group_cfg.group_id);
 		__func__, tdm_group_cfg.group_id);
 
 
-	dev_info(&pdev->dev, "%s: dev_name: %s group_id: 0x%x\n",
-		__func__, dev_name(&pdev->dev), tdm_group_cfg.group_id);
-
 	rc = of_property_read_u32(pdev->dev.of_node,
 	rc = of_property_read_u32(pdev->dev.of_node,
 		"qcom,msm-cpudai-tdm-group-num-ports",
 		"qcom,msm-cpudai-tdm-group-num-ports",
 		&num_tdm_group_ports);
 		&num_tdm_group_ports);
@@ -6920,6 +6917,13 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream,
 	int group_idx = 0;
 	int group_idx = 0;
 	atomic_t *group_ref = NULL;
 	atomic_t *group_ref = NULL;
 
 
+	dev_dbg(dai->dev, "%s: dev_name: %s dev_id: 0x%x group_id: 0x%x\n",
+		 __func__, dev_name(dai->dev), dai->dev->id, group_id);
+
+	if (dai_data->port_cfg.custom_tdm_header.minor_version == 0)
+		dev_dbg(dai->dev,
+			 "%s: Custom tdm header not supported\n", __func__);
+
 	group_idx = msm_dai_q6_get_group_idx(dai->id);
 	group_idx = msm_dai_q6_get_group_idx(dai->id);
 	if (group_idx < 0) {
 	if (group_idx < 0) {
 		dev_err(dai->dev, "%s port id 0x%x not supported\n",
 		dev_err(dai->dev, "%s port id 0x%x not supported\n",
@@ -8688,9 +8692,6 @@ static int msm_dai_q6_tdm_dev_probe(struct platform_device *pdev)
 	}
 	}
 	pdev->id = tdm_dev_id;
 	pdev->id = tdm_dev_id;
 
 
-	dev_info(&pdev->dev, "%s: dev_name: %s dev_id: 0x%x\n",
-		__func__, dev_name(&pdev->dev), tdm_dev_id);
-
 	dai_data = kzalloc(sizeof(struct msm_dai_q6_tdm_dai_data),
 	dai_data = kzalloc(sizeof(struct msm_dai_q6_tdm_dai_data),
 				GFP_KERNEL);
 				GFP_KERNEL);
 	if (!dai_data) {
 	if (!dai_data) {
@@ -8831,8 +8832,6 @@ static int msm_dai_q6_tdm_dev_probe(struct platform_device *pdev)
 		custom_tdm_header->header_type =
 		custom_tdm_header->header_type =
 			AFE_CUSTOM_TDM_HEADER_TYPE_INVALID;
 			AFE_CUSTOM_TDM_HEADER_TYPE_INVALID;
 	} else {
 	} else {
-		dev_info(&pdev->dev,
-			"%s: Custom tdm header not supported\n", __func__);
 		/* CUSTOM TDM HEADER CFG -- set default */
 		/* CUSTOM TDM HEADER CFG -- set default */
 		custom_tdm_header->header_type =
 		custom_tdm_header->header_type =
 			AFE_CUSTOM_TDM_HEADER_TYPE_INVALID;
 			AFE_CUSTOM_TDM_HEADER_TYPE_INVALID;