From f6ace7d5da48cf1287408ce2c5b898e2d0e95af6 Mon Sep 17 00:00:00 2001 From: Vignesh Kulothungan Date: Wed, 4 Mar 2020 16:17:49 -0800 Subject: [PATCH] ASoC: enable external display only for QGKI Add external display dai links to sound card only when CONFIG_AUDIO_QGKI is enabled. Change-Id: Ic67def877cddeb08aebcfc00ab4886826905b7c2 Signed-off-by: Vignesh Kulothungan --- asoc/lahaina.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asoc/lahaina.c b/asoc/lahaina.c index 1815c06e49..995833356b 100644 --- a/asoc/lahaina.c +++ b/asoc/lahaina.c @@ -6291,6 +6291,7 @@ static struct snd_soc_dai_link msm_wcn_btfm_be_dai_links[] = { }, }; +#if IS_ENABLED(CONFIG_AUDIO_QGKI) static struct snd_soc_dai_link ext_disp_be_dai_link[] = { /* DISP PORT BACK END DAI Link */ { @@ -6317,6 +6318,7 @@ static struct snd_soc_dai_link ext_disp_be_dai_link[] = { SND_SOC_DAILINK_REG(display_port1), }, }; +#endif static struct snd_soc_dai_link msm_mi2s_be_dai_links[] = { { @@ -6789,7 +6791,9 @@ static struct snd_soc_dai_link msm_lahaina_dai_links[ ARRAY_SIZE(msm_wsa_cdc_dma_be_dai_links) + ARRAY_SIZE(msm_rx_tx_cdc_dma_be_dai_links) + ARRAY_SIZE(msm_va_cdc_dma_be_dai_links) + +#if IS_ENABLED(CONFIG_AUDIO_QGKI) ARRAY_SIZE(ext_disp_be_dai_link) + +#endif ARRAY_SIZE(msm_wcn_be_dai_links) + ARRAY_SIZE(msm_afe_rxtx_lb_be_dai_link) + ARRAY_SIZE(msm_wcn_btfm_be_dai_links)]; @@ -7071,6 +7075,7 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) } } +#if IS_ENABLED(CONFIG_AUDIO_QGKI) rc = of_property_read_u32(dev->of_node, "qcom,ext-disp-audio-rx", &val); if (!rc && val) { @@ -7081,6 +7086,7 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) sizeof(ext_disp_be_dai_link)); total_links += ARRAY_SIZE(ext_disp_be_dai_link); } +#endif rc = of_property_read_u32(dev->of_node, "qcom,wcn-bt", &val); if (!rc && val) {