[alsa-devel] [PATCH 0/3] Fix breakages due to recent updates
I wanted to get sound out of my mx27-based PCM038 and it failed. I found two flaws which were introduced by recent update-works. While being here, I found some redundant code.
Wolfram Sang (3): ASoC: imx: set watermarks for mx2-dma ASoC: imx: fix burstsize for DMA ASoC: imx: remove superfluous code in imx-ssi.c
sound/soc/imx/imx-pcm-dma-mx2.c | 9 +++++++-- sound/soc/imx/imx-ssi.c | 6 ------ sound/soc/imx/imx-ssi.h | 3 --- 3 files changed, 7 insertions(+), 11 deletions(-)
They got accidently removed by f0fba2a (ASoC: multi-component - ASoC Multi-Component Support). Reintroduce them and get rid of the superfluous defines because the fiq-driver has its own hardcoded values.
Signed-off-by: Wolfram Sang w.sang@pengutronix.de --- sound/soc/imx/imx-pcm-dma-mx2.c | 5 +++++ sound/soc/imx/imx-ssi.h | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 671ef8d..b2ed764 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c @@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = {
static int __devinit imx_soc_platform_probe(struct platform_device *pdev) { + struct imx_ssi *ssi = platform_get_drvdata(pdev); + + ssi->dma_params_tx.burstsize = 6; + ssi->dma_params_rx.burstsize = 4; + return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); }
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h index a4406a1..dc8a875 100644 --- a/sound/soc/imx/imx-ssi.h +++ b/sound/soc/imx/imx-ssi.h @@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm); */ #define IMX_SSI_DMABUF_SIZE (64 * 1024)
-#define DMA_RXFIFO_BURST 0x4 -#define DMA_TXFIFO_BURST 0x6 - #endif /* _IMX_SSI_H */
On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
They got accidently removed by f0fba2a (ASoC: multi-component - ASoC Multi-Component Support). Reintroduce them and get rid of the superfluous defines because the fiq-driver has its own hardcoded values.
Signed-off-by: Wolfram Sang w.sang@pengutronix.de
Acked-by: Liam Girdwood lrg@ti.com
SSI counts in words, the DMA engine in bytes. (Wrong) factor got removed in bf974a0 (ASoC i.MX: switch to new DMA api).
Signed-off-by: Wolfram Sang w.sang@pengutronix.de --- sound/soc/imx/imx-pcm-dma-mx2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index b2ed764..aab7765 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c @@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream, slave_config.direction = DMA_TO_DEVICE; slave_config.dst_addr = dma_params->dma_addr; slave_config.dst_addr_width = buswidth; - slave_config.dst_maxburst = dma_params->burstsize; + slave_config.dst_maxburst = dma_params->burstsize * buswidth; } else { slave_config.direction = DMA_FROM_DEVICE; slave_config.src_addr = dma_params->dma_addr; slave_config.src_addr_width = buswidth; - slave_config.src_maxburst = dma_params->burstsize; + slave_config.src_maxburst = dma_params->burstsize * buswidth; }
ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config);
On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
SSI counts in words, the DMA engine in bytes. (Wrong) factor got removed in bf974a0 (ASoC i.MX: switch to new DMA api).
Signed-off-by: Wolfram Sang w.sang@pengutronix.de
Acked-by: Liam Girdwood lrg@ti.com
Checking if IMX_SSI_DMA is set and then set it again is useless.
Signed-off-by: Wolfram Sang w.sang@pengutronix.de --- sound/soc/imx/imx-ssi.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index bc92ec6..c331d65 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c @@ -667,12 +667,6 @@ static int imx_ssi_probe(struct platform_device *pdev) if (res) ssi->dma_params_rx.dma = res->start;
- if ((cpu_is_mx27() || cpu_is_mx21()) && - !(ssi->flags & IMX_SSI_USE_AC97) && - (ssi->flags & IMX_SSI_DMA)) { - ssi->flags |= IMX_SSI_DMA; - } - platform_set_drvdata(pdev, ssi);
ret = snd_soc_register_dai(&pdev->dev, dai);
On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
Checking if IMX_SSI_DMA is set and then set it again is useless.
Signed-off-by: Wolfram Sang w.sang@pengutronix.de
Acked-by: Liam Girdwood lrg@ti.com
On Fri, Mar 25, 2011 at 04:51:43PM +0100, Wolfram Sang wrote:
I wanted to get sound out of my mx27-based PCM038 and it failed. I found two flaws which were introduced by recent update-works. While being here, I found some redundant code.
If your cover letter is worth writing it's probably worth CCing to the people you're sending the patch series to :)
Applied all three.
On Sat, Mar 26, 2011 at 05:35:46PM +0000, Mark Brown wrote:
On Fri, Mar 25, 2011 at 04:51:43PM +0100, Wolfram Sang wrote:
I wanted to get sound out of my mx27-based PCM038 and it failed. I found two flaws which were introduced by recent update-works. While being here, I found some redundant code.
If your cover letter is worth writing it's probably worth CCing to the people you're sending the patch series to :)
Yes. Do you (or someone) happen to have a script ready which sends the cover-letter to the same people which get later added to the patches with --cc-cmd='script/maintainers.pl'?
Thanks for applying,
Wolfram
On Sat, Mar 26, 2011 at 06:40:40PM +0100, Wolfram Sang wrote:
Yes. Do you (or someone) happen to have a script ready which sends the cover-letter to the same people which get later added to the patches with --cc-cmd='script/maintainers.pl'?
My strong recommendation would be to never blindly use the output of check_maintainers.pl directly in the first place but I'd exepect that using the cover letter feature of git send-mail might do the trick.
participants (3)
-
Liam Girdwood
-
Mark Brown
-
Wolfram Sang