aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Gardiner <bengardiner@nanometrics.ca>2011-05-24 14:50:16 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-25 07:14:29 -0400
commit8e56d5b834610504e232641565236ac60740a858 (patch)
tree40d37a4b9e703192c3e386f2d03bc24c75fed935
parentfb1e9703af618c7ae0ee43f19778264c1804a50d (diff)
ASoC: davinci-pcm: expand the .formats
Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of handling data of width up to and including 32bits. " if ((data_type == 0) || (data_type > 4)) { printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type); return -EINVAL; } " Update the .format member of the snd_pcm_hardware instances it registers to reflect this capability. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/davinci/davinci-pcm.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 0d04e0c4a148..1e47267210b6 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -46,11 +46,27 @@ static void print_buf_info(int slot, char *name)
46} 46}
47#endif 47#endif
48 48
49#define DAVINCI_PCM_FMTBITS (\
50 SNDRV_PCM_FMTBIT_S8 |\
51 SNDRV_PCM_FMTBIT_U8 |\
52 SNDRV_PCM_FMTBIT_S16_LE |\
53 SNDRV_PCM_FMTBIT_S16_BE |\
54 SNDRV_PCM_FMTBIT_U16_LE |\
55 SNDRV_PCM_FMTBIT_U16_BE |\
56 SNDRV_PCM_FMTBIT_S24_LE |\
57 SNDRV_PCM_FMTBIT_S24_BE |\
58 SNDRV_PCM_FMTBIT_U24_LE |\
59 SNDRV_PCM_FMTBIT_U24_BE |\
60 SNDRV_PCM_FMTBIT_S32_LE |\
61 SNDRV_PCM_FMTBIT_S32_BE |\
62 SNDRV_PCM_FMTBIT_U32_LE |\
63 SNDRV_PCM_FMTBIT_U32_BE)
64
49static struct snd_pcm_hardware pcm_hardware_playback = { 65static struct snd_pcm_hardware pcm_hardware_playback = {
50 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | 66 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
51 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | 67 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
52 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), 68 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME),
53 .formats = (SNDRV_PCM_FMTBIT_S16_LE), 69 .formats = DAVINCI_PCM_FMTBITS,
54 .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 70 .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
55 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | 71 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
56 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | 72 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
@@ -72,7 +88,7 @@ static struct snd_pcm_hardware pcm_hardware_capture = {
72 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | 88 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
73 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | 89 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
74 SNDRV_PCM_INFO_PAUSE), 90 SNDRV_PCM_INFO_PAUSE),
75 .formats = (SNDRV_PCM_FMTBIT_S16_LE), 91 .formats = DAVINCI_PCM_FMTBITS,
76 .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 92 .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
77 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | 93 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
78 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | 94 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |