aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8750.c
diff options
context:
space:
mode:
authorLiam Girdwood <liam.girdwood@wolfsonmicro.com>2006-10-13 06:33:56 -0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:00:52 -0500
commit527541f9a8a83eedb4d732657dbfdcd2c4ca8bb4 (patch)
treeedb8c0b4ea6bbef82a557736720e78981feeb4e4 /sound/soc/codecs/wm8750.c
parentc07584c83287ae5a13cc836f69a1d824ad068c66 (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/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c316
1 files changed, 234 insertions, 82 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 6a8b2799b3b1..b07a6ed6aa66 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -97,102 +97,254 @@ static const u16 wm8750_reg[] = {
97static struct snd_soc_dai_mode wm8750_modes[] = { 97static struct snd_soc_dai_mode wm8750_modes[] = {
98 /* common codec frame and clock master modes */ 98 /* common codec frame and clock master modes */
99 /* 8k */ 99 /* 8k */
100 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 100 {
101 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000, 101 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
102 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1536, WM8750_HIFI_FSB}, 102 .pcmfmt = WM8750_HIFI_BITS,
103 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 103 .pcmrate = SNDRV_PCM_RATE_8000,
104 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000, 104 .pcmdir = WM8750_DIR,
105 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1408, WM8750_HIFI_FSB}, 105 .flags = SND_SOC_DAI_BFS_DIV,
106 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 106 .fs = 1536,
107 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000, 107 .bfs = WM8750_HIFI_FSB,
108 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 2304, WM8750_HIFI_FSB}, 108 },
109 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 109 {
110 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000, 110 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
111 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 2112, WM8750_HIFI_FSB}, 111 .pcmfmt = WM8750_HIFI_BITS,
112 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 112 .pcmrate = SNDRV_PCM_RATE_8000,
113 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000, 113 .pcmdir = WM8750_DIR,
114 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1500, WM8750_HIFI_FSB}, 114 .flags = SND_SOC_DAI_BFS_DIV,
115 .fs = 1408,
116 .bfs = WM8750_HIFI_FSB,
117 },
118 {
119 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
120 .pcmfmt = WM8750_HIFI_BITS,
121 .pcmrate = SNDRV_PCM_RATE_8000,
122 .pcmdir = WM8750_DIR,
123 .flags = SND_SOC_DAI_BFS_DIV,
124 .fs = 2304,
125 .bfs = WM8750_HIFI_FSB,
126 },
127 {
128 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
129 .pcmfmt = WM8750_HIFI_BITS,
130 .pcmrate = SNDRV_PCM_RATE_8000,
131 .pcmdir = WM8750_DIR,
132 .flags = SND_SOC_DAI_BFS_DIV,
133 .fs = 2112,
134 .bfs = WM8750_HIFI_FSB,
135 },
136 {
137 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
138 .pcmfmt = WM8750_HIFI_BITS,
139 .pcmrate = SNDRV_PCM_RATE_8000,
140 .pcmdir = WM8750_DIR,
141 .flags = SND_SOC_DAI_BFS_DIV,
142 .fs = 1500,
143 .bfs = WM8750_HIFI_FSB,
144 },
115 145
116 /* 11.025k */ 146 /* 11.025k */
117 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 147 {
118 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025, 148 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
119 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1024, WM8750_HIFI_FSB}, 149 .pcmfmt = WM8750_HIFI_BITS,
120 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 150 .pcmrate = SNDRV_PCM_RATE_11025,
121 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025, 151 .pcmdir = WM8750_DIR,
122 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1536, WM8750_HIFI_FSB}, 152 .flags = SND_SOC_DAI_BFS_DIV,
123 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 153 .fs = 1024,
124 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025, 154 .bfs = WM8750_HIFI_FSB,
125 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1088, WM8750_HIFI_FSB}, 155 },
156 {
157 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
158 .pcmfmt = WM8750_HIFI_BITS,
159 .pcmrate = SNDRV_PCM_RATE_11025,
160 .pcmdir = WM8750_DIR,
161 .flags = SND_SOC_DAI_BFS_DIV,
162 .fs = 1536,
163 .bfs = WM8750_HIFI_FSB,
164 },
165 {
166 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
167 .pcmfmt = WM8750_HIFI_BITS,
168 .pcmrate = SNDRV_PCM_RATE_11025,
169 .pcmdir = WM8750_DIR,
170 .flags = SND_SOC_DAI_BFS_DIV,
171 .fs = 1088,
172 .bfs = WM8750_HIFI_FSB,
173 },
126 174
127 /* 16k */ 175 /* 16k */
128 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 176 {
129 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 177 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
130 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 768, WM8750_HIFI_FSB}, 178 .pcmfmt = WM8750_HIFI_BITS,
131 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 179 .pcmrate = SNDRV_PCM_RATE_16000,
132 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 180 .pcmdir = WM8750_DIR,
133 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1152, WM8750_HIFI_FSB}, 181 .flags = SND_SOC_DAI_BFS_DIV,
134 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 182 .fs = 768,
135 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 183 .bfs = WM8750_HIFI_FSB,
136 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 750, WM8750_HIFI_FSB}, 184 },
185 {
186 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
187 .pcmfmt = WM8750_HIFI_BITS,
188 .pcmrate = SNDRV_PCM_RATE_16000,
189 .pcmdir = WM8750_DIR,
190 .flags = SND_SOC_DAI_BFS_DIV,
191 .fs = 1152,
192 .bfs = WM8750_HIFI_FSB
193 },
194 {
195 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
196 .pcmfmt = WM8750_HIFI_BITS,
197 .pcmrate = SNDRV_PCM_RATE_16000,
198 .pcmdir = WM8750_DIR,
199 .flags = SND_SOC_DAI_BFS_DIV,
200 .fs = 750,
201 .bfs = WM8750_HIFI_FSB,
202 },
137 203
138 /* 22.05k */ 204 /* 22.05k */
139 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 205 {
140 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050, 206 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
141 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 512, WM8750_HIFI_FSB}, 207 .pcmfmt = WM8750_HIFI_BITS,
142 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 208 .pcmrate = SNDRV_PCM_RATE_22050,
143 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050, 209 .pcmdir = WM8750_DIR,
144 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 768, WM8750_HIFI_FSB}, 210 .flags = SND_SOC_DAI_BFS_DIV,
145 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 211 .fs = 512,
146 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050, 212 .bfs = WM8750_HIFI_FSB,
147 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 544, WM8750_HIFI_FSB}, 213 },
214 {
215 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
216 .pcmfmt = WM8750_HIFI_BITS,
217 .pcmrate = SNDRV_PCM_RATE_22050,
218 .pcmdir = WM8750_DIR,
219 .flags = SND_SOC_DAI_BFS_DIV,
220 .fs = 768,
221 .bfs = WM8750_HIFI_FSB,
222 },
223 {
224 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
225 .pcmfmt = WM8750_HIFI_BITS,
226 .pcmrate = SNDRV_PCM_RATE_22050,
227 .pcmdir = WM8750_DIR,
228 .flags = SND_SOC_DAI_BFS_DIV,
229 .fs = 544,
230 .bfs = WM8750_HIFI_FSB,
231 },
148 232
149 /* 32k */ 233 /* 32k */
150 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 234 {
151 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 235 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
152 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 384, WM8750_HIFI_FSB}, 236 .pcmfmt = WM8750_HIFI_BITS,
153 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 237 .pcmrate = SNDRV_PCM_RATE_32000,
154 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 238 .pcmdir = WM8750_DIR,
155 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 576, WM8750_HIFI_FSB}, 239 .flags = SND_SOC_DAI_BFS_DIV,
156 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 240 .fs = 384,
157 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000, 241 .bfs = WM8750_HIFI_FSB,
158 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 375, WM8750_HIFI_FSB}, 242 },
243 {
244 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
245 .pcmfmt = WM8750_HIFI_BITS,
246 .pcmrate = SNDRV_PCM_RATE_32000,
247 .pcmdir = WM8750_DIR,
248 .flags = SND_SOC_DAI_BFS_DIV,
249 .fs = 576,
250 .bfs = WM8750_HIFI_FSB,
251 },
252 {
253 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
254 .pcmfmt = WM8750_HIFI_BITS,
255 .pcmrate = SNDRV_PCM_RATE_32000,
256 .pcmdir = WM8750_DIR,
257 .flags = SND_SOC_DAI_BFS_DIV,
258 .fs = 375,
259 .bfs = WM8750_HIFI_FSB,
260 },
159 261
160 /* 44.1k & 48k */ 262 /* 44.1k & 48k */
161 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 263 {
162 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100 | 264 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
163 SNDRV_PCM_RATE_48000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 256, 265 .pcmfmt = WM8750_HIFI_BITS,
164 WM8750_HIFI_FSB}, 266 .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
165 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 267 .pcmdir = WM8750_DIR,
166 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100 | 268 .flags = SND_SOC_DAI_BFS_DIV,
167 SNDRV_PCM_RATE_48000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 384, 269 .fs = 256,
168 WM8750_HIFI_FSB}, 270 .bfs = WM8750_HIFI_FSB,
169 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 271 },
170 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100, 272 {
171 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 272, WM8750_HIFI_FSB}, 273 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
172 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 274 .pcmfmt = WM8750_HIFI_BITS,
173 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_48000, 275 .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
174 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 250, WM8750_HIFI_FSB}, 276 .pcmdir = WM8750_DIR,
277 .flags = SND_SOC_DAI_BFS_DIV,
278 .fs = 384,
279 .bfs = WM8750_HIFI_FSB,
280 },
281 {
282 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
283 .pcmfmt = WM8750_HIFI_BITS,
284 .pcmrate = SNDRV_PCM_RATE_44100,
285 .pcmdir = WM8750_DIR,
286 .flags = SND_SOC_DAI_BFS_DIV,
287 .fs = 272,
288 .bfs = WM8750_HIFI_FSB,
289 },
290 {
291 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
292 .pcmfmt = WM8750_HIFI_BITS,
293 .pcmrate = SNDRV_PCM_RATE_48000,
294 .pcmdir = WM8750_DIR,
295 .flags = SND_SOC_DAI_BFS_DIV,
296 .fs = 250,
297 .bfs = WM8750_HIFI_FSB,
298 },
175 299
176 /* 88.2k & 96k */ 300 /* 88.2k & 96k */
177 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 301 {
178 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200 | 302 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
179 SNDRV_PCM_RATE_96000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 128, 303 .pcmfmt = WM8750_HIFI_BITS,
180 WM8750_HIFI_FSB}, 304 .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
181 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 305 .pcmdir = WM8750_DIR,
182 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200 | 306 .flags = SND_SOC_DAI_BFS_DIV,
183 SNDRV_PCM_RATE_96000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 192, 307 .fs = 128,
184 WM8750_HIFI_FSB}, 308 .bfs = WM8750_HIFI_FSB,
185 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 309 },
186 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200, 310 {
187 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 136, WM8750_HIFI_FSB}, 311 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
188 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM, 312 .pcmfmt = WM8750_HIFI_BITS,
189 SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_96000, 313 .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
190 WM8750_DIR, SND_SOC_DAI_BFS_DIV, 125, WM8750_HIFI_FSB}, 314 .pcmdir = WM8750_DIR,
315 .flags = SND_SOC_DAI_BFS_DIV,
316 .fs = 192,
317 .bfs = WM8750_HIFI_FSB,
318 },
319 {
320 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
321 .pcmfmt = WM8750_HIFI_BITS,
322 .pcmrate = SNDRV_PCM_RATE_88200,
323 .pcmdir = WM8750_DIR,
324 .flags = SND_SOC_DAI_BFS_DIV,
325 .fs = 136,
326 .bfs = WM8750_HIFI_FSB,
327 },
328 {
329 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
330 .pcmfmt = WM8750_HIFI_BITS,
331 .pcmrate = SNDRV_PCM_RATE_96000,
332 .pcmdir = WM8750_DIR,
333 .flags = SND_SOC_DAI_BFS_DIV,
334 .fs = 125,
335 .bfs = WM8750_HIFI_FSB,
336 },
191 337
192 /* codec frame and clock slave modes */ 338 /* codec frame and clock slave modes */
193 {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBS_CFS, SND_SOC_DAITDM_LRDW(0,0), 339 {
194 WM8750_HIFI_BITS, WM8750_HIFI_RATES, WM8750_DIR, 340 .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBS_CFS,
195 SND_SOC_DAI_BFS_DIV, SND_SOC_FS_ALL, SND_SOC_FSBD_ALL}, 341 .pcmfmt = WM8750_HIFI_BITS,
342 .pcmrate = WM8750_HIFI_RATES,
343 .pcmdir = WM8750_DIR,
344 .flags = SND_SOC_DAI_BFS_DIV,
345 .fs = SND_SOC_FS_ALL,
346 .bfs = SND_SOC_FSBD_ALL,
347 },
196}; 348};
197 349
198/* 350/*