ASoC: kirkwood-dma: remove restriction on sample rates
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 20 Nov 2012 12:20:14 +0000 (12:20 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 21 Nov 2012 01:40:23 +0000 (10:40 +0900)
This is part of a patch found in Rabeeh Khoury's git tree for the
cubox.

The kirkwood DMA hardware for ASoC does not impose any restrictions
on the sample rates available, so it's silly to impose an artificial
set in the DMA code.  The restrictions come from the availble clocks
to the I2S module, which are already handled in the I2S part of the
driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/kirkwood/kirkwood-dma.c

index 2ba08148655f32ee2fa7301c44d65b54e7ea02fb..73c90c6370333f886bae780b4c8fa96c954adcab 100644 (file)
 #include "kirkwood.h"
 
 #define KIRKWOOD_RATES \
-       (SNDRV_PCM_RATE_44100 | \
-        SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000)
+       (SNDRV_PCM_RATE_8000_192000 |           \
+        SNDRV_PCM_RATE_CONTINUOUS |            \
+        SNDRV_PCM_RATE_KNOT)
+
 #define KIRKWOOD_FORMATS \
        (SNDRV_PCM_FMTBIT_S16_LE | \
         SNDRV_PCM_FMTBIT_S24_LE | \
@@ -43,8 +45,8 @@ static struct snd_pcm_hardware kirkwood_dma_snd_hw = {
                 SNDRV_PCM_INFO_PAUSE),
        .formats                = KIRKWOOD_FORMATS,
        .rates                  = KIRKWOOD_RATES,
-       .rate_min               = 44100,
-       .rate_max               = 96000,
+       .rate_min               = 8000,
+       .rate_max               = 384000,
        .channels_min           = 1,
        .channels_max           = 2,
        .buffer_bytes_max       = KIRKWOOD_SND_MAX_PERIOD_BYTES * KIRKWOOD_SND_MAX_PERIODS,