Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270513
b: refs/heads/master
c: a595238
h: refs/heads/master
i:
  270511: bc70720
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 15, 2011
1 parent e82be82 commit 02ef991
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f9099b41723c90bd2ff8238482e8598ef21a621
refs/heads/master: a595238bad3d11b26d00bbda4ccbd38fe107cd1e
8 changes: 6 additions & 2 deletions trunk/sound/soc/codecs/sta32x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 02ef991

Please sign in to comment.