ASoC: Refactor symmetric_rates check to reduce indentation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
parent
63d24b79b6
commit
4f333b20ae
@ -500,20 +500,20 @@ 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;
|
||||||
|
|
||||||
ret = snd_pcm_hw_constraint_minmax(substream->runtime,
|
dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", rtd->rate);
|
||||||
SNDRV_PCM_HW_PARAM_RATE,
|
|
||||||
rtd->rate,
|
ret = snd_pcm_hw_constraint_minmax(substream->runtime,
|
||||||
rtd->rate);
|
SNDRV_PCM_HW_PARAM_RATE,
|
||||||
if (ret < 0) {
|
rtd->rate, rtd->rate);
|
||||||
dev_err(&rtd->dev,
|
if (ret < 0) {
|
||||||
"Unable to apply rate symmetry constraint: %d\n", ret);
|
dev_err(&rtd->dev,
|
||||||
return ret;
|
"Unable to apply rate symmetry constraint: %d\n", ret);
|
||||||
}
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user