public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2
@ 2009-08-18 12:56 Joonyoung Shim
  2009-08-18 13:05 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Joonyoung Shim @ 2009-08-18 12:56 UTC (permalink / raw)
  To: broonie; +Cc: ben, alsa-devel, kyungmin.park

The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD
register. This patch changes to the defined values it.

And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h |    5 +++++
 sound/soc/s3c24xx/s3c-i2s-v2.c                    |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
index 0fad757..07659da 100644
--- a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
+++ b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
@@ -33,6 +33,11 @@
 #define S3C2412_IISCON_RXDMA_ACTIVE	(1 << 1)
 #define S3C2412_IISCON_IIS_ACTIVE	(1 << 0)
 
+#define S3C64XX_IISMOD_BLC_16BIT	(0 << 13)
+#define S3C64XX_IISMOD_BLC_8BIT		(1 << 13)
+#define S3C64XX_IISMOD_BLC_24BIT	(2 << 13)
+#define S3C64XX_IISMOD_BLC_MASK		(3 << 13)
+
 #define S3C64XX_IISMOD_IMS_PCLK		(0 << 10)
 #define S3C64XX_IISMOD_IMS_SYSMUX	(1 << 10)
 
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c
index 1a28317..ebfb2f6 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.c
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.c
@@ -357,19 +357,19 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
 #endif
 
 #ifdef CONFIG_PLAT_S3C64XX
-	iismod &= ~0x606;
+	iismod &= ~(S3C64XX_IISMOD_BLC_MASK | S3C2412_IISMOD_BCLK_MASK);
 	/* Sample size */
 	switch (params_format(params)) {
 	case SNDRV_PCM_FORMAT_S8:
 		/* 8 bit sample, 16fs BCLK */
-		iismod |= 0x2004;
+		iismod |= (S3C64XX_IISMOD_BLC_8BIT | S3C2412_IISMOD_BCLK_16FS);
 		break;
 	case SNDRV_PCM_FORMAT_S16_LE:
 		/* 16 bit sample, 32fs BCLK */
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
 		/* 24 bit sample, 48fs BCLK */
-		iismod |= 0x4002;
+		iismod |= (S3C64XX_IISMOD_BLC_24BIT | S3C2412_IISMOD_BCLK_48FS);
 		break;
 	}
 #endif
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2
  2009-08-18 12:56 [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2 Joonyoung Shim
@ 2009-08-18 13:05 ` Mark Brown
  2009-08-18 14:17   ` Joonyoung Shim
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2009-08-18 13:05 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: ben, alsa-devel, kyungmin.park

On Tue, Aug 18, 2009 at 09:56:19PM +0900, Joonyoung Shim wrote:
> The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD
> register. This patch changes to the defined values it.

> And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14.

Thanks - there's quite a few problems with this area.

Can you confirm if you've got the device DMAing usable audio (and if so
in what configuration)?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2
  2009-08-18 13:05 ` Mark Brown
@ 2009-08-18 14:17   ` Joonyoung Shim
  2009-08-18 14:23     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Joonyoung Shim @ 2009-08-18 14:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: ben, alsa-devel, kyungmin.park

On 8/18/2009 10:05 PM, Mark Brown wrote:
> On Tue, Aug 18, 2009 at 09:56:19PM +0900, Joonyoung Shim wrote:
>> The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD
>> register. This patch changes to the defined values it.
> 
>> And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14.
> 
> Thanks - there's quite a few problems with this area.
> 
> Can you confirm if you've got the device DMAing usable audio (and if so
> in what configuration)?
> 

Do you mean which target board i use?

I have the NCP target board using S3C6410 arm cpu. The NCP board has the
LM49350 audio codec chip, but this codec driver doesn't make ready to
post yet. The codec chip of the NCP is connected to the I2S0 of platform
for playback and capture.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2
  2009-08-18 14:17   ` Joonyoung Shim
@ 2009-08-18 14:23     ` Mark Brown
  2009-08-18 14:54       ` Joonyoung Shim
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2009-08-18 14:23 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: ben, alsa-devel, kyungmin.park

On Tue, Aug 18, 2009 at 11:17:09PM +0900, Joonyoung Shim wrote:
> On 8/18/2009 10:05 PM, Mark Brown wrote:

> > Can you confirm if you've got the device DMAing usable audio (and if so
> > in what configuration)?

> Do you mean which target board i use?

That's useful, yes, but I was more wondering about the configuration of
the DAI - mostly what's master.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2
  2009-08-18 14:23     ` Mark Brown
@ 2009-08-18 14:54       ` Joonyoung Shim
  0 siblings, 0 replies; 5+ messages in thread
From: Joonyoung Shim @ 2009-08-18 14:54 UTC (permalink / raw)
  To: Mark Brown; +Cc: ben, alsa-devel, kyungmin.park

On 8/18/2009 11:23 PM, Mark Brown wrote:
> On Tue, Aug 18, 2009 at 11:17:09PM +0900, Joonyoung Shim wrote:
>> On 8/18/2009 10:05 PM, Mark Brown wrote:
> 
>>> Can you confirm if you've got the device DMAing usable audio (and if so
>>> in what configuration)?
> 
>> Do you mean which target board i use?
> 
> That's useful, yes, but I was more wondering about the configuration of
> the DAI - mostly what's master.
> 

I use the configuration that the DAI of codec is master and the DAI of
cpu is slave.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-18 14:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-18 12:56 [PATCH] ASoC: Fix data format configuration for S3C64XX IISv2 Joonyoung Shim
2009-08-18 13:05 ` Mark Brown
2009-08-18 14:17   ` Joonyoung Shim
2009-08-18 14:23     ` Mark Brown
2009-08-18 14:54       ` Joonyoung Shim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox