diff options
author | Liam Girdwood <liam.girdwood@wolfsonmicro.com> | 2006-10-13 06:33:56 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:00:52 -0500 |
commit | 527541f9a8a83eedb4d732657dbfdcd2c4ca8bb4 (patch) | |
tree | edb8c0b4ea6bbef82a557736720e78981feeb4e4 /sound/soc/codecs/wm8731.c | |
parent | c07584c83287ae5a13cc836f69a1d824ad068c66 (diff) |
[ALSA] ASoC DAI capabilities labelling
This patch suggested by Takashi changes the DAI capabilities definitions
in pxa-i2s.c, at91rm9200-i2s.c, wm8731.c, wm8750.c and wm9712.c to use a
label = value style.
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 184 |
1 files changed, 135 insertions, 49 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index cd0ece650f31..03a6bb9b8773 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -85,74 +85,160 @@ static const u16 wm8731_reg[WM8731_CACHEREGNUM] = { | |||
85 | static struct snd_soc_dai_mode wm8731_modes[] = { | 85 | static struct snd_soc_dai_mode wm8731_modes[] = { |
86 | /* codec frame and clock master modes */ | 86 | /* codec frame and clock master modes */ |
87 | /* 8k */ | 87 | /* 8k */ |
88 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 88 | { |
89 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_8000, WM8731_DIR, 0, | 89 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
90 | 1536, SND_SOC_FSB(64)}, | 90 | .pcmfmt = WM8731_HIFI_BITS, |
91 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 91 | .pcmrate = SNDRV_PCM_RATE_8000, |
92 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_8000, WM8731_DIR, 0, | 92 | .pcmdir = WM8731_DIR, |
93 | 2304, SND_SOC_FSB(64)}, | 93 | .fs = 1536, |
94 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 94 | .bfs = SND_SOC_FSB(64), |
95 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_8000, WM8731_DIR, 0, | 95 | }, |
96 | 1408, SND_SOC_FSB(64)}, | 96 | { |
97 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 97 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
98 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_8000, WM8731_DIR, 0, | 98 | .pcmfmt = WM8731_HIFI_BITS, |
99 | 2112, SND_SOC_FSB(64)}, | 99 | .pcmrate = SNDRV_PCM_RATE_8000, |
100 | .pcmdir = WM8731_DIR, | ||
101 | .fs = 2304, | ||
102 | .bfs = SND_SOC_FSB(64), | ||
103 | }, | ||
104 | { | ||
105 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, | ||
106 | .pcmfmt = WM8731_HIFI_BITS, | ||
107 | .pcmrate = SNDRV_PCM_RATE_8000, | ||
108 | .pcmdir = WM8731_DIR, | ||
109 | .fs = 1408, | ||
110 | .bfs = SND_SOC_FSB(64), | ||
111 | }, | ||
112 | { | ||
113 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, | ||
114 | .pcmfmt = WM8731_HIFI_BITS, | ||
115 | .pcmrate = SNDRV_PCM_RATE_8000, | ||
116 | .pcmdir = WM8731_DIR, | ||
117 | .fs = 2112, | ||
118 | .bfs = SND_SOC_FSB(64), | ||
119 | }, | ||
100 | 120 | ||
101 | /* 32k */ | 121 | /* 32k */ |
102 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 122 | { |
103 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_32000, WM8731_DIR, 0, | 123 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
104 | 384, SND_SOC_FSB(64)}, | 124 | .pcmfmt = WM8731_HIFI_BITS, |
105 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 125 | .pcmrate = SNDRV_PCM_RATE_32000, |
106 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_32000, WM8731_DIR, 0, | 126 | .pcmdir = WM8731_DIR, |
107 | 576, SND_SOC_FSB(64)}, | 127 | .fs = 384, |
128 | .bfs = SND_SOC_FSB(64), | ||
129 | }, | ||
130 | { | ||
131 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, | ||
132 | .pcmfmt = WM8731_HIFI_BITS, | ||
133 | .pcmrate = SNDRV_PCM_RATE_32000, | ||
134 | .pcmdir = WM8731_DIR, | ||
135 | .fs = 576, | ||
136 | .bfs = SND_SOC_FSB(64), | ||
137 | }, | ||
108 | 138 | ||
109 | /* 44.1k & 48k */ | 139 | /* 44.1k & 48k */ |
110 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 140 | { |
111 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, | 141 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
112 | WM8731_DIR, 0, 256, SND_SOC_FSB(64)}, | 142 | .pcmfmt = WM8731_HIFI_BITS, |
113 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 143 | .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, |
114 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, | 144 | .pcmdir = WM8731_DIR, |
115 | WM8731_DIR, 0, 384, SND_SOC_FSB(64)}, | 145 | .fs = 256, |
146 | .bfs = SND_SOC_FSB(64), | ||
147 | }, | ||
148 | { | ||
149 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, | ||
150 | .pcmfmt = WM8731_HIFI_BITS, | ||
151 | .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, | ||
152 | .pcmdir = WM8731_DIR, | ||
153 | .fs = 384, | ||
154 | .bfs = SND_SOC_FSB(64), | ||
155 | }, | ||
116 | 156 | ||
117 | /* 88.2 & 96k */ | 157 | /* 88.2 & 96k */ |
118 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 158 | { |
119 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, | 159 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
120 | WM8731_DIR, 0, 128, SND_SOC_FSB(64)}, | 160 | .pcmfmt = WM8731_HIFI_BITS, |
121 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 161 | .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, |
122 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, | 162 | .pcmdir = WM8731_DIR, |
123 | WM8731_DIR, 0, 192, SND_SOC_FSB(64)}, | 163 | .fs = 128, |
124 | 164 | .bfs = SND_SOC_FSB(64), | |
165 | |||
166 | }, | ||
167 | { | ||
168 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, | ||
169 | .pcmfmt = WM8731_HIFI_BITS, | ||
170 | .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000, | ||
171 | .pcmdir = WM8731_DIR, | ||
172 | .fs = 192, | ||
173 | .bfs = SND_SOC_FSB(64), | ||
174 | }, | ||
125 | 175 | ||
126 | /* USB codec frame and clock master modes */ | 176 | /* USB codec frame and clock master modes */ |
127 | /* 8k */ | 177 | /* 8k */ |
128 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 178 | { |
129 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_8000, WM8731_DIR, | 179 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
130 | SND_SOC_DAI_BFS_DIV, 1500, SND_SOC_FSBD(1)}, | 180 | .pcmfmt = WM8731_HIFI_BITS, |
181 | .pcmrate = SNDRV_PCM_RATE_8000, | ||
182 | .pcmdir = WM8731_DIR, | ||
183 | .flags = SND_SOC_DAI_BFS_DIV, | ||
184 | .fs = 1500, | ||
185 | .bfs = SND_SOC_FSBD(1), | ||
186 | }, | ||
131 | 187 | ||
132 | /* 44.1k */ | 188 | /* 44.1k */ |
133 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 189 | { |
134 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_44100, WM8731_DIR, | 190 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
135 | SND_SOC_DAI_BFS_DIV, 272, SND_SOC_FSBD(1)}, | 191 | .pcmfmt = WM8731_HIFI_BITS, |
192 | .pcmrate = SNDRV_PCM_RATE_44100, | ||
193 | .pcmdir = WM8731_DIR, | ||
194 | .flags = SND_SOC_DAI_BFS_DIV, | ||
195 | .fs = 272, | ||
196 | .bfs = SND_SOC_FSBD(1), | ||
197 | }, | ||
136 | 198 | ||
137 | /* 48k */ | 199 | /* 48k */ |
138 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 200 | { |
139 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_48000, WM8731_DIR, | 201 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
140 | SND_SOC_DAI_BFS_DIV, 250, SND_SOC_FSBD(1)}, | 202 | .pcmfmt = WM8731_HIFI_BITS, |
203 | .pcmrate = SNDRV_PCM_RATE_48000, | ||
204 | .pcmdir = WM8731_DIR, | ||
205 | .flags = SND_SOC_DAI_BFS_DIV, | ||
206 | .fs = 250, | ||
207 | .bfs = SND_SOC_FSBD(1), | ||
208 | }, | ||
141 | 209 | ||
142 | /* 88.2k */ | 210 | /* 88.2k */ |
143 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 211 | { |
144 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_88200, WM8731_DIR, | 212 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
145 | SND_SOC_DAI_BFS_DIV, 136, SND_SOC_FSBD(1)}, | 213 | .pcmfmt = WM8731_HIFI_BITS, |
214 | .pcmrate = SNDRV_PCM_RATE_88200, | ||
215 | .pcmdir = WM8731_DIR, | ||
216 | .flags = SND_SOC_DAI_BFS_DIV, | ||
217 | .fs = 136, | ||
218 | .bfs = SND_SOC_FSBD(1), | ||
219 | }, | ||
146 | 220 | ||
147 | /* 96k */ | 221 | /* 96k */ |
148 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAITDM_LRDW(0,0), | 222 | { |
149 | WM8731_HIFI_BITS, SNDRV_PCM_RATE_96000, WM8731_DIR, | 223 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, |
150 | SND_SOC_DAI_BFS_DIV, 125, SND_SOC_FSBD(1)}, | 224 | .pcmfmt = WM8731_HIFI_BITS, |
225 | .pcmrate = SNDRV_PCM_RATE_96000, | ||
226 | .pcmdir = WM8731_DIR, | ||
227 | .flags = SND_SOC_DAI_BFS_DIV, | ||
228 | .fs = 125, | ||
229 | .bfs = SND_SOC_FSBD(1), | ||
230 | }, | ||
151 | 231 | ||
152 | /* codec frame and clock slave modes */ | 232 | /* codec frame and clock slave modes */ |
153 | {WM8731_DAIFMT | SND_SOC_DAIFMT_CBS_CFS, SND_SOC_DAITDM_LRDW(0,0), | 233 | { |
154 | WM8731_HIFI_BITS, WM8731_RATES, WM8731_DIR, SND_SOC_DAI_BFS_DIV, | 234 | .fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBS_CFS, |
155 | SND_SOC_FS_ALL, SND_SOC_FSBD_ALL}, | 235 | .pcmfmt = WM8731_HIFI_BITS, |
236 | .pcmrate = WM8731_RATES, | ||
237 | .pcmdir = WM8731_DIR, | ||
238 | .flags = SND_SOC_DAI_BFS_DIV, | ||
239 | .fs = SND_SOC_FS_ALL, | ||
240 | .bfs = SND_SOC_FSBD_ALL, | ||
241 | }, | ||
156 | }; | 242 | }; |
157 | 243 | ||
158 | /* | 244 | /* |