diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-08-05 02:47:59 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:01:00 -0400 |
commit | 4f900cb1310ecb5647118cbf939d228bad2a6386 (patch) | |
tree | a380cdb8b949444865faab8d5277f08fc1f0c0d7 /sound/soc/fsl/fsl_ssi.c | |
parent | fd3f49d1fc4a3546ac58aba124c04f22e9f7accd (diff) |
ENGR00273838-4 ASoC: fsl: Enable dual-fifo mode as default
Enable dual-fifo to reduce underrun and channel-swap issue.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index c4452a3c9ced..7cef35d9af60 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -138,6 +138,7 @@ struct fsl_ssi_private { | |||
138 | 138 | ||
139 | bool new_binding; | 139 | bool new_binding; |
140 | bool ssi_on_imx; | 140 | bool ssi_on_imx; |
141 | bool use_dual_fifo; | ||
141 | struct clk *clk; | 142 | struct clk *clk; |
142 | struct snd_dmaengine_dai_dma_data dma_params_tx; | 143 | struct snd_dmaengine_dai_dma_data dma_params_tx; |
143 | struct snd_dmaengine_dai_dma_data dma_params_rx; | 144 | struct snd_dmaengine_dai_dma_data dma_params_rx; |
@@ -386,9 +387,22 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream, | |||
386 | * data will be written to memory as soon as it's available. | 387 | * data will be written to memory as soon as it's available. |
387 | */ | 388 | */ |
388 | write_ssi(CCSR_SSI_SFCSR_TFWM0(ssi_private->fifo_depth - 2) | | 389 | write_ssi(CCSR_SSI_SFCSR_TFWM0(ssi_private->fifo_depth - 2) | |
389 | CCSR_SSI_SFCSR_RFWM0(ssi_private->fifo_depth - 2), | 390 | CCSR_SSI_SFCSR_RFWM0(ssi_private->fifo_depth - 2) | |
391 | CCSR_SSI_SFCSR_TFWM1(ssi_private->fifo_depth - 2) | | ||
392 | CCSR_SSI_SFCSR_RFWM1(ssi_private->fifo_depth - 2), | ||
390 | &ssi->sfcsr); | 393 | &ssi->sfcsr); |
391 | 394 | ||
395 | /* Select Single/Dual fifo mode */ | ||
396 | if (ssi_private->use_dual_fifo) { | ||
397 | write_ssi_mask(&ssi->srcr, 0, CCSR_SSI_SRCR_RFEN1); | ||
398 | write_ssi_mask(&ssi->stcr, 0, CCSR_SSI_STCR_TFEN1); | ||
399 | write_ssi_mask(&ssi->scr, 0, CCSR_SSI_SCR_TCH_EN); | ||
400 | } else { | ||
401 | write_ssi_mask(&ssi->srcr, CCSR_SSI_SRCR_RFEN1, 0); | ||
402 | write_ssi_mask(&ssi->stcr, CCSR_SSI_STCR_TFEN1, 0); | ||
403 | write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_TCH_EN, 0); | ||
404 | } | ||
405 | |||
392 | /* | 406 | /* |
393 | * We keep the SSI disabled because if we enable it, then the | 407 | * We keep the SSI disabled because if we enable it, then the |
394 | * DMA controller will start. It's not supposed to start until | 408 | * DMA controller will start. It's not supposed to start until |
@@ -811,6 +825,9 @@ static int fsl_ssi_probe(struct platform_device *pdev) | |||
811 | goto error_dev; | 825 | goto error_dev; |
812 | } | 826 | } |
813 | 827 | ||
828 | /* Enable dual fifo feature as default */ | ||
829 | ssi_private->use_dual_fifo = true; | ||
830 | |||
814 | /* | 831 | /* |
815 | * If codec-handle property is missing from SSI node, we assume | 832 | * If codec-handle property is missing from SSI node, we assume |
816 | * that the machine driver uses new binding which does not require | 833 | * that the machine driver uses new binding which does not require |