summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Lu <brent.lu@intel.com>2023-09-15 20:48:47 +0800
committerMark Brown <broonie@kernel.org>2023-09-15 14:44:43 +0100
commite8f34882622274f6d107774d9f621ef924df0b03 (patch)
tree047e13f400a74c32bc1802595f7fb1a2381f9efd
parente82907e7c10ef87768a625e732083f8dc4fe75e3 (diff)
ASoC: Intel: sof_nau8825: use nuvoton-common module
Use nuvoton-common module to support nau8318 speaker amplifier. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-15-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/boards/Kconfig1
-rw-r--r--sound/soc/intel/boards/sof_nau8825.c13
2 files changed, 4 insertions, 10 deletions
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 88521bdf5928..2dac14b16395 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -568,6 +568,7 @@ config SND_SOC_INTEL_SOF_NAU8825_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_NUVOTON_COMMON
select SND_SOC_INTEL_SOF_REALTEK_COMMON
select SND_SOC_INTEL_SOF_SSP_COMMON
help
diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c
index 1e4fa5dbe0f6..1e4e58f22ca6 100644
--- a/sound/soc/intel/boards/sof_nau8825.c
+++ b/sound/soc/intel/boards/sof_nau8825.c
@@ -23,6 +23,7 @@
#include "hda_dsp_common.h"
#include "sof_realtek_common.h"
#include "sof_maxim_common.h"
+#include "sof_nuvoton_common.h"
#include "sof_ssp_common.h"
#define NAME_SIZE 32
@@ -336,13 +337,6 @@ static struct snd_soc_dai_link_component rt1019p_component[] = {
}
};
-static struct snd_soc_dai_link_component nau8318_components[] = {
- {
- .name = "NVTN2012:00",
- .dai_name = "nau8315-hifi",
- }
-};
-
static struct snd_soc_dai_link *
sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
int ssp_codec, int ssp_amp, int dmic_be_num,
@@ -478,9 +472,7 @@ sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
links[id].ops = &max_98373_ops;
break;
case CODEC_NAU8318:
- links[id].codecs = nau8318_components;
- links[id].num_codecs = ARRAY_SIZE(nau8318_components);
- links[id].init = speaker_codec_init;
+ nau8318_set_dai_link(&links[id]);
break;
case CODEC_RT1015P:
sof_rt1015p_dai_link(&links[id]);
@@ -715,5 +707,6 @@ MODULE_AUTHOR("Brent Lu <brent.lu@intel.com>");
MODULE_LICENSE("GPL");
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_NUVOTON_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_SSP_COMMON);