Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193312
b: refs/heads/master
c: 1ca7578
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Mar 4, 2010
1 parent e503d37 commit a1add9b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 913d7b4cc0d958df9f2e4bc0e6926c037d96d07e
refs/heads/master: 1ca7578043a79d74152774acee0ed6e393134d12
19 changes: 19 additions & 0 deletions trunk/sound/soc/s3c24xx/s3c-i2s-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,21 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
return 0;
}

static snd_pcm_sframes_t s3c2412_i2s_delay(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct s3c_i2sv2_info *i2s = to_info(dai);
u32 reg = readl(i2s->regs + S3C2412_IISFIC);
snd_pcm_sframes_t delay;

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
delay = S3C2412_IISFIC_TXCOUNT(reg);
else
delay = S3C2412_IISFIC_RXCOUNT(reg);

return delay;
}

/* default table of all avaialable root fs divisors */
static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 };

Expand Down Expand Up @@ -736,6 +751,10 @@ int s3c_i2sv2_register_dai(struct snd_soc_dai *dai)
ops->set_fmt = s3c2412_i2s_set_fmt;
ops->set_clkdiv = s3c2412_i2s_set_clkdiv;

/* Allow overriding by (for example) IISv4 */
if (!ops->delay)
ops->delay = s3c2412_i2s_delay,

dai->suspend = s3c2412_i2s_suspend;
dai->resume = s3c2412_i2s_resume;

Expand Down

0 comments on commit a1add9b

Please sign in to comment.