Skip to content
Permalink
Browse files

Revert "Revert "ASoC: bcm2835: add 24bit support""

This reverts commit d4c84d9.
  • Loading branch information...
msperl committed Aug 31, 2016
1 parent bc5f27c commit 02771a57e15c80f309fcbaa3f0986e4ee8038b9d
Showing with 6 additions and 1 deletion.
  1. +6 −1 sound/soc/bcm/bcm2835-i2s.c
@@ -259,6 +259,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
case SNDRV_PCM_FORMAT_S16_LE:
data_length = 16;
break;
case SNDRV_PCM_FORMAT_S24_LE:
data_length = 24;
break;
case SNDRV_PCM_FORMAT_S32_LE:
data_length = 32;
break;
@@ -279,7 +282,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
/* Setup the frame format */
format = BCM2835_I2S_CHEN;

if (data_length > 24)
if (data_length >= 24)
format |= BCM2835_I2S_CHWEX;

format |= BCM2835_I2S_CHWID((data_length-8)&0xf);
@@ -570,13 +573,15 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000,
.formats = SNDRV_PCM_FMTBIT_S16_LE
| SNDRV_PCM_FMTBIT_S24_LE
| SNDRV_PCM_FMTBIT_S32_LE
},
.capture = {
.channels_min = 2,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000,
.formats = SNDRV_PCM_FMTBIT_S16_LE
| SNDRV_PCM_FMTBIT_S24_LE
| SNDRV_PCM_FMTBIT_S32_LE
},
.ops = &bcm2835_i2s_dai_ops,

0 comments on commit 02771a5

Please sign in to comment.
You can’t perform that action at this time.