summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-03-04 20:42:38 +0000
committerMark Brown <broonie@kernel.org>2015-03-04 20:42:38 +0000
commit9d22fd3ca7dba0027a3f121d0ba525f65f8b13fb (patch)
tree9dcd15024165d6aeeb39b8a3747a4fd6d85e5839 /sound
parented87e2974e3659139d8d27ea13b730288e6702c3 (diff)
parent541b03ad6cfe0e415273f096fd8c47d2879c6c15 (diff)
downloadop-kernel-dev-9d22fd3ca7dba0027a3f121d0ba525f65f8b13fb.zip
op-kernel-dev-9d22fd3ca7dba0027a3f121d0ba525f65f8b13fb.tar.gz
Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_ssi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 2595611..b9fabbf 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -603,10 +603,6 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
factor = (div2 + 1) * (7 * psr + 1) * 2;
for (i = 0; i < 255; i++) {
- /* The bclk rate must be smaller than 1/5 sysclk rate */
- if (factor * (i + 1) < 5)
- continue;
-
tmprate = freq * factor * (i + 2);
if (baudclk_is_used)
@@ -614,6 +610,13 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
else
clkrate = clk_round_rate(ssi_private->baudclk, tmprate);
+ /*
+ * Hardware limitation: The bclk rate must be
+ * never greater than 1/5 IPG clock rate
+ */
+ if (clkrate * 5 > clk_get_rate(ssi_private->clk))
+ continue;
+
clkrate /= factor;
afreq = clkrate / (i + 1);
OpenPOWER on IntegriCloud