Prechádzať zdrojové kódy

asoc: qcs405: add missing dai links

Add WCN dai links for enabling BT use cases.

Change-Id: I1de1de0d9de0115d89e6a10f79a2cbf0a54d0e44
Signed-off-by: Mangesh Kunchamwar <[email protected]>
Mangesh Kunchamwar 6 rokov pred
rodič
commit
b2438de066
1 zmenil súbory, kde vykonal 15 pridanie a 1 odobranie
  1. 15 1
      asoc/qcs405.c

+ 15 - 1
asoc/qcs405.c

@@ -7566,7 +7566,7 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev)
 	int total_links = 0;
 	uint32_t tasha_codec = 0, auxpcm_audio_intf = 0;
 	uint32_t va_bolero_codec = 0, wsa_bolero_codec = 0, mi2s_audio_intf = 0;
-	uint32_t spdif_audio_intf = 0;
+	uint32_t spdif_audio_intf = 0, wcn_audio_intf = 0;
 	const struct of_device_id *match;
 	char __iomem *spdif_cfg, *spdif_pin_ctl;
 	int rc = 0;
@@ -7710,6 +7710,20 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev)
 				iowrite32(0x2220, spdif_pin_ctl);
 			}
 		}
+		rc = of_property_read_u32(dev->of_node, "qcom,wcn-btfm",
+					  &wcn_audio_intf);
+		if (rc) {
+			dev_dbg(dev, "%s: No DT match WCN audio interface\n",
+				__func__);
+		} else {
+			if (wcn_audio_intf) {
+				memcpy(msm_qcs405_dai_links + total_links,
+				msm_wcn_be_dai_links,
+				sizeof(msm_wcn_be_dai_links));
+				total_links +=
+				ARRAY_SIZE(msm_wcn_be_dai_links);
+			}
+		}
 		dailink = msm_qcs405_dai_links;
 	} else if (!strcmp(match->data, "stub_codec")) {
 		card = &snd_soc_card_stub_msm;