From db8d3af33f7f6e1388a65e847f90bbc8d1ba66ce Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 2 Oct 2013 21:15:22 -0700 Subject: ASoC: fsl_ssi: Fix irq_of_parse_and_map() return value check irq_of_parse_and_map() returns 0 on error, not NO_IRQ. Fix the following xtensa:allmodconfig build error. sound/soc/fsl/fsl_ssi.c:705:26: error: 'NO_IRQ' undeclared (first use in this function) make[4]: *** [sound/soc/fsl/fsl_ssi.o] Error 1 Cc: Geert Uytterhoeven Cc: Grant Likely Signed-off-by: Guenter Roeck Signed-off-by: Mark Brown --- sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index c6b743978d5e..6b81d0ce2c44 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys = res.start; ssi_private->irq = irq_of_parse_and_map(np, 0); - if (ssi_private->irq == NO_IRQ) { + if (ssi_private->irq == 0) { dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); return -ENXIO; } -- cgit v1.2.3-55-g7522 From 1d73ad298d1bfeee5d77c19e5cd667c551e30632 Mon Sep 17 00:00:00 2001 From: Philippe Rétornaz Date: Tue, 1 Oct 2013 14:36:11 +0200 Subject: ASoC: fsl: Fix sound on mx31moboard Commit 42810d (ASoC: imx-mc13783: Add audmux settings for mx27pdk) broke the sound on mx31moboard. Restore back the audmux setting on such boards. Signed-off-by: Philippe Rétornaz Signed-off-by: Mark Brown --- sound/soc/fsl/imx-mc13783.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c index a3d60d4bea4c..a2fd7321b5a9 100644 --- a/sound/soc/fsl/imx-mc13783.c +++ b/sound/soc/fsl/imx-mc13783.c @@ -112,7 +112,7 @@ static int imx_mc13783_probe(struct platform_device *pdev) return ret; } - if (machine_is_mx31_3ds()) { + if (machine_is_mx31_3ds() || machine_is_mx31moboard()) { imx_audmux_v2_configure_port(MX31_AUDMUX_PORT4_SSI_PINS_4, IMX_AUDMUX_V2_PTCR_SYN, IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0) | -- cgit v1.2.3-55-g7522 From 5a6e19bedb13522924f5ee72c1f65b0fb5d33bc0 Mon Sep 17 00:00:00 2001 From: Philippe Rétornaz Date: Tue, 1 Oct 2013 14:36:10 +0200 Subject: ASoC: fsl: imx-ssi: fix probe on imx31 On imx31 with mc13783 codec the FIQ is not necessary and not enabled as DMA transfer is available. Change the probe() function to fail only if both FIQ and DMA are not available. Signed-off-by: Philippe Rétornaz Signed-off-by: Mark Brown --- sound/soc/fsl/imx-ssi.c | 23 ++++++++++++----------- sound/soc/fsl/imx-ssi.h | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'sound') diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index f58bcd85c07f..57d6941676ff 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -600,19 +600,17 @@ static int imx_ssi_probe(struct platform_device *pdev) ssi->fiq_params.dma_params_rx = &ssi->dma_params_rx; ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx; - ret = imx_pcm_fiq_init(pdev, &ssi->fiq_params); - if (ret) - goto failed_pcm_fiq; + ssi->fiq_init = imx_pcm_fiq_init(pdev, &ssi->fiq_params); + ssi->dma_init = imx_pcm_dma_init(pdev); - ret = imx_pcm_dma_init(pdev); - if (ret) - goto failed_pcm_dma; + if (ssi->fiq_init && ssi->dma_init) { + ret = ssi->fiq_init; + goto failed_pcm; + } return 0; -failed_pcm_dma: - imx_pcm_fiq_exit(pdev); -failed_pcm_fiq: +failed_pcm: snd_soc_unregister_component(&pdev->dev); failed_register: release_mem_region(res->start, resource_size(res)); @@ -628,8 +626,11 @@ static int imx_ssi_remove(struct platform_device *pdev) struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct imx_ssi *ssi = platform_get_drvdata(pdev); - imx_pcm_dma_exit(pdev); - imx_pcm_fiq_exit(pdev); + if (!ssi->dma_init) + imx_pcm_dma_exit(pdev); + + if (!ssi->fiq_init) + imx_pcm_fiq_exit(pdev); snd_soc_unregister_component(&pdev->dev); diff --git a/sound/soc/fsl/imx-ssi.h b/sound/soc/fsl/imx-ssi.h index fb1616ba8c59..560c40fc9ebb 100644 --- a/sound/soc/fsl/imx-ssi.h +++ b/sound/soc/fsl/imx-ssi.h @@ -211,6 +211,8 @@ struct imx_ssi { struct imx_dma_data filter_data_rx; struct imx_pcm_fiq_params fiq_params; + int fiq_init; + int dma_init; int enabled; }; -- cgit v1.2.3-55-g7522