aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/ep93xx/ep93xx-i2s.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/ep93xx/ep93xx-i2s.c b/sound/soc/ep93xx/ep93xx-i2s.c
index 9ac93f6b4f8..fff579a1c13 100644
--- a/sound/soc/ep93xx/ep93xx-i2s.c
+++ b/sound/soc/ep93xx/ep93xx-i2s.c
@@ -267,14 +267,16 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream,
267 ep93xx_i2s_write_reg(info, EP93XX_I2S_RXWRDLEN, word_len); 267 ep93xx_i2s_write_reg(info, EP93XX_I2S_RXWRDLEN, word_len);
268 268
269 /* 269 /*
270 * Calculate the sdiv (bit clock) and lrdiv (left/right clock) values. 270 * EP93xx I2S module can be setup so SCLK / LRCLK value can be
271 * If the lrclk is pulse length is larger than the word size, then the 271 * 32, 64, 128. MCLK / SCLK value can be 2 and 4.
272 * bit clock will be gated for the unused bits. 272 * We set LRCLK equal to `rate' and minimum SCLK / LRCLK
273 * value is 64, because our sample size is 32 bit * 2 channels.
274 * I2S standard permits us to transmit more bits than
275 * the codec uses.
273 */ 276 */
274 div = (clk_get_rate(info->mclk) / params_rate(params)) * 277 div = clk_get_rate(info->mclk) / params_rate(params);
275 params_channels(params);
276 for (sdiv = 2; sdiv <= 4; sdiv += 2) 278 for (sdiv = 2; sdiv <= 4; sdiv += 2)
277 for (lrdiv = 32; lrdiv <= 128; lrdiv <<= 1) 279 for (lrdiv = 64; lrdiv <= 128; lrdiv <<= 1)
278 if (sdiv * lrdiv == div) { 280 if (sdiv * lrdiv == div) {
279 found = 1; 281 found = 1;
280 goto out; 282 goto out;
@@ -341,9 +343,7 @@ static struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
341 .set_fmt = ep93xx_i2s_set_dai_fmt, 343 .set_fmt = ep93xx_i2s_set_dai_fmt,
342}; 344};
343 345
344#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ 346#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
345 SNDRV_PCM_FMTBIT_S24_LE | \
346 SNDRV_PCM_FMTBIT_S32_LE)
347 347
348static struct snd_soc_dai_driver ep93xx_i2s_dai = { 348static struct snd_soc_dai_driver ep93xx_i2s_dai = {
349 .symmetric_rates= 1, 349 .symmetric_rates= 1,