Skip to content

Commit 3895aa8

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: maxim-common: add max_98373_dai_link function
Add a helper function, max_98373_dai_link(), for machine driver to initialize dai link of maxim max98373 speaker amplifier. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240509163418.67746-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent dd3bd9d commit 3895aa8

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/intel/boards/sof_maxim_common.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
188188
}
189189
EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);
190190

191+
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link)
192+
{
193+
link->codecs = max_98373_components;
194+
link->num_codecs = ARRAY_SIZE(max_98373_components);
195+
link->init = max_98373_spk_codec_init;
196+
link->ops = &max_98373_ops;
197+
}
198+
EXPORT_SYMBOL_NS(max_98373_dai_link, SND_SOC_INTEL_SOF_MAXIM_COMMON);
199+
191200
void max_98373_set_codec_conf(struct snd_soc_card *card)
192201
{
193202
card->codec_conf = max_98373_codec_conf;

sound/soc/intel/boards/sof_maxim_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ extern struct snd_soc_ops max_98373_ops;
2525
extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
2626

2727
int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
28+
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link);
2829
void max_98373_set_codec_conf(struct snd_soc_card *card);
2930
int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
3031

0 commit comments

Comments
 (0)