[PATCH 4/8] ASoC: Intel: boards: create sof-realtek-common module
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Mar 1 20:48:59 CET 2022
From: Brent Lu <brent.lu at intel.com>
Move sof_realtek_common.o to a dedicated module like the module to
support maxim amplifiers.
Reviewed-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Signed-off-by: Brent Lu <brent.lu at intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
sound/soc/intel/boards/Kconfig | 4 ++++
sound/soc/intel/boards/Makefile | 7 +++++--
sound/soc/intel/boards/sof_realtek_common.c | 9 +++++++++
sound/soc/intel/boards/sof_rt5682.c | 1 +
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index ad0664ca4915..cdf94b09c372 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -32,6 +32,9 @@ config SND_SOC_INTEL_HDA_DSP_COMMON
config SND_SOC_INTEL_SOF_MAXIM_COMMON
tristate
+config SND_SOC_INTEL_SOF_REALTEK_COMMON
+ tristate
+
if SND_SOC_INTEL_CATPT
config SND_SOC_INTEL_HASWELL_MACH
@@ -477,6 +480,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH
select SND_SOC_HDAC_HDMI
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_MAXIM_COMMON
+ select SND_SOC_INTEL_SOF_REALTEK_COMMON
help
This adds support for ASoC machine driver for SOF platforms
with rt5682 codec.
diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile
index 9f044290b420..b2966020e7ed 100644
--- a/sound/soc/intel/boards/Makefile
+++ b/sound/soc/intel/boards/Makefile
@@ -19,10 +19,10 @@ snd-soc-sst-byt-cht-cx2072x-objs := bytcht_cx2072x.o
snd-soc-sst-byt-cht-da7213-objs := bytcht_da7213.o
snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o
-snd-soc-sof_rt5682-objs := sof_rt5682.o sof_realtek_common.o
+snd-soc-sof_rt5682-objs := sof_rt5682.o
snd-soc-sof_cs42l42-objs := sof_cs42l42.o
snd-soc-sof_es8336-objs := sof_es8336.o
-snd-soc-sof_nau8825-objs := sof_nau8825.o sof_realtek_common.o
+snd-soc-sof_nau8825-objs := sof_nau8825.o
snd-soc-cml_rt1011_rt5682-objs := cml_rt1011_rt5682.o
snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o
snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
@@ -88,3 +88,6 @@ obj-$(CONFIG_SND_SOC_INTEL_HDA_DSP_COMMON) += snd-soc-intel-hda-dsp-common.o
snd-soc-intel-sof-maxim-common-objs += sof_maxim_common.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_MAXIM_COMMON) += snd-soc-intel-sof-maxim-common.o
+
+snd-soc-intel-sof-realtek-common-objs += sof_realtek_common.o
+obj-$(CONFIG_SND_SOC_INTEL_SOF_REALTEK_COMMON) += snd-soc-intel-sof-realtek-common.o
diff --git a/sound/soc/intel/boards/sof_realtek_common.c b/sound/soc/intel/boards/sof_realtek_common.c
index 4cf131310ad3..669e44c73c17 100644
--- a/sound/soc/intel/boards/sof_realtek_common.c
+++ b/sound/soc/intel/boards/sof_realtek_common.c
@@ -132,12 +132,14 @@ void sof_rt1011_dai_link(struct snd_soc_dai_link *link)
link->init = rt1011_init;
link->ops = &rt1011_ops;
}
+EXPORT_SYMBOL_NS(sof_rt1011_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1011_codec_conf(struct snd_soc_card *card)
{
card->codec_conf = rt1011_codec_confs;
card->num_configs = ARRAY_SIZE(rt1011_codec_confs);
}
+EXPORT_SYMBOL_NS(sof_rt1011_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
/*
* rt1015: i2c mode driver for ALC1015 and ALC1015Q
@@ -233,6 +235,7 @@ void sof_rt1015p_dai_link(struct snd_soc_dai_link *link)
link->init = rt1015p_init;
link->ops = &rt1015p_ops;
}
+EXPORT_SYMBOL_NS(sof_rt1015p_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1015p_codec_conf(struct snd_soc_card *card)
{
@@ -242,6 +245,7 @@ void sof_rt1015p_codec_conf(struct snd_soc_card *card)
card->codec_conf = rt1015p_codec_confs;
card->num_configs = ARRAY_SIZE(rt1015p_codec_confs);
}
+EXPORT_SYMBOL_NS(sof_rt1015p_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
/*
* RT1015 audio amplifier
@@ -343,6 +347,7 @@ void sof_rt1015_codec_conf(struct snd_soc_card *card)
card->codec_conf = rt1015_amp_conf;
card->num_configs = ARRAY_SIZE(rt1015_amp_conf);
}
+EXPORT_SYMBOL_NS(sof_rt1015_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1015_dai_link(struct snd_soc_dai_link *link, unsigned int fs)
{
@@ -354,3 +359,7 @@ void sof_rt1015_dai_link(struct snd_soc_dai_link *link, unsigned int fs)
if (fs == 100)
rt1015_ops.hw_params = rt1015_hw_params_pll_and_tdm;
}
+EXPORT_SYMBOL_NS(sof_rt1015_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
+
+MODULE_DESCRIPTION("ASoC Intel SOF Realtek helpers");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index 2fcd22272900..ebec4d15edaa 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -1081,3 +1081,4 @@ MODULE_AUTHOR("Mac Chiang <mac.chiang at intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_MAXIM_COMMON);
+MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);
--
2.25.1
More information about the Alsa-devel
mailing list