summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-05-10 01:25:18 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-05-10 01:25:18 -0700
commit6e5dae3ae1af25ac48b005ccfb2cf7e033d312ce (patch)
treeae877abfc5e691423dd5dbafab2a2eda81760e58 /sound/soc
parentd7521d9bb9408dd4225b9838e23a80ecc41f80fa (diff)
parent028ce831e8f14cc94f14929f1a91d198ea2d9b93 (diff)
Merge "Merge android-4.4.131 (d5d6526) into msm-4.4"
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/fsl_esai.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 59f234e51971..e8adead8be00 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -143,6 +143,13 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8;
+ /* Do not loop-search if PM (1 ~ 256) alone can serve the ratio */
+ if (ratio <= 256) {
+ pm = ratio;
+ fp = 1;
+ goto out;
+ }
+
/* Set the max fluctuation -- 0.1% of the max devisor */
savesub = (psr ? 1 : 8) * 256 * maxfp / 1000;