Commit 4f333b20 authored by Mark Brown's avatar Mark Brown

ASoC: Refactor symmetric_rates check to reduce indentation

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 63d24b79
...@@ -500,21 +500,21 @@ static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream) ...@@ -500,21 +500,21 @@ static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream)
struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *codec_dai = rtd->codec_dai;
int ret; int ret;
if (codec_dai->driver->symmetric_rates || cpu_dai->driver->symmetric_rates || if (!codec_dai->driver->symmetric_rates &&
rtd->dai_link->symmetric_rates) { !cpu_dai->driver->symmetric_rates &&
dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", !rtd->dai_link->symmetric_rates)
rtd->rate); return 0;
dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", rtd->rate);
ret = snd_pcm_hw_constraint_minmax(substream->runtime, ret = snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_RATE, SNDRV_PCM_HW_PARAM_RATE,
rtd->rate, rtd->rate, rtd->rate);
rtd->rate);
if (ret < 0) { if (ret < 0) {
dev_err(&rtd->dev, dev_err(&rtd->dev,
"Unable to apply rate symmetry constraint: %d\n", ret); "Unable to apply rate symmetry constraint: %d\n", ret);
return ret; return ret;
} }
}
return 0; return 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