Commit 8b4ba1d3 authored by Gyeongtaek Lee's avatar Gyeongtaek Lee Committed by Mark Brown

ASoC: soc-dai: fix up hw params only if it is needed

If fixed hw params won't be used, fixing up isn't needed also.
Signed-off-by: default avatarGyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/000401d748bc$fa466d50$eed347f0$@samsung.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 11480dbf
...@@ -327,14 +327,15 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai, ...@@ -327,14 +327,15 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
int ret = 0; int ret = 0;
/* perform any topology hw_params fixups before DAI */
ret = snd_soc_link_be_hw_params_fixup(rtd, params);
if (ret < 0)
goto end;
if (dai->driver->ops && if (dai->driver->ops &&
dai->driver->ops->hw_params) dai->driver->ops->hw_params) {
/* perform any topology hw_params fixups before DAI */
ret = snd_soc_link_be_hw_params_fixup(rtd, params);
if (ret < 0)
goto end;
ret = dai->driver->ops->hw_params(substream, params, dai); ret = dai->driver->ops->hw_params(substream, params, dai);
}
/* mark substream if succeeded */ /* mark substream if succeeded */
if (ret == 0) if (ret == 0)
......
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