Skip to content

Commit

Permalink
ASoC: sta32x: Optimize the array work to find rate_min and rate_max
Browse files Browse the repository at this point in the history
For a given ir and fs, there is at most one possible match for the case
mclk_ratios[ir][j].ratio * fs == freq.
Thus we can break from the inner loop once a match is found.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 3, 2012
1 parent a500231 commit 7a748e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/sta32x.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ static int sta32x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
rate_min = fs;
if (fs > rate_max)
rate_max = fs;
break;
}
}
}
Expand Down

0 comments on commit 7a748e4

Please sign in to comment.