diff options
author | Vijendar Mukunda <Vijendar.Mukunda@amd.com> | 2024-11-01 07:38:01 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-11-01 13:22:47 +0000 |
commit | 485df22866559e2f821a9754d51a9755ce56e7aa (patch) | |
tree | beaf74446a51c68b0a1c2bb2c12b2ad420303804 /sound/soc/amd/acp/acp-sdw-sof-mach.c | |
parent | 019610566757a749dde7e0c92777d2c1613afef8 (diff) |
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 'sound/soc/amd/acp/acp-sdw-sof-mach.c')
-rw-r--r-- | sound/soc/amd/acp/acp-sdw-sof-mach.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c index 36e6d6db90c1..8fce8cb957c9 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -236,7 +236,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, asoc_sdw_init_dai_link(dev, *dai_links, be_id, name, playback, capture, cpus, num_cpus, platform_component, ARRAY_SIZE(platform_component), codecs, num_codecs, - asoc_sdw_rtd_init, &sdw_ops); + 1, asoc_sdw_rtd_init, &sdw_ops); /* * SoundWire DAILINKs use 'stream' functions and Bank Switch operations @@ -285,7 +285,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card, } static int create_dmic_dailinks(struct snd_soc_card *card, - struct snd_soc_dai_link **dai_links, int *be_id) + struct snd_soc_dai_link **dai_links, int *be_id, int no_pcm) { struct device *dev = card->dev; int ret; @@ -294,7 +294,7 @@ static int create_dmic_dailinks(struct snd_soc_card *card, 0, 1, // DMIC only supports capture "acp-sof-dmic", platform_component->name, ARRAY_SIZE(platform_component), - "dmic-codec", "dmic-hifi", + "dmic-codec", "dmic-hifi", no_pcm, asoc_sdw_dmic_init, NULL); if (ret) return ret; @@ -377,7 +377,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) if (ctx->ignore_internal_dmic) { dev_warn(dev, "Ignoring ACP DMIC\n"); } else { - ret = create_dmic_dailinks(card, &dai_links, &be_id); + ret = create_dmic_dailinks(card, &dai_links, &be_id, 1); if (ret) return ret; } |