]> Pileus Git - ~andy/linux/commitdiff
ASoC: intel: Don't set unused struct snd_pcm_hardware fields
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 6 Jan 2014 13:19:10 +0000 (14:19 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 9 Jan 2014 14:27:39 +0000 (14:27 +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/intel/sst_platform.c
sound/soc/intel/sst_platform.h

index b6b5eb698d33227af2193196847b64be291e595a..f465a81808636e0cf59e8644d4fa8f08e6cb2904 100644 (file)
@@ -89,16 +89,6 @@ static struct snd_pcm_hardware sst_platform_pcm_hw = {
                        SNDRV_PCM_INFO_MMAP_VALID |
                        SNDRV_PCM_INFO_BLOCK_TRANSFER |
                        SNDRV_PCM_INFO_SYNC_START),
-       .formats = (SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_U16 |
-                       SNDRV_PCM_FMTBIT_S24 | SNDRV_PCM_FMTBIT_U24 |
-                       SNDRV_PCM_FMTBIT_S32 | SNDRV_PCM_FMTBIT_U32),
-       .rates = (SNDRV_PCM_RATE_8000|
-                       SNDRV_PCM_RATE_44100 |
-                       SNDRV_PCM_RATE_48000),
-       .rate_min = SST_MIN_RATE,
-       .rate_max = SST_MAX_RATE,
-       .channels_min = SST_MIN_CHANNEL,
-       .channels_max = SST_MAX_CHANNEL,
        .buffer_bytes_max = SST_MAX_BUFFER,
        .period_bytes_min = SST_MIN_PERIOD_BYTES,
        .period_bytes_max = SST_MAX_PERIOD_BYTES,
index cacc9066ec524a5ad6747f650b77615899d776d6..bee64fb7d2ef54871973952bb68c9a797486e390 100644 (file)
 #define SST_STEREO             2
 #define SST_MAX_CAP            5
 
-#define SST_MIN_RATE           8000
-#define SST_MAX_RATE           48000
-#define SST_MIN_CHANNEL                1
-#define SST_MAX_CHANNEL                5
 #define SST_MAX_BUFFER         (800*1024)
 #define SST_MIN_BUFFER         (800*1024)
 #define SST_MIN_PERIOD_BYTES   32