File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
340
340
switch (params_format (params )) {
341
341
case SNDRV_PCM_FORMAT_S16_LE :
342
342
data_length = 16 ;
343
- bclk_ratio = 40 ;
343
+ bclk_ratio = 50 ;
344
+ break ;
345
+ case SNDRV_PCM_FORMAT_S24_LE :
346
+ data_length = 24 ;
347
+ bclk_ratio = 50 ;
344
348
break ;
345
349
case SNDRV_PCM_FORMAT_S32_LE :
346
350
data_length = 32 ;
347
- bclk_ratio = 80 ;
351
+ bclk_ratio = 100 ;
348
352
break ;
349
353
default :
350
354
return - EINVAL ;
@@ -420,7 +424,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
420
424
/* Setup the frame format */
421
425
format = BCM2835_I2S_CHEN ;
422
426
423
- if (data_length > 24 )
427
+ if (data_length >= 24 )
424
428
format |= BCM2835_I2S_CHWEX ;
425
429
426
430
format |= BCM2835_I2S_CHWID ((data_length - 8 )& 0xf );
@@ -711,13 +715,15 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
711
715
.channels_max = 2 ,
712
716
.rates = SNDRV_PCM_RATE_8000_192000 ,
713
717
.formats = SNDRV_PCM_FMTBIT_S16_LE
718
+ | SNDRV_PCM_FMTBIT_S24_LE
714
719
| SNDRV_PCM_FMTBIT_S32_LE
715
720
},
716
721
.capture = {
717
722
.channels_min = 2 ,
718
723
.channels_max = 2 ,
719
724
.rates = SNDRV_PCM_RATE_8000_192000 ,
720
725
.formats = SNDRV_PCM_FMTBIT_S16_LE
726
+ | SNDRV_PCM_FMTBIT_S24_LE
721
727
| SNDRV_PCM_FMTBIT_S32_LE
722
728
},
723
729
.ops = & bcm2835_i2s_dai_ops ,
You can’t perform that action at this time.
0 commit comments