diff options
| -rw-r--r-- | sound/soc/bcm/bcm2835-i2s.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index 1c1f2210387b..d2663e79ece1 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c | |||
| @@ -259,6 +259,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 259 | case SNDRV_PCM_FORMAT_S16_LE: | 259 | case SNDRV_PCM_FORMAT_S16_LE: |
| 260 | data_length = 16; | 260 | data_length = 16; |
| 261 | break; | 261 | break; |
| 262 | case SNDRV_PCM_FORMAT_S24_LE: | ||
| 263 | data_length = 24; | ||
| 264 | break; | ||
| 262 | case SNDRV_PCM_FORMAT_S32_LE: | 265 | case SNDRV_PCM_FORMAT_S32_LE: |
| 263 | data_length = 32; | 266 | data_length = 32; |
| 264 | break; | 267 | break; |
| @@ -279,7 +282,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 279 | /* Setup the frame format */ | 282 | /* Setup the frame format */ |
| 280 | format = BCM2835_I2S_CHEN; | 283 | format = BCM2835_I2S_CHEN; |
| 281 | 284 | ||
| 282 | if (data_length > 24) | 285 | if (data_length >= 24) |
| 283 | format |= BCM2835_I2S_CHWEX; | 286 | format |= BCM2835_I2S_CHWEX; |
| 284 | 287 | ||
| 285 | format |= BCM2835_I2S_CHWID((data_length-8)&0xf); | 288 | format |= BCM2835_I2S_CHWID((data_length-8)&0xf); |
| @@ -570,6 +573,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { | |||
| 570 | .channels_max = 2, | 573 | .channels_max = 2, |
| 571 | .rates = SNDRV_PCM_RATE_8000_192000, | 574 | .rates = SNDRV_PCM_RATE_8000_192000, |
| 572 | .formats = SNDRV_PCM_FMTBIT_S16_LE | 575 | .formats = SNDRV_PCM_FMTBIT_S16_LE |
| 576 | | SNDRV_PCM_FMTBIT_S24_LE | ||
| 573 | | SNDRV_PCM_FMTBIT_S32_LE | 577 | | SNDRV_PCM_FMTBIT_S32_LE |
| 574 | }, | 578 | }, |
| 575 | .capture = { | 579 | .capture = { |
| @@ -577,6 +581,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { | |||
| 577 | .channels_max = 2, | 581 | .channels_max = 2, |
| 578 | .rates = SNDRV_PCM_RATE_8000_192000, | 582 | .rates = SNDRV_PCM_RATE_8000_192000, |
| 579 | .formats = SNDRV_PCM_FMTBIT_S16_LE | 583 | .formats = SNDRV_PCM_FMTBIT_S16_LE |
| 584 | | SNDRV_PCM_FMTBIT_S24_LE | ||
| 580 | | SNDRV_PCM_FMTBIT_S32_LE | 585 | | SNDRV_PCM_FMTBIT_S32_LE |
| 581 | }, | 586 | }, |
| 582 | .ops = &bcm2835_i2s_dai_ops, | 587 | .ops = &bcm2835_i2s_dai_ops, |
