]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ASoC: bcm2835: Support additional samplerates up to 384kHz
authorMatthias Reichl <hias@horus.com>
Sun, 7 May 2017 14:19:54 +0000 (16:19 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Mar 2018 15:21:09 +0000 (12:21 -0300)
Sample rates are only restricted by the capabilities of the
clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of
SNDRV_PCM_RATE_8000_192000.

Tests (eg with pcm5122) have shown that bcm2835 works fine
in 384kHz/32bit stereo mode, so change the maximum allowed
rate from 192kHz to 384kHz.

Signed-off-by: Matthias Reichl <hias@horus.com>
sound/soc/bcm/bcm2835-i2s.c

index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c48fb6e57 100644 (file)
@@ -765,7 +765,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
        .playback = {
                .channels_min = 2,
                .channels_max = 2,
-               .rates =        SNDRV_PCM_RATE_8000_192000,
+               .rates =        SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min =     8000,
+               .rate_max =     384000,
                .formats =      SNDRV_PCM_FMTBIT_S16_LE
                                | SNDRV_PCM_FMTBIT_S24_LE
                                | SNDRV_PCM_FMTBIT_S32_LE
@@ -773,7 +775,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
        .capture = {
                .channels_min = 2,
                .channels_max = 2,
-               .rates =        SNDRV_PCM_RATE_8000_192000,
+               .rates =        SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min =     8000,
+               .rate_max =     384000,
                .formats =      SNDRV_PCM_FMTBIT_S16_LE
                                | SNDRV_PCM_FMTBIT_S24_LE
                                | SNDRV_PCM_FMTBIT_S32_LE