summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-compress.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-04-24 08:15:36 +0900
committerMark Brown <broonie@kernel.org>2020-04-29 13:27:45 +0100
commit8dfedafb5c711b5a13c938e06e8143540f773ecf (patch)
tree7ffcc8358a7f8381253bffdc95eaa7e6e376092d /sound/soc/soc-compress.c
parenteb08411bdf48cff69f7226c86a97fba1ef5045e6 (diff)
downloadlinux-8dfedafb5c711b5a13c938e06e8143540f773ecf.tar.gz
linux-8dfedafb5c711b5a13c938e06e8143540f773ecf.tar.bz2
linux-8dfedafb5c711b5a13c938e06e8143540f773ecf.zip
ASoC: soc-dai: add snd_soc_dai_compr_set_params()
dai related function should be implemented at soc-dai.c. This patch adds snd_soc_dai_compr_set_params(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87lfmlssiv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r--sound/soc/soc-compress.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index b05305a4d86c..13b5c7ad82c0 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -443,11 +443,9 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
* that these callbacks will configure everything for this compress
* path, like configuring a PCM port for a CODEC.
*/
- if (cpu_dai->driver->cops && cpu_dai->driver->cops->set_params) {
- ret = cpu_dai->driver->cops->set_params(cstream, params, cpu_dai);
- if (ret < 0)
- goto err;
- }
+ ret = snd_soc_dai_compr_set_params(cpu_dai, cstream, params);
+ if (ret < 0)
+ goto err;
ret = soc_compr_components_set_params(cstream, params);
if (ret < 0)
@@ -513,11 +511,9 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
if (ret < 0)
goto out;
- if (cpu_dai->driver->cops && cpu_dai->driver->cops->set_params) {
- ret = cpu_dai->driver->cops->set_params(cstream, params, cpu_dai);
- if (ret < 0)
- goto out;
- }
+ ret = snd_soc_dai_compr_set_params(cpu_dai, cstream, params);
+ if (ret < 0)
+ goto out;
ret = soc_compr_components_set_params(cstream, params);
if (ret < 0)