ASoC: fsl: Don't set unused struct snd_pcm_hardware fields
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 6 Jan 2014 13:19:09 +0000 (14:19 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 7 Jan 2014 11:40:24 +0000 (11:40 +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>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/imx-pcm-dma.c
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/mpc5200_dma.c

index d570f8c81dc666fb1f6653c7e9e2a5a128b3fb5a..6bb0ea59284f0b4fab317f1b8ee263f7d1f7c341 100644 (file)
                            SNDRV_PCM_FMTBIT_S32_BE     | \
                            SNDRV_PCM_FMTBIT_U32_LE     | \
                            SNDRV_PCM_FMTBIT_U32_BE)
-
-#define FSLDMA_PCM_RATES (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_192000 | \
-                         SNDRV_PCM_RATE_CONTINUOUS)
-
 struct dma_object {
        struct snd_soc_platform_driver dai;
        dma_addr_t ssi_stx_phys;
@@ -140,9 +136,6 @@ static const struct snd_pcm_hardware fsl_dma_hardware = {
                                  SNDRV_PCM_INFO_JOINT_DUPLEX |
                                  SNDRV_PCM_INFO_PAUSE,
        .formats                = FSLDMA_PCM_FORMATS,
-       .rates                  = FSLDMA_PCM_RATES,
-       .rate_min               = 5512,
-       .rate_max               = 192000,
        .period_bytes_min       = 512,          /* A reasonable limit */
        .period_bytes_max       = (u32) -1,
        .periods_min            = NUM_DMA_LINKS,
index c5e47f866b4b756beaa515b1c29ba4177572cb10..2585ae44e634feb6bab623b6afdf93c58c3b288f 100644 (file)
@@ -41,9 +41,6 @@ static const struct snd_pcm_hardware imx_pcm_hardware = {
                SNDRV_PCM_INFO_PAUSE |
                SNDRV_PCM_INFO_RESUME,
        .formats = SNDRV_PCM_FMTBIT_S16_LE,
-       .rate_min = 8000,
-       .channels_min = 2,
-       .channels_max = 2,
        .buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
        .period_bytes_min = 128,
        .period_bytes_max = 65535, /* Limited by SDMA engine */
index c75d43bb2e92de772a97865e98227176473135a4..6553202dd48c09d19fe2916447f553023276a897 100644 (file)
@@ -162,9 +162,6 @@ static struct snd_pcm_hardware snd_imx_hardware = {
                SNDRV_PCM_INFO_PAUSE |
                SNDRV_PCM_INFO_RESUME,
        .formats = SNDRV_PCM_FMTBIT_S16_LE,
-       .rate_min = 8000,
-       .channels_min = 2,
-       .channels_max = 2,
        .buffer_bytes_max = IMX_SSI_DMABUF_SIZE,
        .period_bytes_min = 128,
        .period_bytes_max = 16 * 1024,
index 71bf2f248cd47be5fb025baa6535296b49d75bbd..f2b5d756b1f3360846ef3bb1f8f43a4efd8547b1 100644 (file)
@@ -200,10 +200,6 @@ static const struct snd_pcm_hardware psc_dma_hardware = {
                SNDRV_PCM_INFO_BATCH,
        .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE |
                SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE,
-       .rate_min = 8000,
-       .rate_max = 48000,
-       .channels_min = 1,
-       .channels_max = 2,
        .period_bytes_max       = 1024 * 1024,
        .period_bytes_min       = 32,
        .periods_min            = 2,