aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-01-06 08:19:14 -0500
committerMark Brown <broonie@linaro.org>2014-01-09 09:29:44 -0500
commita7ddf151b0eb12a8840d9d127f1679bb1c89a1ff (patch)
tree3cf583b9b3da6a4ea28dfa7720a198c0ce6423ee /sound/soc/sh
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
ASoC: sh: Don't set unused struct snd_pcm_hardware fields
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>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/dma-sh7760.c17
-rw-r--r--sound/soc/sh/fsi.c6
-rw-r--r--sound/soc/sh/rcar/core.c6
3 files changed, 0 insertions, 29 deletions
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c
index 1a8b03e4b41b..c85f8eb66c97 100644
--- a/sound/soc/sh/dma-sh7760.c
+++ b/sound/soc/sh/dma-sh7760.c
@@ -89,29 +89,12 @@ struct camelot_pcm {
89#define DMABRG_PREALLOC_BUFFER 32 * 1024 89#define DMABRG_PREALLOC_BUFFER 32 * 1024
90#define DMABRG_PREALLOC_BUFFER_MAX 32 * 1024 90#define DMABRG_PREALLOC_BUFFER_MAX 32 * 1024
91 91
92/* support everything the SSI supports */
93#define DMABRG_RATES \
94 SNDRV_PCM_RATE_8000_192000
95
96#define DMABRG_FMTS \
97 (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | \
98 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE | \
99 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
100 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_U24_3LE | \
101 SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_U32_LE)
102
103static struct snd_pcm_hardware camelot_pcm_hardware = { 92static struct snd_pcm_hardware camelot_pcm_hardware = {
104 .info = (SNDRV_PCM_INFO_MMAP | 93 .info = (SNDRV_PCM_INFO_MMAP |
105 SNDRV_PCM_INFO_INTERLEAVED | 94 SNDRV_PCM_INFO_INTERLEAVED |
106 SNDRV_PCM_INFO_BLOCK_TRANSFER | 95 SNDRV_PCM_INFO_BLOCK_TRANSFER |
107 SNDRV_PCM_INFO_MMAP_VALID | 96 SNDRV_PCM_INFO_MMAP_VALID |
108 SNDRV_PCM_INFO_BATCH), 97 SNDRV_PCM_INFO_BATCH),
109 .formats = DMABRG_FMTS,
110 .rates = DMABRG_RATES,
111 .rate_min = 8000,
112 .rate_max = 192000,
113 .channels_min = 2,
114 .channels_max = 8, /* max of the SSI */
115 .buffer_bytes_max = DMABRG_PERIOD_MAX, 98 .buffer_bytes_max = DMABRG_PERIOD_MAX,
116 .period_bytes_min = DMABRG_PERIOD_MIN, 99 .period_bytes_min = DMABRG_PERIOD_MIN,
117 .period_bytes_max = DMABRG_PERIOD_MAX / 2, 100 .period_bytes_max = DMABRG_PERIOD_MAX / 2,
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index b33ca7cd085b..ef89fa8e4fc8 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1777,12 +1777,6 @@ static struct snd_pcm_hardware fsi_pcm_hardware = {
1777 SNDRV_PCM_INFO_MMAP | 1777 SNDRV_PCM_INFO_MMAP |
1778 SNDRV_PCM_INFO_MMAP_VALID | 1778 SNDRV_PCM_INFO_MMAP_VALID |
1779 SNDRV_PCM_INFO_PAUSE, 1779 SNDRV_PCM_INFO_PAUSE,
1780 .formats = FSI_FMTS,
1781 .rates = FSI_RATES,
1782 .rate_min = 8000,
1783 .rate_max = 192000,
1784 .channels_min = 2,
1785 .channels_max = 2,
1786 .buffer_bytes_max = 64 * 1024, 1780 .buffer_bytes_max = 64 * 1024,
1787 .period_bytes_min = 32, 1781 .period_bytes_min = 32,
1788 .period_bytes_max = 8192, 1782 .period_bytes_max = 8192,
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index b3653d37f75f..743de5e3b1e1 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -628,12 +628,6 @@ static struct snd_pcm_hardware rsnd_pcm_hardware = {
628 SNDRV_PCM_INFO_MMAP | 628 SNDRV_PCM_INFO_MMAP |
629 SNDRV_PCM_INFO_MMAP_VALID | 629 SNDRV_PCM_INFO_MMAP_VALID |
630 SNDRV_PCM_INFO_PAUSE, 630 SNDRV_PCM_INFO_PAUSE,
631 .formats = RSND_FMTS,
632 .rates = RSND_RATES,
633 .rate_min = 8000,
634 .rate_max = 192000,
635 .channels_min = 2,
636 .channels_max = 2,
637 .buffer_bytes_max = 64 * 1024, 631 .buffer_bytes_max = 64 * 1024,
638 .period_bytes_min = 32, 632 .period_bytes_min = 32,
639 .period_bytes_max = 8192, 633 .period_bytes_max = 8192,