Commit | Line | Data |
---|---|---|
fd6f4b0d TS |
1 | /* |
2 | * bebob.c - a part of driver for BeBoB based devices | |
3 | * | |
4 | * Copyright (c) 2013-2014 Takashi Sakamoto | |
5 | * | |
6 | * Licensed under the terms of the GNU General Public License, version 2. | |
7 | */ | |
8 | ||
9 | /* | |
10 | * BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire | |
11 | * devices with DM1000/DM1100/DM1500 chipset. It gives common way for host | |
12 | * system to handle BeBoB based devices. | |
13 | */ | |
14 | ||
15 | #include "bebob.h" | |
16 | ||
17 | MODULE_DESCRIPTION("BridgeCo BeBoB driver"); | |
18 | MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>"); | |
19 | MODULE_LICENSE("GPL v2"); | |
20 | ||
21 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | |
22 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | |
23 | static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | |
24 | ||
25 | module_param_array(index, int, NULL, 0444); | |
26 | MODULE_PARM_DESC(index, "card index"); | |
27 | module_param_array(id, charp, NULL, 0444); | |
28 | MODULE_PARM_DESC(id, "ID string"); | |
29 | module_param_array(enable, bool, NULL, 0444); | |
30 | MODULE_PARM_DESC(enable, "enable BeBoB sound card"); | |
31 | ||
32 | static DEFINE_MUTEX(devices_mutex); | |
33 | static DECLARE_BITMAP(devices_used, SNDRV_CARDS); | |
34 | ||
35 | /* Offsets from information register. */ | |
7b4d7dcf | 36 | #define INFO_OFFSET_BEBOB_VERSION 0x08 |
fd6f4b0d TS |
37 | #define INFO_OFFSET_GUID 0x10 |
38 | #define INFO_OFFSET_HW_MODEL_ID 0x18 | |
39 | #define INFO_OFFSET_HW_MODEL_REVISION 0x1c | |
40 | ||
41 | #define VEN_EDIROL 0x000040ab | |
42 | #define VEN_PRESONUS 0x00000a92 | |
43 | #define VEN_BRIDGECO 0x000007f5 | |
425a570e TS |
44 | #define VEN_MACKIE1 0x0000000f |
45 | #define VEN_MACKIE2 0x00000ff2 | |
fd6f4b0d TS |
46 | #define VEN_STANTON 0x00001260 |
47 | #define VEN_TASCAM 0x0000022e | |
48 | #define VEN_BEHRINGER 0x00001564 | |
49 | #define VEN_APOGEE 0x000003db | |
50 | #define VEN_ESI 0x00000f1b | |
51 | #define VEN_ACOUSTIC 0x00000002 | |
52 | #define VEN_CME 0x0000000a | |
53 | #define VEN_PHONIC 0x00001496 | |
54 | #define VEN_LYNX 0x000019e5 | |
55 | #define VEN_ICON 0x00001a9e | |
56 | #define VEN_PRISMSOUND 0x00001198 | |
326b9cac | 57 | #define VEN_TERRATEC 0x00000aac |
8ac98a35 | 58 | #define VEN_YAMAHA 0x0000a0de |
25784ec2 | 59 | #define VEN_FOCUSRITE 0x0000130e |
9076c22d TS |
60 | #define VEN_MAUDIO1 0x00000d6c |
61 | #define VEN_MAUDIO2 0x000007f5 | |
146a5e3c | 62 | #define VEN_DIGIDESIGN 0x00a07e |
25784ec2 TS |
63 | |
64 | #define MODEL_FOCUSRITE_SAFFIRE_BOTH 0x00000000 | |
9076c22d | 65 | #define MODEL_MAUDIO_AUDIOPHILE_BOTH 0x00010060 |
3149ac48 TS |
66 | #define MODEL_MAUDIO_FW1814 0x00010071 |
67 | #define MODEL_MAUDIO_PROJECTMIX 0x00010091 | |
fd6f4b0d TS |
68 | |
69 | static int | |
093dd449 | 70 | name_device(struct snd_bebob *bebob) |
fd6f4b0d TS |
71 | { |
72 | struct fw_device *fw_dev = fw_parent_device(bebob->unit); | |
73 | char vendor[24] = {0}; | |
74 | char model[32] = {0}; | |
791c67b4 | 75 | u32 hw_id; |
fd6f4b0d TS |
76 | u32 data[2] = {0}; |
77 | u32 revision; | |
7b4d7dcf | 78 | u32 version; |
fd6f4b0d TS |
79 | int err; |
80 | ||
81 | /* get vendor name from root directory */ | |
82 | err = fw_csr_string(fw_dev->config_rom + 5, CSR_VENDOR, | |
83 | vendor, sizeof(vendor)); | |
84 | if (err < 0) | |
85 | goto end; | |
86 | ||
87 | /* get model name from unit directory */ | |
88 | err = fw_csr_string(bebob->unit->directory, CSR_MODEL, | |
89 | model, sizeof(model)); | |
90 | if (err < 0) | |
91 | goto end; | |
92 | ||
93 | /* get hardware id */ | |
94 | err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_ID, | |
791c67b4 | 95 | &hw_id); |
fd6f4b0d TS |
96 | if (err < 0) |
97 | goto end; | |
98 | ||
99 | /* get hardware revision */ | |
100 | err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_REVISION, | |
101 | &revision); | |
102 | if (err < 0) | |
103 | goto end; | |
104 | ||
105 | /* get GUID */ | |
106 | err = snd_bebob_read_block(bebob->unit, INFO_OFFSET_GUID, | |
107 | data, sizeof(data)); | |
108 | if (err < 0) | |
109 | goto end; | |
110 | ||
7b4d7dcf TS |
111 | err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_BEBOB_VERSION, |
112 | &version); | |
113 | if (err < 0) | |
114 | goto end; | |
115 | bebob->version = version; | |
116 | ||
fd6f4b0d TS |
117 | strcpy(bebob->card->driver, "BeBoB"); |
118 | strcpy(bebob->card->shortname, model); | |
119 | strcpy(bebob->card->mixername, model); | |
120 | snprintf(bebob->card->longname, sizeof(bebob->card->longname), | |
121 | "%s %s (id:%d, rev:%d), GUID %08x%08x at %s, S%d", | |
791c67b4 | 122 | vendor, model, hw_id, revision, |
fd6f4b0d TS |
123 | data[0], data[1], dev_name(&bebob->unit->device), |
124 | 100 << fw_dev->max_speed); | |
125 | end: | |
126 | return err; | |
127 | } | |
128 | ||
3babca45 TS |
129 | static void |
130 | bebob_card_free(struct snd_card *card) | |
04a2c73c | 131 | { |
3babca45 TS |
132 | struct snd_bebob *bebob = card->private_data; |
133 | ||
873608dc TS |
134 | mutex_lock(&devices_mutex); |
135 | clear_bit(bebob->card_index, devices_used); | |
136 | mutex_unlock(&devices_mutex); | |
137 | ||
04a2c73c | 138 | snd_bebob_stream_destroy_duplex(bebob); |
04a2c73c TS |
139 | } |
140 | ||
25784ec2 TS |
141 | static const struct snd_bebob_spec * |
142 | get_saffire_spec(struct fw_unit *unit) | |
143 | { | |
144 | char name[24] = {0}; | |
145 | ||
146 | if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0) | |
147 | return NULL; | |
148 | ||
149 | if (strcmp(name, "SaffireLE") == 0) | |
150 | return &saffire_le_spec; | |
151 | else | |
152 | return &saffire_spec; | |
153 | } | |
154 | ||
9076c22d TS |
155 | static bool |
156 | check_audiophile_booted(struct fw_unit *unit) | |
157 | { | |
2e57069c | 158 | char name[28] = {0}; |
9076c22d TS |
159 | |
160 | if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0) | |
161 | return false; | |
162 | ||
2e57069c | 163 | return strncmp(name, "FW Audiophile Bootloader", 24) != 0; |
9076c22d TS |
164 | } |
165 | ||
04a2c73c TS |
166 | static void |
167 | do_registration(struct work_struct *work) | |
fd6f4b0d | 168 | { |
04a2c73c TS |
169 | struct snd_bebob *bebob = |
170 | container_of(work, struct snd_bebob, dwork.work); | |
fd6f4b0d TS |
171 | unsigned int card_index; |
172 | int err; | |
173 | ||
04a2c73c TS |
174 | if (bebob->registered) |
175 | return; | |
176 | ||
fd6f4b0d | 177 | mutex_lock(&devices_mutex); |
fd6f4b0d TS |
178 | for (card_index = 0; card_index < SNDRV_CARDS; card_index++) { |
179 | if (!test_bit(card_index, devices_used) && enable[card_index]) | |
180 | break; | |
181 | } | |
182 | if (card_index >= SNDRV_CARDS) { | |
04a2c73c TS |
183 | mutex_unlock(&devices_mutex); |
184 | return; | |
fd6f4b0d TS |
185 | } |
186 | ||
04a2c73c TS |
187 | err = snd_card_new(&bebob->unit->device, index[card_index], |
188 | id[card_index], THIS_MODULE, 0, &bebob->card); | |
189 | if (err < 0) { | |
190 | mutex_unlock(&devices_mutex); | |
191 | return; | |
1fc9522a | 192 | } |
873608dc TS |
193 | set_bit(card_index, devices_used); |
194 | mutex_unlock(&devices_mutex); | |
1fc9522a | 195 | |
3babca45 TS |
196 | bebob->card->private_free = bebob_card_free; |
197 | bebob->card->private_data = bebob; | |
198 | ||
093dd449 | 199 | err = name_device(bebob); |
fd6f4b0d TS |
200 | if (err < 0) |
201 | goto error; | |
202 | ||
04a2c73c TS |
203 | if (bebob->spec == &maudio_special_spec) { |
204 | if (bebob->entry->model_id == MODEL_MAUDIO_FW1814) | |
205 | err = snd_bebob_maudio_special_discover(bebob, true); | |
206 | else | |
207 | err = snd_bebob_maudio_special_discover(bebob, false); | |
208 | } else { | |
3149ac48 | 209 | err = snd_bebob_stream_discover(bebob); |
04a2c73c TS |
210 | } |
211 | if (err < 0) | |
212 | goto error; | |
213 | ||
214 | err = snd_bebob_stream_init_duplex(bebob); | |
fd6f4b0d TS |
215 | if (err < 0) |
216 | goto error; | |
eb7b3a05 | 217 | |
ad9697ba TS |
218 | snd_bebob_proc_init(bebob); |
219 | ||
04a2c73c | 220 | if (bebob->midi_input_ports > 0 || bebob->midi_output_ports > 0) { |
248b7802 TS |
221 | err = snd_bebob_create_midi_devices(bebob); |
222 | if (err < 0) | |
223 | goto error; | |
224 | } | |
225 | ||
fbbebd2c TS |
226 | err = snd_bebob_create_pcm_devices(bebob); |
227 | if (err < 0) | |
228 | goto error; | |
229 | ||
618eabea TS |
230 | err = snd_bebob_create_hwdep_device(bebob); |
231 | if (err < 0) | |
232 | goto error; | |
233 | ||
04a2c73c | 234 | err = snd_card_register(bebob->card); |
eb7b3a05 TS |
235 | if (err < 0) |
236 | goto error; | |
237 | ||
04a2c73c TS |
238 | bebob->registered = true; |
239 | ||
240 | return; | |
241 | error: | |
04a2c73c TS |
242 | snd_card_free(bebob->card); |
243 | dev_info(&bebob->unit->device, | |
244 | "Sound card registration failed: %d\n", err); | |
245 | } | |
246 | ||
247 | static int | |
248 | bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry) | |
249 | { | |
250 | struct snd_bebob *bebob; | |
251 | const struct snd_bebob_spec *spec; | |
252 | ||
253 | if (entry->vendor_id == VEN_FOCUSRITE && | |
254 | entry->model_id == MODEL_FOCUSRITE_SAFFIRE_BOTH) | |
255 | spec = get_saffire_spec(unit); | |
256 | else if (entry->vendor_id == VEN_MAUDIO1 && | |
257 | entry->model_id == MODEL_MAUDIO_AUDIOPHILE_BOTH && | |
258 | !check_audiophile_booted(unit)) | |
259 | spec = NULL; | |
260 | else | |
261 | spec = (const struct snd_bebob_spec *)entry->driver_data; | |
262 | ||
263 | if (spec == NULL) { | |
264 | if (entry->vendor_id == VEN_MAUDIO1 || | |
265 | entry->vendor_id == VEN_MAUDIO2) | |
266 | return snd_bebob_maudio_load_firmware(unit); | |
267 | else | |
268 | return -ENODEV; | |
269 | } | |
270 | ||
271 | /* Allocate this independent of sound card instance. */ | |
366a20d7 TS |
272 | bebob = devm_kzalloc(&unit->device, sizeof(struct snd_bebob), |
273 | GFP_KERNEL); | |
274 | if (!bebob) | |
04a2c73c | 275 | return -ENOMEM; |
04a2c73c | 276 | bebob->unit = fw_unit_get(unit); |
04a2c73c TS |
277 | dev_set_drvdata(&unit->device, bebob); |
278 | ||
366a20d7 TS |
279 | bebob->entry = entry; |
280 | bebob->spec = spec; | |
04a2c73c TS |
281 | mutex_init(&bebob->mutex); |
282 | spin_lock_init(&bebob->lock); | |
283 | init_waitqueue_head(&bebob->hwdep_wait); | |
284 | ||
285 | /* Allocate and register this sound card later. */ | |
286 | INIT_DEFERRABLE_WORK(&bebob->dwork, do_registration); | |
287 | ||
288 | if (entry->vendor_id != VEN_MAUDIO1 || | |
289 | (entry->model_id != MODEL_MAUDIO_FW1814 && | |
290 | entry->model_id != MODEL_MAUDIO_PROJECTMIX)) { | |
291 | snd_fw_schedule_registration(unit, &bebob->dwork); | |
9b1ee0b2 TS |
292 | } else { |
293 | /* | |
294 | * This is a workaround. This bus reset seems to have an effect | |
295 | * to make devices correctly handling transactions. Without | |
296 | * this, the devices have gap_count mismatch. This causes much | |
297 | * failure of transaction. | |
298 | * | |
299 | * Just after registration, user-land application receive | |
300 | * signals from dbus and starts I/Os. To avoid I/Os till the | |
301 | * future bus reset, registration is done in next update(). | |
302 | */ | |
9b1ee0b2 TS |
303 | fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card, |
304 | false, true); | |
eb7b3a05 TS |
305 | } |
306 | ||
04a2c73c | 307 | return 0; |
fd6f4b0d TS |
308 | } |
309 | ||
3800e6f9 TS |
310 | /* |
311 | * This driver doesn't update streams in bus reset handler. | |
312 | * | |
313 | * DM1000/ DM1100/DM1500 chipsets with BeBoB firmware transfer packets with | |
314 | * discontinued counter at bus reset. This discontinuity is immediately | |
315 | * detected in packet streaming layer, then it sets XRUN to PCM substream. | |
316 | * | |
317 | * ALSA PCM applications can know the XRUN by getting -EPIPE from PCM operation. | |
318 | * Then, they can recover the PCM substream by executing ioctl(2) with | |
319 | * SNDRV_PCM_IOCTL_PREPARE. 'struct snd_pcm_ops.prepare' is called and drivers | |
320 | * restart packet streaming. | |
321 | * | |
322 | * The above processing may be executed before this bus-reset handler is | |
323 | * executed. When this handler updates streams with current isochronous | |
324 | * channels, the streams already have the current ones. | |
325 | */ | |
fd6f4b0d TS |
326 | static void |
327 | bebob_update(struct fw_unit *unit) | |
328 | { | |
329 | struct snd_bebob *bebob = dev_get_drvdata(&unit->device); | |
9076c22d TS |
330 | |
331 | if (bebob == NULL) | |
332 | return; | |
333 | ||
04a2c73c TS |
334 | /* Postpone a workqueue for deferred registration. */ |
335 | if (!bebob->registered) | |
336 | snd_fw_schedule_registration(unit, &bebob->dwork); | |
337 | else | |
338 | fcp_bus_reset(bebob->unit); | |
fd6f4b0d TS |
339 | } |
340 | ||
341 | static void bebob_remove(struct fw_unit *unit) | |
342 | { | |
343 | struct snd_bebob *bebob = dev_get_drvdata(&unit->device); | |
9076c22d TS |
344 | |
345 | if (bebob == NULL) | |
346 | return; | |
347 | ||
04a2c73c TS |
348 | /* |
349 | * Confirm to stop the work for registration before the sound card is | |
350 | * going to be released. The work is not scheduled again because bus | |
351 | * reset handler is not called anymore. | |
352 | */ | |
353 | cancel_delayed_work_sync(&bebob->dwork); | |
354 | ||
355 | if (bebob->registered) { | |
61ccc6f6 TS |
356 | // Block till all of ALSA character devices are released. |
357 | snd_card_free(bebob->card); | |
04a2c73c | 358 | } |
5b14ec25 TS |
359 | |
360 | mutex_destroy(&bebob->mutex); | |
361 | fw_unit_put(bebob->unit); | |
fd6f4b0d TS |
362 | } |
363 | ||
6b9866c8 | 364 | static const struct snd_bebob_rate_spec normal_rate_spec = { |
1fc9522a TS |
365 | .get = &snd_bebob_stream_get_rate, |
366 | .set = &snd_bebob_stream_set_rate | |
367 | }; | |
368 | static const struct snd_bebob_spec spec_normal = { | |
369 | .clock = NULL, | |
370 | .rate = &normal_rate_spec, | |
371 | .meter = NULL | |
372 | }; | |
373 | ||
fd6f4b0d TS |
374 | static const struct ieee1394_device_id bebob_id_table[] = { |
375 | /* Edirol, FA-66 */ | |
1fc9522a | 376 | SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010049, &spec_normal), |
fd6f4b0d | 377 | /* Edirol, FA-101 */ |
1fc9522a | 378 | SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010048, &spec_normal), |
fd6f4b0d | 379 | /* Presonus, FIREBOX */ |
1fc9522a | 380 | SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010000, &spec_normal), |
fd6f4b0d | 381 | /* PreSonus, FIREPOD/FP10 */ |
1fc9522a | 382 | SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010066, &spec_normal), |
fd6f4b0d | 383 | /* PreSonus, Inspire1394 */ |
1fc9522a | 384 | SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010001, &spec_normal), |
fd6f4b0d | 385 | /* BridgeCo, RDAudio1 */ |
1fc9522a | 386 | SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010048, &spec_normal), |
fd6f4b0d | 387 | /* BridgeCo, Audio5 */ |
1fc9522a | 388 | SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), |
fd6f4b0d | 389 | /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ |
425a570e | 390 | SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), |
fd6f4b0d | 391 | /* Mackie, d.2 (Firewire Option) */ |
425a570e | 392 | SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), |
fd6f4b0d | 393 | /* Stanton, ScratchAmp */ |
1fc9522a | 394 | SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), |
fd6f4b0d | 395 | /* Tascam, IF-FW DM */ |
1fc9522a | 396 | SND_BEBOB_DEV_ENTRY(VEN_TASCAM, 0x00010067, &spec_normal), |
fd6f4b0d | 397 | /* Behringer, XENIX UFX 1204 */ |
1fc9522a | 398 | SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001204, &spec_normal), |
fd6f4b0d | 399 | /* Behringer, XENIX UFX 1604 */ |
1fc9522a | 400 | SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001604, &spec_normal), |
fd6f4b0d | 401 | /* Behringer, Digital Mixer X32 series (X-UF Card) */ |
1fc9522a | 402 | SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00000006, &spec_normal), |
cf8a4719 TS |
403 | /* Behringer, F-Control Audio 1616 */ |
404 | SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x001616, &spec_normal), | |
405 | /* Behringer, F-Control Audio 610 */ | |
406 | SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x000610, &spec_normal), | |
fd6f4b0d TS |
407 | /* Apogee Electronics, Rosetta 200/400 (X-FireWire card) */ |
408 | /* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */ | |
1fc9522a | 409 | SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00010048, &spec_normal), |
fd6f4b0d | 410 | /* Apogee Electronics, Ensemble */ |
644b2e97 | 411 | SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x01eeee, &spec_normal), |
fd6f4b0d | 412 | /* ESI, Quatafire610 */ |
1fc9522a | 413 | SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal), |
fd6f4b0d | 414 | /* AcousticReality, eARMasterOne */ |
1fc9522a | 415 | SND_BEBOB_DEV_ENTRY(VEN_ACOUSTIC, 0x00000002, &spec_normal), |
fd6f4b0d | 416 | /* CME, MatrixKFW */ |
1fc9522a | 417 | SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal), |
fd6f4b0d | 418 | /* Phonic, Helix Board 12 MkII */ |
1fc9522a | 419 | SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00050000, &spec_normal), |
fd6f4b0d | 420 | /* Phonic, Helix Board 18 MkII */ |
1fc9522a | 421 | SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00060000, &spec_normal), |
fd6f4b0d | 422 | /* Phonic, Helix Board 24 MkII */ |
1fc9522a | 423 | SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00070000, &spec_normal), |
fd6f4b0d | 424 | /* Phonic, Helix Board 12 Universal/18 Universal/24 Universal */ |
1fc9522a | 425 | SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00000000, &spec_normal), |
fd6f4b0d | 426 | /* Lynx, Aurora 8/16 (LT-FW) */ |
1fc9522a | 427 | SND_BEBOB_DEV_ENTRY(VEN_LYNX, 0x00000001, &spec_normal), |
fd6f4b0d | 428 | /* ICON, FireXon */ |
1fc9522a | 429 | SND_BEBOB_DEV_ENTRY(VEN_ICON, 0x00000001, &spec_normal), |
fd6f4b0d | 430 | /* PrismSound, Orpheus */ |
1fc9522a | 431 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal), |
fd6f4b0d | 432 | /* PrismSound, ADA-8XR */ |
1fc9522a | 433 | SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal), |
326b9cac TS |
434 | /* TerraTec Electronic GmbH, PHASE 88 Rack FW */ |
435 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec), | |
436 | /* TerraTec Electronic GmbH, PHASE 24 FW */ | |
e15c282e | 437 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &yamaha_terratec_spec), |
326b9cac | 438 | /* TerraTec Electronic GmbH, Phase X24 FW */ |
e15c282e | 439 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &yamaha_terratec_spec), |
326b9cac TS |
440 | /* TerraTec Electronic GmbH, EWS MIC2/MIC8 */ |
441 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal), | |
442 | /* Terratec Electronic GmbH, Aureon 7.1 Firewire */ | |
443 | SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal), | |
8ac98a35 | 444 | /* Yamaha, GO44 */ |
e15c282e | 445 | SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_terratec_spec), |
8ac98a35 | 446 | /* YAMAHA, GO46 */ |
e15c282e | 447 | SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_terratec_spec), |
25784ec2 TS |
448 | /* Focusrite, SaffirePro 26 I/O */ |
449 | SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec), | |
450 | /* Focusrite, SaffirePro 10 I/O */ | |
7dc661bd TS |
451 | { |
452 | // The combination of vendor_id and model_id is the same as the | |
453 | // same as the one of Liquid Saffire 56. | |
454 | .match_flags = IEEE1394_MATCH_VENDOR_ID | | |
455 | IEEE1394_MATCH_MODEL_ID | | |
456 | IEEE1394_MATCH_SPECIFIER_ID | | |
457 | IEEE1394_MATCH_VERSION, | |
458 | .vendor_id = VEN_FOCUSRITE, | |
459 | .model_id = 0x000006, | |
460 | .specifier_id = 0x00a02d, | |
461 | .version = 0x010001, | |
462 | .driver_data = (kernel_ulong_t)&saffirepro_10_spec, | |
463 | }, | |
25784ec2 TS |
464 | /* Focusrite, Saffire(no label and LE) */ |
465 | SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH, | |
466 | &saffire_spec), | |
9076c22d | 467 | /* M-Audio, Firewire 410 */ |
a2b2a779 | 468 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010058, NULL), /* bootloader */ |
9076c22d TS |
469 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010046, &maudio_fw410_spec), |
470 | /* M-Audio, Firewire Audiophile */ | |
471 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_AUDIOPHILE_BOTH, | |
472 | &maudio_audiophile_spec), | |
473 | /* M-Audio, Firewire Solo */ | |
474 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010062, &maudio_solo_spec), | |
475 | /* M-Audio, Ozonic */ | |
476 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x0000000a, &maudio_ozonic_spec), | |
477 | /* M-Audio NRV10 */ | |
478 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec), | |
479 | /* M-Audio, ProFireLightbridge */ | |
480 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x000100a1, &spec_normal), | |
3149ac48 | 481 | /* Firewire 1814 */ |
a2b2a779 | 482 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL), /* bootloader */ |
3149ac48 TS |
483 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814, |
484 | &maudio_special_spec), | |
485 | /* M-Audio ProjectMix */ | |
486 | SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROJECTMIX, | |
487 | &maudio_special_spec), | |
146a5e3c TS |
488 | /* Digidesign Mbox 2 Pro */ |
489 | SND_BEBOB_DEV_ENTRY(VEN_DIGIDESIGN, 0x0000a9, &spec_normal), | |
fd6f4b0d TS |
490 | /* IDs are unknown but able to be supported */ |
491 | /* Apogee, Mini-ME Firewire */ | |
492 | /* Apogee, Mini-DAC Firewire */ | |
fd6f4b0d TS |
493 | /* Cakawalk, Sonar Power Studio 66 */ |
494 | /* CME, UF400e */ | |
495 | /* ESI, Quotafire XL */ | |
496 | /* Infrasonic, DewX */ | |
497 | /* Infrasonic, Windy6 */ | |
498 | /* Mackie, Digital X Bus x.200 */ | |
499 | /* Mackie, Digital X Bus x.400 */ | |
500 | /* Phonic, HB 12 */ | |
501 | /* Phonic, HB 24 */ | |
502 | /* Phonic, HB 18 */ | |
503 | /* Phonic, FireFly 202 */ | |
504 | /* Phonic, FireFly 302 */ | |
505 | /* Rolf Spuler, Firewire Guitar */ | |
506 | {} | |
507 | }; | |
508 | MODULE_DEVICE_TABLE(ieee1394, bebob_id_table); | |
509 | ||
510 | static struct fw_driver bebob_driver = { | |
511 | .driver = { | |
512 | .owner = THIS_MODULE, | |
513 | .name = "snd-bebob", | |
514 | .bus = &fw_bus_type, | |
515 | }, | |
516 | .probe = bebob_probe, | |
517 | .update = bebob_update, | |
518 | .remove = bebob_remove, | |
519 | .id_table = bebob_id_table, | |
520 | }; | |
521 | ||
522 | static int __init | |
523 | snd_bebob_init(void) | |
524 | { | |
525 | return driver_register(&bebob_driver.driver); | |
526 | } | |
527 | ||
528 | static void __exit | |
529 | snd_bebob_exit(void) | |
530 | { | |
531 | driver_unregister(&bebob_driver.driver); | |
fd6f4b0d TS |
532 | } |
533 | ||
534 | module_init(snd_bebob_init); | |
535 | module_exit(snd_bebob_exit); |