summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_sdw_rt722_sdca.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-05-13 12:39:49 +0300
committerTakashi Iwai <tiwai@suse.de>2024-05-13 12:39:49 +0300
commit3a07362fab1653d3aca31a9155c8cc776138fd02 (patch)
tree91ecdfabfce8f12bffa2fb64a595a821b67d3422 /sound/soc/intel/boards/sof_sdw_rt722_sdca.c
parent762e6af39883a816290286d5d46a20bbd0f3a135 (diff)
parentc3c5ac4bd7d7019f2e3ad1720572d53226fe656e (diff)
downloadlinux-3a07362fab1653d3aca31a9155c8cc776138fd02.tar.xz
Merge tag 'asoc-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.10 This is a very big update, in large part due to extensive work the Intel people have been doing in their drivers though it's also been busy elsewhere. There's also a big overhaul of the DAPM documentation from Luca Ceresoli arising from the work he did putting together his recent ELC talk, and he also contributed a new tool for visualising the DAPM state. - A new tool dapm-graph for visualising the DAPM state. - Substantial fixes and clarifications for the DAPM documentation. - Very large updates throughout the Intel audio drivers. - Cleanups of accessors for driver data, module labelling, and for constification. - Modernsation and cleanup work in the Mediatek drivers. - Several fixes and features for the DaVinci I2S driver. - New drivers for several AMD and Intel platforms, Nuvoton NAU8325, Rockchip RK3308 and Texas Instruments PCM6240.
Diffstat (limited to 'sound/soc/intel/boards/sof_sdw_rt722_sdca.c')
-rw-r--r--sound/soc/intel/boards/sof_sdw_rt722_sdca.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c
index fe3a2bff95bc..083d281bd052 100644
--- a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c
+++ b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c
@@ -15,19 +15,11 @@
#include <sound/soc-dapm.h>
#include "sof_sdw_common.h"
-static const struct snd_soc_dapm_widget rt722_spk_widgets[] = {
- SND_SOC_DAPM_SPK("Speaker", NULL),
-};
-
static const struct snd_soc_dapm_route rt722_spk_map[] = {
{ "Speaker", NULL, "rt722 SPK" },
};
-static const struct snd_kcontrol_new rt722_spk_controls[] = {
- SOC_DAPM_PIN_SWITCH("Speaker"),
-};
-
-static int rt722_spk_init(struct snd_soc_pcm_runtime *rtd)
+int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
{
struct snd_soc_card *card = rtd->card;
int ret;
@@ -38,20 +30,6 @@ static int rt722_spk_init(struct snd_soc_pcm_runtime *rtd)
if (!card->components)
return -ENOMEM;
- ret = snd_soc_add_card_controls(card, rt722_spk_controls,
- ARRAY_SIZE(rt722_spk_controls));
- if (ret) {
- dev_err(card->dev, "failed to add rt722 spk controls: %d\n", ret);
- return ret;
- }
-
- ret = snd_soc_dapm_new_controls(&card->dapm, rt722_spk_widgets,
- ARRAY_SIZE(rt722_spk_widgets));
- if (ret) {
- dev_err(card->dev, "failed to add rt722 spk widgets: %d\n", ret);
- return ret;
- }
-
ret = snd_soc_dapm_add_routes(&card->dapm, rt722_spk_map, ARRAY_SIZE(rt722_spk_map));
if (ret)
dev_err(rtd->dev, "failed to add rt722 spk map: %d\n", ret);
@@ -59,39 +37,3 @@ static int rt722_spk_init(struct snd_soc_pcm_runtime *rtd)
return ret;
}
-int sof_sdw_rt722_spk_init(struct snd_soc_card *card,
- const struct snd_soc_acpi_link_adr *link,
- struct snd_soc_dai_link *dai_links,
- struct sof_sdw_codec_info *info,
- bool playback)
-{
- dai_links->init = rt722_spk_init;
-
- return 0;
-}
-
-static int rt722_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)
-{
- struct snd_soc_card *card = rtd->card;
- struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
- struct snd_soc_component *component = codec_dai->component;
-
- card->components = devm_kasprintf(card->dev, GFP_KERNEL,
- "%s mic:%s",
- card->components, component->name_prefix);
- if (!card->components)
- return -ENOMEM;
-
- return 0;
-}
-
-int sof_sdw_rt722_sdca_dmic_init(struct snd_soc_card *card,
- const struct snd_soc_acpi_link_adr *link,
- struct snd_soc_dai_link *dai_links,
- struct sof_sdw_codec_info *info,
- bool playback)
-{
- dai_links->init = rt722_sdca_dmic_rtd_init;
-
- return 0;
-}