mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ASoC: Fix data format configuration for S3C64XX IISv2
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> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
d3c9e9a139
commit
0914b93f4f
2 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue