aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2023-10-06 11:40:41 +0300
committerMark Brown <[email protected]>2023-10-09 13:14:17 +0100
commitd65d4a2c3867a04ee4ae9c99747a6398b58e269b (patch)
tree8125f2f9122025c72fc9888db42cc0864a8479ab
parent85a6af284d1c720d78683b550bb5d32bc84e3cfc (diff)
ASoC: SOF: sof-client: fix build when only IPC4 is selected
When IPC3 is not selected, sof-client.c still makes a hard-coded reference to an IPC3-specific function: ERROR: modpost: "sof_ipc3_do_rx_work" [sound/soc/sof/snd-sof.ko] undefined! Fix by making the code conditional. Closes: https://github.com/thesofproject/linux/issues/4581 Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/sof-client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/sof/sof-client.c b/sound/soc/sof/sof-client.c
index 3f636b82173e..9dce7f53b482 100644
--- a/sound/soc/sof/sof-client.c
+++ b/sound/soc/sof/sof-client.c
@@ -305,7 +305,8 @@ EXPORT_SYMBOL_NS_GPL(sof_client_ipc_tx_message, SND_SOC_SOF_CLIENT);
int sof_client_ipc_rx_message(struct sof_client_dev *cdev, void *ipc_msg, void *msg_buf)
{
- if (cdev->sdev->pdata->ipc_type == SOF_IPC_TYPE_3) {
+ if (IS_ENABLED(CONFIG_SND_SOC_SOF_IPC3) &&
+ cdev->sdev->pdata->ipc_type == SOF_IPC_TYPE_3) {
struct sof_ipc_cmd_hdr *hdr = ipc_msg;
if (hdr->size < sizeof(hdr)) {