ASoC: sh: Don't set unused struct snd_pcm_hardware fields
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 6 Jan 2014 13:19:14 +0000 (14:19 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 9 Jan 2014 14:29:44 +0000 (14:29 +0000)
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/sh/dma-sh7760.c
sound/soc/sh/fsi.c
sound/soc/sh/rcar/core.c

index 1a8b03e4b41b9c3f7ce38fcc79130307d757cb51..c85f8eb66c972892654b7a4e37e2818b779f2b65 100644 (file)
@@ -89,29 +89,12 @@ struct camelot_pcm {
 #define DMABRG_PREALLOC_BUFFER         32 * 1024
 #define DMABRG_PREALLOC_BUFFER_MAX     32 * 1024
 
-/* support everything the SSI supports */
-#define DMABRG_RATES   \
-       SNDRV_PCM_RATE_8000_192000
-
-#define DMABRG_FMTS    \
-       (SNDRV_PCM_FMTBIT_S8      | SNDRV_PCM_FMTBIT_U8      |  \
-        SNDRV_PCM_FMTBIT_S16_LE  | SNDRV_PCM_FMTBIT_U16_LE  |  \
-        SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE |  \
-        SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_U24_3LE |  \
-        SNDRV_PCM_FMTBIT_S32_LE  | SNDRV_PCM_FMTBIT_U32_LE)
-
 static struct snd_pcm_hardware camelot_pcm_hardware = {
        .info = (SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP_VALID |
                SNDRV_PCM_INFO_BATCH),
-       .formats =      DMABRG_FMTS,
-       .rates =        DMABRG_RATES,
-       .rate_min =             8000,
-       .rate_max =             192000,
-       .channels_min =         2,
-       .channels_max =         8,              /* max of the SSI */
        .buffer_bytes_max =     DMABRG_PERIOD_MAX,
        .period_bytes_min =     DMABRG_PERIOD_MIN,
        .period_bytes_max =     DMABRG_PERIOD_MAX / 2,
index b33ca7cd085bf4b766dee1900a4101beffc9fa72..ef89fa8e4fc882f313d8d717c039aed4a07c0e8e 100644 (file)
@@ -1777,12 +1777,6 @@ static struct snd_pcm_hardware fsi_pcm_hardware = {
                        SNDRV_PCM_INFO_MMAP             |
                        SNDRV_PCM_INFO_MMAP_VALID       |
                        SNDRV_PCM_INFO_PAUSE,
-       .formats                = FSI_FMTS,
-       .rates                  = FSI_RATES,
-       .rate_min               = 8000,
-       .rate_max               = 192000,
-       .channels_min           = 2,
-       .channels_max           = 2,
        .buffer_bytes_max       = 64 * 1024,
        .period_bytes_min       = 32,
        .period_bytes_max       = 8192,
index b3653d37f75f087cffd3880a5c22e06c693c78fe..743de5e3b1e1ed4cba8f5dcfce3a5d3cfd9471bf 100644 (file)
@@ -628,12 +628,6 @@ static struct snd_pcm_hardware rsnd_pcm_hardware = {
                        SNDRV_PCM_INFO_MMAP             |
                        SNDRV_PCM_INFO_MMAP_VALID       |
                        SNDRV_PCM_INFO_PAUSE,
-       .formats                = RSND_FMTS,
-       .rates                  = RSND_RATES,
-       .rate_min               = 8000,
-       .rate_max               = 192000,
-       .channels_min           = 2,
-       .channels_max           = 2,
        .buffer_bytes_max       = 64 * 1024,
        .period_bytes_min       = 32,
        .period_bytes_max       = 8192,