Skip to content

Commit

Permalink
ASoC: S3C64XX: I2S: Make BCLK independent of sample size
Browse files Browse the repository at this point in the history
For some CPU-CODEC and source clock combination we might need to set
BCLK to N*Sample_size*LRCLK, where N may be even 3 or 4, not just 2.

We can simply remove the dependency of BCLK on sample size as there
is already a callback(S3C_I2SV2_DIV_BCLK) available to set required BCLK.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Jassi Brar authored and Mark Brown committed Mar 10, 2010
1 parent fad837c commit bf32882
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/soc/s3c24xx/s3c-i2s-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,19 +358,16 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
#endif

#ifdef CONFIG_PLAT_S3C64XX
iismod &= ~(S3C64XX_IISMOD_BLC_MASK | S3C2412_IISMOD_BCLK_MASK);
iismod &= ~S3C64XX_IISMOD_BLC_MASK;
/* Sample size */
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S8:
/* 8 bit sample, 16fs BCLK */
iismod |= (S3C64XX_IISMOD_BLC_8BIT | S3C2412_IISMOD_BCLK_16FS);
iismod |= S3C64XX_IISMOD_BLC_8BIT;
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 |= (S3C64XX_IISMOD_BLC_24BIT | S3C2412_IISMOD_BCLK_48FS);
iismod |= S3C64XX_IISMOD_BLC_24BIT;
break;
}
#endif
Expand Down

0 comments on commit bf32882

Please sign in to comment.