Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170131
b: refs/heads/master
c: fd5ad65
h: refs/heads/master
i:
  170129: 9f31cad
  170127: 566db03
v: v3
  • Loading branch information
Jassi authored and Mark Brown committed Sep 15, 2009
1 parent 2297593 commit 0f62827
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 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: 472df3cbae8da6a949f1392a11958b8d21383735
refs/heads/master: fd5ad654e665b5c30c8d755a106309c8ea9f3e7b
30 changes: 29 additions & 1 deletion trunk/sound/soc/s3c24xx/s3c-i2s-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,15 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,

switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_RIGHT_J:
iismod |= S3C2412_IISMOD_LR_RLOW;
iismod |= S3C2412_IISMOD_SDF_MSB;
break;
case SND_SOC_DAIFMT_LEFT_J:
iismod |= S3C2412_IISMOD_LR_RLOW;
iismod |= S3C2412_IISMOD_SDF_LSB;
break;
case SND_SOC_DAIFMT_I2S:
iismod &= ~S3C2412_IISMOD_LR_RLOW;
iismod |= S3C2412_IISMOD_SDF_IIS;
break;
default:
Expand Down Expand Up @@ -463,6 +466,31 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,

switch (div_id) {
case S3C_I2SV2_DIV_BCLK:
if (div > 3) {
/* convert value to bit field */

switch (div) {
case 16:
div = S3C2412_IISMOD_BCLK_16FS;
break;

case 32:
div = S3C2412_IISMOD_BCLK_32FS;
break;

case 24:
div = S3C2412_IISMOD_BCLK_24FS;
break;

case 48:
div = S3C2412_IISMOD_BCLK_48FS;
break;

default:
return -EINVAL;
}
}

reg = readl(i2s->regs + S3C2412_IISMOD);
reg &= ~S3C2412_IISMOD_BCLK_MASK;
writel(reg | div, i2s->regs + S3C2412_IISMOD);
Expand Down Expand Up @@ -622,7 +650,7 @@ int s3c_i2sv2_probe(struct platform_device *pdev,
}

i2s->iis_pclk = clk_get(dev, "iis");
if (i2s->iis_pclk == NULL) {
if (IS_ERR(i2s->iis_pclk)) {
dev_err(dev, "failed to get iis_clock\n");
iounmap(i2s->regs);
return -ENOENT;
Expand Down

0 comments on commit 0f62827

Please sign in to comment.