aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-11-08 02:38:18 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:47:10 -0400
commit08d503704239dccf4d8a3a36c2335401d462f585 (patch)
tree9dbca9a47a8e551f0108307c385381b2d0310af5
parent210290dc5c671e6ffdf661be583894a5bfcd8c10 (diff)
ENGR00286961-1 ASoC: fsl_ssi: add period size constraint for dual fifo mode
When using dual fifo mode, we need to keep period size as an even number due to behavior of SDMA script. Otherwise, it might neglect the 2nd fifo at each period when its size appears to be an odd number. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
-rw-r--r--sound/soc/fsl/fsl_ssi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 928bbcbe598f..a75043d4cc61 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -339,6 +339,15 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
339 339
340 clk_prepare_enable(ssi_private->coreclk); 340 clk_prepare_enable(ssi_private->coreclk);
341 clk_prepare_enable(ssi_private->clk); 341 clk_prepare_enable(ssi_private->clk);
342
343 /* When using dual fifo mode, it would be safer if we ensure
344 * its period size to be an even number. If appearing to an
345 * odd number, the 2nd fifo might be neglected by SDMA sciprt
346 * at the end of each period.
347 */
348 if (ssi_private->use_dual_fifo)
349 snd_pcm_hw_constraint_step(substream->runtime, 0,
350 SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2);
342 } 351 }
343 352
344 /* 353 /*