summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2024-11-01 07:38:01 +0530
committerMark Brown <broonie@kernel.org>2024-11-01 13:22:47 +0000
commit485df22866559e2f821a9754d51a9755ce56e7aa (patch)
treebeaf74446a51c68b0a1c2bb2c12b2ad420303804 /include/sound
parent019610566757a749dde7e0c92777d2c1613afef8 (diff)
downloadlinux-stable-485df22866559e2f821a9754d51a9755ce56e7aa.tar.gz
linux-stable-485df22866559e2f821a9754d51a9755ce56e7aa.tar.bz2
linux-stable-485df22866559e2f821a9754d51a9755ce56e7aa.zip
ASoC: sdw_utils/intel/amd: refactor dai link init logic
Add 'no_pcm' as parameter for asoc_sdw_init_dai_link() so that same function can be used for SOF and legacy(No DSP) stack. Pass 'no_pcm' as 1 for Intel and AMD SOF based machine drivers. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241101020802.1103181-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc_sdw_utils.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h
index a25f94d6eb67..0e82598e10af 100644
--- a/include/sound/soc_sdw_utils.h
+++ b/include/sound/soc_sdw_utils.h
@@ -152,14 +152,15 @@ void asoc_sdw_init_dai_link(struct device *dev, struct snd_soc_dai_link *dai_lin
struct snd_soc_dai_link_component *cpus, int cpus_num,
struct snd_soc_dai_link_component *platform_component,
int num_platforms, struct snd_soc_dai_link_component *codecs,
- int codecs_num, int (*init)(struct snd_soc_pcm_runtime *rtd),
+ int codecs_num, int no_pcm,
+ int (*init)(struct snd_soc_pcm_runtime *rtd),
const struct snd_soc_ops *ops);
int asoc_sdw_init_simple_dai_link(struct device *dev, struct snd_soc_dai_link *dai_links,
int *be_id, char *name, int playback, int capture,
const char *cpu_dai_name, const char *platform_comp_name,
int num_platforms, const char *codec_name,
- const char *codec_dai_name,
+ const char *codec_dai_name, int no_pcm,
int (*init)(struct snd_soc_pcm_runtime *rtd),
const struct snd_soc_ops *ops);