aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/arizona.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 1f106abf1bb0..219d1d54f536 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1455,18 +1455,6 @@ static int arizona_calc_fll(struct arizona_fll *fll,
1455 return -EINVAL; 1455 return -EINVAL;
1456 } 1456 }
1457 1457
1458 for (i = 0; i < ARRAY_SIZE(fll_gains); i++) {
1459 if (fll_gains[i].min <= Fref && Fref <= fll_gains[i].max) {
1460 cfg->gain = fll_gains[i].gain;
1461 break;
1462 }
1463 }
1464 if (i == ARRAY_SIZE(fll_gains)) {
1465 arizona_fll_err(fll, "Unable to find gain for Fref=%uHz\n",
1466 Fref);
1467 return -EINVAL;
1468 }
1469
1470 cfg->n = target / (ratio * Fref); 1458 cfg->n = target / (ratio * Fref);
1471 1459
1472 if (target % (ratio * Fref)) { 1460 if (target % (ratio * Fref)) {
@@ -1490,6 +1478,18 @@ static int arizona_calc_fll(struct arizona_fll *fll,
1490 cfg->lambda >>= 1; 1478 cfg->lambda >>= 1;
1491 } 1479 }
1492 1480
1481 for (i = 0; i < ARRAY_SIZE(fll_gains); i++) {
1482 if (fll_gains[i].min <= Fref && Fref <= fll_gains[i].max) {
1483 cfg->gain = fll_gains[i].gain;
1484 break;
1485 }
1486 }
1487 if (i == ARRAY_SIZE(fll_gains)) {
1488 arizona_fll_err(fll, "Unable to find gain for Fref=%uHz\n",
1489 Fref);
1490 return -EINVAL;
1491 }
1492
1493 arizona_fll_dbg(fll, "N=%x THETA=%x LAMBDA=%x\n", 1493 arizona_fll_dbg(fll, "N=%x THETA=%x LAMBDA=%x\n",
1494 cfg->n, cfg->theta, cfg->lambda); 1494 cfg->n, cfg->theta, cfg->lambda);
1495 arizona_fll_dbg(fll, "FRATIO=%x(%d) OUTDIV=%x REFCLK_DIV=%x\n", 1495 arizona_fll_dbg(fll, "FRATIO=%x(%d) OUTDIV=%x REFCLK_DIV=%x\n",