Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231849
b: refs/heads/master
c: 7322ce2
h: refs/heads/master
i:
  231847: f9b9dcf
v: v3
  • Loading branch information
Alexander Sverdlin authored and Mark Brown committed Jan 17, 2011
1 parent 61f3374 commit 709303c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 7ebcf5d6021a696680ee77d9162a2edec2d671dd
refs/heads/master: 7322ce21cde92777a9b11e17429d61d1cda6d2c2
18 changes: 9 additions & 9 deletions trunk/sound/soc/ep93xx/ep93xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,16 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream,
ep93xx_i2s_write_reg(info, EP93XX_I2S_RXWRDLEN, word_len);

/*
* Calculate the sdiv (bit clock) and lrdiv (left/right clock) values.
* If the lrclk is pulse length is larger than the word size, then the
* bit clock will be gated for the unused bits.
* EP93xx I2S module can be setup so SCLK / LRCLK value can be
* 32, 64, 128. MCLK / SCLK value can be 2 and 4.
* We set LRCLK equal to `rate' and minimum SCLK / LRCLK
* value is 64, because our sample size is 32 bit * 2 channels.
* I2S standard permits us to transmit more bits than
* the codec uses.
*/
div = (clk_get_rate(info->mclk) / params_rate(params)) *
params_channels(params);
div = clk_get_rate(info->mclk) / params_rate(params);
for (sdiv = 2; sdiv <= 4; sdiv += 2)
for (lrdiv = 32; lrdiv <= 128; lrdiv <<= 1)
for (lrdiv = 64; lrdiv <= 128; lrdiv <<= 1)
if (sdiv * lrdiv == div) {
found = 1;
goto out;
Expand Down Expand Up @@ -341,9 +343,7 @@ static struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
.set_fmt = ep93xx_i2s_set_dai_fmt,
};

#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_S24_LE | \
SNDRV_PCM_FMTBIT_S32_LE)
#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)

static struct snd_soc_dai_driver ep93xx_i2s_dai = {
.symmetric_rates= 1,
Expand Down

0 comments on commit 709303c

Please sign in to comment.