diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-07 19:11:15 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-08 13:56:26 -0500 |
commit | 4f333b20aef4459a24590fa8545e974f8f137f62 (patch) | |
tree | 1ccb5509f14e239c15fb05c3c2efe8ede5f3eead /sound | |
parent | 63d24b79b66ea5d5b04dadb9e92f31c0141948fb (diff) |
ASoC: Refactor symmetric_rates check to reduce indentation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c2ec6cb05631..65ff61211a85 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -500,20 +500,20 @@ static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream) | |||
500 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 500 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
501 | int ret; | 501 | int ret; |
502 | 502 | ||
503 | if (codec_dai->driver->symmetric_rates || cpu_dai->driver->symmetric_rates || | 503 | if (!codec_dai->driver->symmetric_rates && |
504 | rtd->dai_link->symmetric_rates) { | 504 | !cpu_dai->driver->symmetric_rates && |
505 | dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", | 505 | !rtd->dai_link->symmetric_rates) |
506 | rtd->rate); | 506 | return 0; |
507 | 507 | ||
508 | ret = snd_pcm_hw_constraint_minmax(substream->runtime, | 508 | dev_dbg(&rtd->dev, "Symmetry forces %dHz rate\n", rtd->rate); |
509 | SNDRV_PCM_HW_PARAM_RATE, | 509 | |
510 | rtd->rate, | 510 | ret = snd_pcm_hw_constraint_minmax(substream->runtime, |
511 | rtd->rate); | 511 | SNDRV_PCM_HW_PARAM_RATE, |
512 | if (ret < 0) { | 512 | rtd->rate, rtd->rate); |
513 | dev_err(&rtd->dev, | 513 | if (ret < 0) { |
514 | "Unable to apply rate symmetry constraint: %d\n", ret); | 514 | dev_err(&rtd->dev, |
515 | return ret; | 515 | "Unable to apply rate symmetry constraint: %d\n", ret); |
516 | } | 516 | return ret; |
517 | } | 517 | } |
518 | 518 | ||
519 | return 0; | 519 | return 0; |