diff mbox series

ASoC: qcom: Fix build error if CONFIG_SOUNDWIRE=m

Message ID 20221125074458.117347-1-zhangqilong3@huawei.com (mailing list archive)
State New, archived
Headers show
Series ASoC: qcom: Fix build error if CONFIG_SOUNDWIRE=m | expand

Commit Message

Zhang Qilong Nov. 25, 2022, 7:44 a.m. UTC
If CONFIG_SND_SOC_APQ8016_SBC=y || CONFIG_SND_SOC_MSM8996=y,
CONFIG_SND_SOC_QCOM_COMMON=y, CONFIG_SOUNDWIRE=m, building fails:

sound/soc/qcom/common.o: in function `qcom_snd_sdw_hw_free':
common.c:(.text+0x294): undefined reference to `sdw_disable_stream'
common.c:(.text+0x2a0): undefined reference to `sdw_deprepare_stream'
sound/soc/qcom/common.o: in function `qcom_snd_sdw_prepare':
common.c:(.text+0x314): undefined reference to `sdw_prepare_stream'
common.c:(.text+0x324): undefined reference to `sdw_enable_stream'
common.c:(.text+0x364): undefined reference to `sdw_disable_stream'
common.c:(.text+0x36c): undefined reference to `sdw_deprepare_stream'
common.c:(.text+0x3a8): undefined reference to `sdw_deprepare_stream'

Make SND_SOC_APQ8016_SBC,SND_SOC_MSM8996 depends on
'SOUNDWIRE || !SOUNDWIRE' to fix this.

Fixes: 3bd975f3ae0a ("ASoC: qcom: sm8250: move some code to common")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 sound/soc/qcom/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Srinivas Kandagatla Nov. 25, 2022, 9:43 a.m. UTC | #1
On 25/11/2022 07:44, Zhang Qilong wrote:
> If CONFIG_SND_SOC_APQ8016_SBC=y || CONFIG_SND_SOC_MSM8996=y,
> CONFIG_SND_SOC_QCOM_COMMON=y, CONFIG_SOUNDWIRE=m, building fails:
> 
> sound/soc/qcom/common.o: in function `qcom_snd_sdw_hw_free':
> common.c:(.text+0x294): undefined reference to `sdw_disable_stream'
> common.c:(.text+0x2a0): undefined reference to `sdw_deprepare_stream'
> sound/soc/qcom/common.o: in function `qcom_snd_sdw_prepare':
> common.c:(.text+0x314): undefined reference to `sdw_prepare_stream'
> common.c:(.text+0x324): undefined reference to `sdw_enable_stream'
> common.c:(.text+0x364): undefined reference to `sdw_disable_stream'
> common.c:(.text+0x36c): undefined reference to `sdw_deprepare_stream'
> common.c:(.text+0x3a8): undefined reference to `sdw_deprepare_stream'
> 
> Make SND_SOC_APQ8016_SBC,SND_SOC_MSM8996 depends on
> 'SOUNDWIRE || !SOUNDWIRE' to fix this.

This is not really the case, QCOM_COMMON is the one depending on soundwire


I have submitted a patch to clean this up.

https://lore.kernel.org/lkml/20221124140351[PATCH]%20ASoC:%20qcom:%20cleanup%20and%20fix%20dependency%20of%20QCOM_COMMON.407506-1-srinivas.kandagatla@linaro.org/T/#u



--srini
> 
> Fixes: 3bd975f3ae0a ("ASoC: qcom: sm8250: move some code to common")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> -- >   sound/soc/qcom/Kconfig | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
> index 8c7398bc1ca8..f5f0b48d74af 100644
> --- a/sound/soc/qcom/Kconfig
> +++ b/sound/soc/qcom/Kconfig
> @@ -58,6 +58,7 @@ config SND_SOC_STORM
>   
>   config SND_SOC_APQ8016_SBC
>   	tristate "SoC Audio support for APQ8016 SBC platforms"
> +	depends on SOUNDWIRE || !SOUNDWIRE
>   	select SND_SOC_LPASS_APQ8016
>   	select SND_SOC_QCOM_COMMON
>   	help
> @@ -141,6 +142,7 @@ config SND_SOC_MSM8996
>   	tristate "SoC Machine driver for MSM8996 and APQ8096 boards"
>   	depends on QCOM_APR
>   	depends on COMMON_CLK
> +	depends on SOUNDWIRE || !SOUNDWIRE
>   	select SND_SOC_QDSP6
>   	select SND_SOC_QCOM_COMMON
>   	help
diff mbox series

Patch

diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
index 8c7398bc1ca8..f5f0b48d74af 100644
--- a/sound/soc/qcom/Kconfig
+++ b/sound/soc/qcom/Kconfig
@@ -58,6 +58,7 @@  config SND_SOC_STORM
 
 config SND_SOC_APQ8016_SBC
 	tristate "SoC Audio support for APQ8016 SBC platforms"
+	depends on SOUNDWIRE || !SOUNDWIRE
 	select SND_SOC_LPASS_APQ8016
 	select SND_SOC_QCOM_COMMON
 	help
@@ -141,6 +142,7 @@  config SND_SOC_MSM8996
 	tristate "SoC Machine driver for MSM8996 and APQ8096 boards"
 	depends on QCOM_APR
 	depends on COMMON_CLK
+	depends on SOUNDWIRE || !SOUNDWIRE
 	select SND_SOC_QDSP6
 	select SND_SOC_QCOM_COMMON
 	help