Re: [RFC PATCH 5/5] ASoC: simplify the SSP DMA parameters settings by run-time generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2009 at 5:44 PM, Mark Brown <broonie@xxxxxxxxxxxxx> wrote:
> On Thu, Apr 23, 2009 at 05:41:55PM +0800, Eric Miao wrote:
>
>> I'd prefer this being added to the original one, provided that you haven't
>> merged and pushed to public. Patch below:
>
> This is word wrapped again and I've already published the changes
> (though only minutes ago so...).
>

Gmail web interface, sorry. That's why I attached the original file.
Now the incremental patch as attached.

-- 
Cheers
- eric
From e2037334d77e4826aaebf5800eee46f409b0a698 Mon Sep 17 00:00:00 2001
From: Eric Miao <eric.miao@xxxxxxxxxxx>
Date: Thu, 23 Apr 2009 17:48:56 +0800
Subject: [PATCH] ASoC: change stereo/mono to 32-bit/16-bit for pxa-ssp

The original idea came from pHilipp, and this makes the code looks
more consistent.

Signed-off-by: pHilipp Zabel <philipp.zabel@xxxxxxxxx>
Signed-off-by: Eric Miao <eric.miao@xxxxxxxxxxx>
---
 sound/soc/pxa/pxa-ssp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index fb8cacc..6fc7876 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -67,7 +67,7 @@ struct pxa2xx_pcm_dma_data {
 };
 
 static struct pxa2xx_pcm_dma_params *
-ssp_get_dma_params(struct ssp_device *ssp, int stereo, int out)
+ssp_get_dma_params(struct ssp_device *ssp, int width4, int out)
 {
 	struct pxa2xx_pcm_dma_data *dma;
 
@@ -76,13 +76,13 @@ ssp_get_dma_params(struct ssp_device *ssp, int stereo, int out)
 		return NULL;
 
 	snprintf(dma->name, 20, "SSP%d PCM %s %s", ssp->port_id,
-			stereo ? "Stereo" : "Mono", out ? "out" : "in");
+			width4 ? "32-bit" : "16-bit", out ? "out" : "in");
 
 	dma->params.name = dma->name;
 	dma->params.drcmr = &DRCMR(out ? ssp->drcmr_tx : ssp->drcmr_rx);
 	dma->params.dcmd = (out ? (DCMD_INCSRCADDR | DCMD_FLOWTRG) :
 				  (DCMD_INCTRGADDR | DCMD_FLOWSRC)) |
-			(stereo ? DCMD_WIDTH4 : DCMD_WIDTH2) | DCMD_BURST16;
+			(width4 ? DCMD_WIDTH4 : DCMD_WIDTH2) | DCMD_BURST16;
 	dma->params.dev_addr = ssp->phys_base + SSDR;
 
 	return &dma->params;
-- 
1.6.0.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux