summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-link.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-05-25 09:57:50 +0900
committerMark Brown <broonie@kernel.org>2020-05-25 14:22:14 +0100
commiteab810f37ff5fd76172ac903e5e732d6b72fc834 (patch)
treeb72465e236c7aea7200b7c775447a92289eb3d73 /sound/soc/soc-link.c
parent0e532c99b468d6e4fc4e1d29b45ffe2749db6d07 (diff)
downloadlinux-eab810f37ff5fd76172ac903e5e732d6b72fc834.tar.gz
linux-eab810f37ff5fd76172ac903e5e732d6b72fc834.tar.bz2
linux-eab810f37ff5fd76172ac903e5e732d6b72fc834.zip
ASoC: soc-link: add snd_soc_link_compr_set_params()
dai_link related function should be implemented at soc-link.c. This patch adds snd_soc_link_compr_set_params(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87sgfo3k6q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-link.c')
-rw-r--r--sound/soc/soc-link.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index 2cfe7f88b809..248e1be4e1eb 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -136,3 +136,16 @@ void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream)
rtd->dai_link->compr_ops->shutdown(cstream);
}
EXPORT_SYMBOL_GPL(snd_soc_link_compr_shutdown);
+
+int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream)
+{
+ struct snd_soc_pcm_runtime *rtd = cstream->private_data;
+ int ret = 0;
+
+ if (rtd->dai_link->compr_ops &&
+ rtd->dai_link->compr_ops->set_params)
+ ret = rtd->dai_link->compr_ops->set_params(cstream);
+
+ return soc_link_ret(rtd, ret);
+}
+EXPORT_SYMBOL_GPL(snd_soc_link_compr_set_params);