Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148236
b: refs/heads/master
c: 553b1dd
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Apr 30, 2009
1 parent f81b492 commit 3fe71de
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51438449e717db54550b4676f38208092eb654da
refs/heads/master: 553b1dd58c5cf1abd6d0965041169400a3cff1ad
22 changes: 21 additions & 1 deletion trunk/sound/soc/s3c24xx/s3c-i2s-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
*/
#define IISMOD_MASTER_MASK (1 << 11)
#define IISMOD_SLAVE (1 << 11)
#define IISMOD_MASTER (0x0)
#define IISMOD_MASTER (0 << 11)
#endif

switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
Expand Down Expand Up @@ -341,6 +341,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
iismod = readl(i2s->regs + S3C2412_IISMOD);
pr_debug("%s: r: IISMOD: %x\n", __func__, iismod);

#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S8:
iismod |= S3C2412_IISMOD_8BIT;
Expand All @@ -349,6 +350,25 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
iismod &= ~S3C2412_IISMOD_8BIT;
break;
}
#endif

#ifdef CONFIG_PLAT_S3C64XX
iismod &= ~0x606;
/* Sample size */
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S8:
/* 8 bit sample, 16fs BCLK */
iismod |= 0x2004;
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;
break;
}
#endif

writel(iismod, i2s->regs + S3C2412_IISMOD);
pr_debug("%s: w: IISMOD: %x\n", __func__, iismod);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/s3c24xx/s3c64xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ static int s3c64xx_i2s_probe(struct platform_device *pdev,
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)

#define S3C64XX_I2S_FMTS \
(SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE)
(SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |\
SNDRV_PCM_FMTBIT_S24_LE)

static struct snd_soc_dai_ops s3c64xx_i2s_dai_ops = {
.set_sysclk = s3c64xx_i2s_set_sysclk,
Expand Down

0 comments on commit 3fe71de

Please sign in to comment.