1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (c) 2020 Intel Corporation
5 * sof_sdw_rt715_sdca - Helpers to handle RT715-SDCA from generic machine driver
8 #include <linux/device.h>
9 #include <linux/errno.h>
10 #include <sound/soc.h>
11 #include <sound/soc-acpi.h>
12 #include "sof_sdw_common.h"
14 static int rt715_sdca_rtd_init(struct snd_soc_pcm_runtime
*rtd
)
16 struct snd_soc_card
*card
= rtd
->card
;
18 card
->components
= devm_kasprintf(card
->dev
, GFP_KERNEL
,
21 if (!card
->components
)
27 int sof_sdw_rt715_sdca_init(const struct snd_soc_acpi_link_adr
*link
,
28 struct snd_soc_dai_link
*dai_links
,
29 struct sof_sdw_codec_info
*info
,
33 * DAI ID is fixed at SDW_DMIC_DAI_ID for 715-SDCA to
34 * keep sdw DMIC and HDMI setting static in UCM
36 if (sof_sdw_quirk
& SOF_RT715_DAI_ID_FIX
)
37 dai_links
->id
= SDW_DMIC_DAI_ID
;
39 dai_links
->init
= rt715_sdca_rtd_init
;