* [PATCH] ASoC: fsl: Set sdma peripheral type directly
@ 2013-07-25 9:41 ` Nicolin Chen
0 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2013-07-25 9:41 UTC (permalink / raw)
To: shawn.guo, broonie, timur; +Cc: fabio.estevam, alsa-devel, linuxppc-dev
Let CPU DAI drivers set SDMA periperal type directly to support more
dma types(SPDIF, ESAI) other than only two for SSI.
This will easily allow some non-SSI drivers to use the imx-pcm-dma
as well.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
---
@Timur
Compile-passed with mpc85xx_defconfig by using gcc-4.6.3-nolibc_powerpc-linux.
---
sound/soc/fsl/fsl_ssi.c | 4 ++--
sound/soc/fsl/imx-pcm.h | 7 ++-----
sound/soc/fsl/imx-ssi.c | 4 ++--
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 11469fe..4d78df7 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -775,9 +775,9 @@ static int fsl_ssi_probe(struct platform_device *pdev)
"fsl,spba-bus");
imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx,
- dma_events[0], shared);
+ dma_events[0], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx,
- dma_events[1], shared);
+ dma_events[1], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
}
/* Initialize the the device_attribute structure */
diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
index fd56cad..9136625 100644
--- a/sound/soc/fsl/imx-pcm.h
+++ b/sound/soc/fsl/imx-pcm.h
@@ -22,14 +22,11 @@
static inline void
imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
- int dma, bool shared)
+ int dma, enum sdma_peripheral_type peripheral_type)
{
dma_data->dma_request = dma;
dma_data->priority = DMA_PRIO_HIGH;
- if (shared)
- dma_data->peripheral_type = IMX_DMATYPE_SSI_SP;
- else
- dma_data->peripheral_type = IMX_DMATYPE_SSI;
+ dma_data->peripheral_type = peripheral_type;
}
struct imx_pcm_fiq_params {
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index f029e27..f58bcd8 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -571,13 +571,13 @@ static int imx_ssi_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0");
if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_tx, res->start,
- false);
+ IMX_DMATYPE_SSI);
}
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0");
if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_rx, res->start,
- false);
+ IMX_DMATYPE_SSI);
}
platform_set_drvdata(pdev, ssi);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ASoC: fsl: Set sdma peripheral type directly
@ 2013-07-25 9:41 ` Nicolin Chen
0 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2013-07-25 9:41 UTC (permalink / raw)
To: shawn.guo, broonie, timur; +Cc: fabio.estevam, alsa-devel, linuxppc-dev
Let CPU DAI drivers set SDMA periperal type directly to support more
dma types(SPDIF, ESAI) other than only two for SSI.
This will easily allow some non-SSI drivers to use the imx-pcm-dma
as well.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
---
@Timur
Compile-passed with mpc85xx_defconfig by using gcc-4.6.3-nolibc_powerpc-linux.
---
sound/soc/fsl/fsl_ssi.c | 4 ++--
sound/soc/fsl/imx-pcm.h | 7 ++-----
sound/soc/fsl/imx-ssi.c | 4 ++--
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 11469fe..4d78df7 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -775,9 +775,9 @@ static int fsl_ssi_probe(struct platform_device *pdev)
"fsl,spba-bus");
imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx,
- dma_events[0], shared);
+ dma_events[0], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx,
- dma_events[1], shared);
+ dma_events[1], shared ? IMX_DMATYPE_SSI_SP : IMX_DMATYPE_SSI);
}
/* Initialize the the device_attribute structure */
diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
index fd56cad..9136625 100644
--- a/sound/soc/fsl/imx-pcm.h
+++ b/sound/soc/fsl/imx-pcm.h
@@ -22,14 +22,11 @@
static inline void
imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
- int dma, bool shared)
+ int dma, enum sdma_peripheral_type peripheral_type)
{
dma_data->dma_request = dma;
dma_data->priority = DMA_PRIO_HIGH;
- if (shared)
- dma_data->peripheral_type = IMX_DMATYPE_SSI_SP;
- else
- dma_data->peripheral_type = IMX_DMATYPE_SSI;
+ dma_data->peripheral_type = peripheral_type;
}
struct imx_pcm_fiq_params {
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index f029e27..f58bcd8 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -571,13 +571,13 @@ static int imx_ssi_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0");
if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_tx, res->start,
- false);
+ IMX_DMATYPE_SSI);
}
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0");
if (res) {
imx_pcm_dma_params_init_data(&ssi->filter_data_rx, res->start,
- false);
+ IMX_DMATYPE_SSI);
}
platform_set_drvdata(pdev, ssi);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: fsl: Set sdma peripheral type directly
2013-07-25 9:41 ` Nicolin Chen
(?)
@ 2013-07-25 14:01 ` Shawn Guo
-1 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2013-07-25 14:01 UTC (permalink / raw)
To: Nicolin Chen; +Cc: fabio.estevam, alsa-devel, broonie, linuxppc-dev, timur
On Thu, Jul 25, 2013 at 05:41:41PM +0800, Nicolin Chen wrote:
> Let CPU DAI drivers set SDMA periperal type directly to support more
> dma types(SPDIF, ESAI) other than only two for SSI.
> This will easily allow some non-SSI drivers to use the imx-pcm-dma
> as well.
>
> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: fsl: Set sdma peripheral type directly
2013-07-25 9:41 ` Nicolin Chen
@ 2013-07-25 19:11 ` Mark Brown
-1 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-07-25 19:11 UTC (permalink / raw)
To: Nicolin Chen; +Cc: fabio.estevam, alsa-devel, shawn.guo, linuxppc-dev, timur
[-- Attachment #1.1: Type: text/plain, Size: 285 bytes --]
On Thu, Jul 25, 2013 at 05:41:41PM +0800, Nicolin Chen wrote:
> Let CPU DAI drivers set SDMA periperal type directly to support more
> dma types(SPDIF, ESAI) other than only two for SSI.
> This will easily allow some non-SSI drivers to use the imx-pcm-dma
> as well.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: fsl: Set sdma peripheral type directly
@ 2013-07-25 19:11 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-07-25 19:11 UTC (permalink / raw)
To: Nicolin Chen; +Cc: fabio.estevam, alsa-devel, shawn.guo, linuxppc-dev, timur
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
On Thu, Jul 25, 2013 at 05:41:41PM +0800, Nicolin Chen wrote:
> Let CPU DAI drivers set SDMA periperal type directly to support more
> dma types(SPDIF, ESAI) other than only two for SSI.
> This will easily allow some non-SSI drivers to use the imx-pcm-dma
> as well.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-25 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 9:41 [PATCH] ASoC: fsl: Set sdma peripheral type directly Nicolin Chen
2013-07-25 9:41 ` Nicolin Chen
2013-07-25 14:01 ` Shawn Guo
2013-07-25 19:11 ` Mark Brown
2013-07-25 19:11 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.