From 02ef9914c34df710307b8e10098d351876363b65 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 14 Aug 2011 11:31:04 +0800 Subject: [PATCH] --- yaml --- r: 270513 b: refs/heads/master c: a595238bad3d11b26d00bbda4ccbd38fe107cd1e h: refs/heads/master i: 270511: bc7072053d0a85866aebb7423e24fd6603c890bc v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/sta32x.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2b9a8451f5fa..983d1885f03f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f9099b41723c90bd2ff8238482e8598ef21a621 +refs/heads/master: a595238bad3d11b26d00bbda4ccbd38fe107cd1e diff --git a/trunk/sound/soc/codecs/sta32x.c b/trunk/sound/soc/codecs/sta32x.c index fbd7eb9e61ce..3d155f526672 100644 --- a/trunk/sound/soc/codecs/sta32x.c +++ b/trunk/sound/soc/codecs/sta32x.c @@ -524,13 +524,17 @@ static int sta32x_hw_params(struct snd_pcm_substream *substream, rate = params_rate(params); pr_debug("rate: %u\n", rate); for (i = 0; i < ARRAY_SIZE(interpolation_ratios); i++) - if (interpolation_ratios[i].fs == rate) + if (interpolation_ratios[i].fs == rate) { ir = interpolation_ratios[i].ir; + break; + } if (ir < 0) return -EINVAL; for (i = 0; mclk_ratios[ir][i].ratio; i++) - if (mclk_ratios[ir][i].ratio * rate == sta32x->mclk) + if (mclk_ratios[ir][i].ratio * rate == sta32x->mclk) { mcs = mclk_ratios[ir][i].mcs; + break; + } if (mcs < 0) return -EINVAL;