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>
This commit is contained in:
Родитель
8abba5d648
Коммит
c754064453
|
@ -7,7 +7,7 @@ codec/DSP interfaces.
|
||||||
|
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: Compatible list, contains "fsl,vf610-sai".
|
- compatible: Compatible list, contains "fsl,vf610-sai" or "fsl,imx6sx-sai".
|
||||||
- reg: Offset and length of the register set for the device.
|
- reg: Offset and length of the register set for the device.
|
||||||
- clocks: Must contain an entry for each entry in clock-names.
|
- clocks: Must contain an entry for each entry in clock-names.
|
||||||
- clock-names : Must include the "sai" entry.
|
- clock-names : Must include the "sai" entry.
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <sound/pcm_params.h>
|
#include <sound/pcm_params.h>
|
||||||
|
|
||||||
#include "fsl_sai.h"
|
#include "fsl_sai.h"
|
||||||
|
#include "imx-pcm.h"
|
||||||
|
|
||||||
#define FSL_SAI_FLAGS (FSL_SAI_CSR_SEIE |\
|
#define FSL_SAI_FLAGS (FSL_SAI_CSR_SEIE |\
|
||||||
FSL_SAI_CSR_FEIE)
|
FSL_SAI_CSR_FEIE)
|
||||||
|
@ -592,6 +593,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
sai->pdev = pdev;
|
sai->pdev = pdev;
|
||||||
|
|
||||||
|
if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
|
||||||
|
sai->sai_on_imx = true;
|
||||||
|
|
||||||
sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs");
|
sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs");
|
||||||
if (sai->big_endian_regs)
|
if (sai->big_endian_regs)
|
||||||
fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
|
fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
|
||||||
|
@ -634,12 +638,16 @@ static int fsl_sai_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL,
|
if (sai->sai_on_imx)
|
||||||
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
|
return imx_pcm_dma_init(pdev);
|
||||||
|
else
|
||||||
|
return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL,
|
||||||
|
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id fsl_sai_ids[] = {
|
static const struct of_device_id fsl_sai_ids[] = {
|
||||||
{ .compatible = "fsl,vf610-sai", },
|
{ .compatible = "fsl,vf610-sai", },
|
||||||
|
{ .compatible = "fsl,imx6sx-sai", },
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,7 @@ struct fsl_sai {
|
||||||
bool big_endian_regs;
|
bool big_endian_regs;
|
||||||
bool big_endian_data;
|
bool big_endian_data;
|
||||||
bool is_dsp_mode;
|
bool is_dsp_mode;
|
||||||
|
bool sai_on_imx;
|
||||||
|
|
||||||
struct snd_dmaengine_dai_dma_data dma_params_rx;
|
struct snd_dmaengine_dai_dma_data dma_params_rx;
|
||||||
struct snd_dmaengine_dai_dma_data dma_params_tx;
|
struct snd_dmaengine_dai_dma_data dma_params_tx;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче