Commit 3895aa82 authored by Brent Lu's avatar Brent Lu Committed by Mark Brown

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: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-8-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent dd3bd9dc
......@@ -188,6 +188,15 @@ int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
}
EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link)
{
link->codecs = max_98373_components;
link->num_codecs = ARRAY_SIZE(max_98373_components);
link->init = max_98373_spk_codec_init;
link->ops = &max_98373_ops;
}
EXPORT_SYMBOL_NS(max_98373_dai_link, SND_SOC_INTEL_SOF_MAXIM_COMMON);
void max_98373_set_codec_conf(struct snd_soc_card *card)
{
card->codec_conf = max_98373_codec_conf;
......
......@@ -25,6 +25,7 @@ extern struct snd_soc_ops max_98373_ops;
extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link);
void max_98373_set_codec_conf(struct snd_soc_card *card);
int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment