diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-04-01 07:34:09 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:58:14 -0400 |
commit | 716b9bdf68d0a49c1cd75978615fbb8ada98a866 (patch) | |
tree | f65b54951d0b26a68f4aa205bc137367f6f715a5 /sound/soc/fsl | |
parent | 8812fdf2277fc6f964f2d524de1dbe7b4965eca9 (diff) |
ASoC: fsl_sai: Add imx6sx platform support
The next coming i.MX6 Solo X SoC also contains SAI module while we use
imp_pcm_init() for i.MX platform.
So this patch adds one compatible route for imx6sx and updates the DT
doc accordingly.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 30c35252aadb460e009ca8a3fdc8891903bdfc66)
[ Added essential parameters to imx_pcm_init() calling due to build error,
resulted from the define change of the function on the upstream. ]
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 13 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_sai.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index d64c33f32bf9..05776dbaa4d9 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <sound/pcm_params.h> | 22 | #include <sound/pcm_params.h> |
23 | 23 | ||
24 | #include "fsl_sai.h" | 24 | #include "fsl_sai.h" |
25 | #include "imx-pcm.h" | ||
25 | 26 | ||
26 | #define FSL_SAI_FLAGS (FSL_SAI_CSR_SEIE |\ | 27 | #define FSL_SAI_FLAGS (FSL_SAI_CSR_SEIE |\ |
27 | FSL_SAI_CSR_FEIE) | 28 | FSL_SAI_CSR_FEIE) |
@@ -592,6 +593,9 @@ static int fsl_sai_probe(struct platform_device *pdev) | |||
592 | 593 | ||
593 | sai->pdev = pdev; | 594 | sai->pdev = pdev; |
594 | 595 | ||
596 | if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai")) | ||
597 | sai->sai_on_imx = true; | ||
598 | |||
595 | sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs"); | 599 | sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs"); |
596 | if (sai->big_endian_regs) | 600 | if (sai->big_endian_regs) |
597 | fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG; | 601 | fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG; |
@@ -634,12 +638,17 @@ static int fsl_sai_probe(struct platform_device *pdev) | |||
634 | if (ret) | 638 | if (ret) |
635 | return ret; | 639 | return ret; |
636 | 640 | ||
637 | return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, | 641 | if (sai->sai_on_imx) |
638 | SND_DMAENGINE_PCM_FLAG_NO_RESIDUE); | 642 | return imx_pcm_dma_init(pdev, SND_DMAENGINE_PCM_FLAG_NO_RESIDUE, |
643 | IMX_SSI_DMABUF_SIZE); | ||
644 | else | ||
645 | return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, | ||
646 | SND_DMAENGINE_PCM_FLAG_NO_RESIDUE); | ||
639 | } | 647 | } |
640 | 648 | ||
641 | static const struct of_device_id fsl_sai_ids[] = { | 649 | static const struct of_device_id fsl_sai_ids[] = { |
642 | { .compatible = "fsl,vf610-sai", }, | 650 | { .compatible = "fsl,vf610-sai", }, |
651 | { .compatible = "fsl,imx6sx-sai", }, | ||
643 | { /* sentinel */ } | 652 | { /* sentinel */ } |
644 | }; | 653 | }; |
645 | 654 | ||
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index be26d46ee737..677670d62fcd 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h | |||
@@ -130,6 +130,7 @@ struct fsl_sai { | |||
130 | bool big_endian_regs; | 130 | bool big_endian_regs; |
131 | bool big_endian_data; | 131 | bool big_endian_data; |
132 | bool is_dsp_mode; | 132 | bool is_dsp_mode; |
133 | bool sai_on_imx; | ||
133 | 134 | ||
134 | struct snd_dmaengine_dai_dma_data dma_params_rx; | 135 | struct snd_dmaengine_dai_dma_data dma_params_rx; |
135 | struct snd_dmaengine_dai_dma_data dma_params_tx; | 136 | struct snd_dmaengine_dai_dma_data dma_params_tx; |