xref: /openbmc/linux/sound/firewire/bebob/bebob.c (revision 8dfb839c)
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. */
36 #define INFO_OFFSET_BEBOB_VERSION	0x08
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
44 #define VEN_MACKIE1	0x0000000f
45 #define VEN_MACKIE2	0x00000ff2
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
57 #define VEN_TERRATEC	0x00000aac
58 #define VEN_YAMAHA	0x0000a0de
59 #define VEN_FOCUSRITE	0x0000130e
60 #define VEN_MAUDIO1	0x00000d6c
61 #define VEN_MAUDIO2	0x000007f5
62 #define VEN_DIGIDESIGN	0x00a07e
63 
64 #define MODEL_FOCUSRITE_SAFFIRE_BOTH	0x00000000
65 #define MODEL_MAUDIO_AUDIOPHILE_BOTH	0x00010060
66 #define MODEL_MAUDIO_FW1814		0x00010071
67 #define MODEL_MAUDIO_PROJECTMIX		0x00010091
68 
69 static int
70 name_device(struct snd_bebob *bebob)
71 {
72 	struct fw_device *fw_dev = fw_parent_device(bebob->unit);
73 	char vendor[24] = {0};
74 	char model[32] = {0};
75 	u32 hw_id;
76 	u32 data[2] = {0};
77 	u32 revision;
78 	u32 version;
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,
95 				  &hw_id);
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 
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 
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",
122 		 vendor, model, hw_id, revision,
123 		 data[0], data[1], dev_name(&bebob->unit->device),
124 		 100 << fw_dev->max_speed);
125 end:
126 	return err;
127 }
128 
129 static void bebob_free(struct snd_bebob *bebob)
130 {
131 	snd_bebob_stream_destroy_duplex(bebob);
132 	fw_unit_put(bebob->unit);
133 
134 	kfree(bebob->maudio_special_quirk);
135 
136 	mutex_destroy(&bebob->mutex);
137 	kfree(bebob);
138 }
139 
140 /*
141  * This module releases the FireWire unit data after all ALSA character devices
142  * are released by applications. This is for releasing stream data or finishing
143  * transactions safely. Thus at returning from .remove(), this module still keep
144  * references for the unit.
145  */
146 static void
147 bebob_card_free(struct snd_card *card)
148 {
149 	struct snd_bebob *bebob = card->private_data;
150 
151 	mutex_lock(&devices_mutex);
152 	clear_bit(bebob->card_index, devices_used);
153 	mutex_unlock(&devices_mutex);
154 
155 	bebob_free(card->private_data);
156 }
157 
158 static const struct snd_bebob_spec *
159 get_saffire_spec(struct fw_unit *unit)
160 {
161 	char name[24] = {0};
162 
163 	if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
164 		return NULL;
165 
166 	if (strcmp(name, "SaffireLE") == 0)
167 		return &saffire_le_spec;
168 	else
169 		return &saffire_spec;
170 }
171 
172 static bool
173 check_audiophile_booted(struct fw_unit *unit)
174 {
175 	char name[28] = {0};
176 
177 	if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
178 		return false;
179 
180 	return strncmp(name, "FW Audiophile Bootloader", 24) != 0;
181 }
182 
183 static void
184 do_registration(struct work_struct *work)
185 {
186 	struct snd_bebob *bebob =
187 			container_of(work, struct snd_bebob, dwork.work);
188 	unsigned int card_index;
189 	int err;
190 
191 	if (bebob->registered)
192 		return;
193 
194 	mutex_lock(&devices_mutex);
195 
196 	for (card_index = 0; card_index < SNDRV_CARDS; card_index++) {
197 		if (!test_bit(card_index, devices_used) && enable[card_index])
198 			break;
199 	}
200 	if (card_index >= SNDRV_CARDS) {
201 		mutex_unlock(&devices_mutex);
202 		return;
203 	}
204 
205 	err = snd_card_new(&bebob->unit->device, index[card_index],
206 			   id[card_index], THIS_MODULE, 0, &bebob->card);
207 	if (err < 0) {
208 		mutex_unlock(&devices_mutex);
209 		return;
210 	}
211 
212 	err = name_device(bebob);
213 	if (err < 0)
214 		goto error;
215 
216 	if (bebob->spec == &maudio_special_spec) {
217 		if (bebob->entry->model_id == MODEL_MAUDIO_FW1814)
218 			err = snd_bebob_maudio_special_discover(bebob, true);
219 		else
220 			err = snd_bebob_maudio_special_discover(bebob, false);
221 	} else {
222 		err = snd_bebob_stream_discover(bebob);
223 	}
224 	if (err < 0)
225 		goto error;
226 
227 	err = snd_bebob_stream_init_duplex(bebob);
228 	if (err < 0)
229 		goto error;
230 
231 	snd_bebob_proc_init(bebob);
232 
233 	if (bebob->midi_input_ports > 0 || bebob->midi_output_ports > 0) {
234 		err = snd_bebob_create_midi_devices(bebob);
235 		if (err < 0)
236 			goto error;
237 	}
238 
239 	err = snd_bebob_create_pcm_devices(bebob);
240 	if (err < 0)
241 		goto error;
242 
243 	err = snd_bebob_create_hwdep_device(bebob);
244 	if (err < 0)
245 		goto error;
246 
247 	err = snd_card_register(bebob->card);
248 	if (err < 0)
249 		goto error;
250 
251 	set_bit(card_index, devices_used);
252 	mutex_unlock(&devices_mutex);
253 
254 	/*
255 	 * After registered, bebob instance can be released corresponding to
256 	 * releasing the sound card instance.
257 	 */
258 	bebob->card->private_free = bebob_card_free;
259 	bebob->card->private_data = bebob;
260 	bebob->registered = true;
261 
262 	return;
263 error:
264 	mutex_unlock(&devices_mutex);
265 	snd_bebob_stream_destroy_duplex(bebob);
266 	kfree(bebob->maudio_special_quirk);
267 	bebob->maudio_special_quirk = NULL;
268 	snd_card_free(bebob->card);
269 	dev_info(&bebob->unit->device,
270 		 "Sound card registration failed: %d\n", err);
271 }
272 
273 static int
274 bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry)
275 {
276 	struct snd_bebob *bebob;
277 	const struct snd_bebob_spec *spec;
278 
279 	if (entry->vendor_id == VEN_FOCUSRITE &&
280 	    entry->model_id == MODEL_FOCUSRITE_SAFFIRE_BOTH)
281 		spec = get_saffire_spec(unit);
282 	else if (entry->vendor_id == VEN_MAUDIO1 &&
283 		 entry->model_id == MODEL_MAUDIO_AUDIOPHILE_BOTH &&
284 		 !check_audiophile_booted(unit))
285 		spec = NULL;
286 	else
287 		spec = (const struct snd_bebob_spec *)entry->driver_data;
288 
289 	if (spec == NULL) {
290 		if (entry->vendor_id == VEN_MAUDIO1 ||
291 		    entry->vendor_id == VEN_MAUDIO2)
292 			return snd_bebob_maudio_load_firmware(unit);
293 		else
294 			return -ENODEV;
295 	}
296 
297 	/* Allocate this independent of sound card instance. */
298 	bebob = kzalloc(sizeof(struct snd_bebob), GFP_KERNEL);
299 	if (bebob == NULL)
300 		return -ENOMEM;
301 
302 	bebob->unit = fw_unit_get(unit);
303 	bebob->entry = entry;
304 	bebob->spec = spec;
305 	dev_set_drvdata(&unit->device, bebob);
306 
307 	mutex_init(&bebob->mutex);
308 	spin_lock_init(&bebob->lock);
309 	init_waitqueue_head(&bebob->hwdep_wait);
310 
311 	/* Allocate and register this sound card later. */
312 	INIT_DEFERRABLE_WORK(&bebob->dwork, do_registration);
313 
314 	if (entry->vendor_id != VEN_MAUDIO1 ||
315 	    (entry->model_id != MODEL_MAUDIO_FW1814 &&
316 	     entry->model_id != MODEL_MAUDIO_PROJECTMIX)) {
317 		snd_fw_schedule_registration(unit, &bebob->dwork);
318 	} else {
319 		/*
320 		 * This is a workaround. This bus reset seems to have an effect
321 		 * to make devices correctly handling transactions. Without
322 		 * this, the devices have gap_count mismatch. This causes much
323 		 * failure of transaction.
324 		 *
325 		 * Just after registration, user-land application receive
326 		 * signals from dbus and starts I/Os. To avoid I/Os till the
327 		 * future bus reset, registration is done in next update().
328 		 */
329 		fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card,
330 				      false, true);
331 	}
332 
333 	return 0;
334 }
335 
336 /*
337  * This driver doesn't update streams in bus reset handler.
338  *
339  * DM1000/ DM1100/DM1500 chipsets with BeBoB firmware transfer packets with
340  * discontinued counter at bus reset. This discontinuity is immediately
341  * detected in packet streaming layer, then it sets XRUN to PCM substream.
342  *
343  * ALSA PCM applications can know the XRUN by getting -EPIPE from PCM operation.
344  * Then, they can recover the PCM substream by executing ioctl(2) with
345  * SNDRV_PCM_IOCTL_PREPARE. 'struct snd_pcm_ops.prepare' is called and drivers
346  * restart packet streaming.
347  *
348  * The above processing may be executed before this bus-reset handler is
349  * executed. When this handler updates streams with current isochronous
350  * channels, the streams already have the current ones.
351  */
352 static void
353 bebob_update(struct fw_unit *unit)
354 {
355 	struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
356 
357 	if (bebob == NULL)
358 		return;
359 
360 	/* Postpone a workqueue for deferred registration. */
361 	if (!bebob->registered)
362 		snd_fw_schedule_registration(unit, &bebob->dwork);
363 	else
364 		fcp_bus_reset(bebob->unit);
365 }
366 
367 static void bebob_remove(struct fw_unit *unit)
368 {
369 	struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
370 
371 	if (bebob == NULL)
372 		return;
373 
374 	/*
375 	 * Confirm to stop the work for registration before the sound card is
376 	 * going to be released. The work is not scheduled again because bus
377 	 * reset handler is not called anymore.
378 	 */
379 	cancel_delayed_work_sync(&bebob->dwork);
380 
381 	if (bebob->registered) {
382 		/* No need to wait for releasing card object in this context. */
383 		snd_card_free_when_closed(bebob->card);
384 	} else {
385 		/* Don't forget this case. */
386 		bebob_free(bebob);
387 	}
388 }
389 
390 static const struct snd_bebob_rate_spec normal_rate_spec = {
391 	.get	= &snd_bebob_stream_get_rate,
392 	.set	= &snd_bebob_stream_set_rate
393 };
394 static const struct snd_bebob_spec spec_normal = {
395 	.clock	= NULL,
396 	.rate	= &normal_rate_spec,
397 	.meter	= NULL
398 };
399 
400 static const struct ieee1394_device_id bebob_id_table[] = {
401 	/* Edirol, FA-66 */
402 	SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010049, &spec_normal),
403 	/* Edirol, FA-101 */
404 	SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010048, &spec_normal),
405 	/* Presonus, FIREBOX */
406 	SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010000, &spec_normal),
407 	/* PreSonus, FIREPOD/FP10 */
408 	SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010066, &spec_normal),
409 	/* PreSonus, Inspire1394 */
410 	SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010001, &spec_normal),
411 	/* BridgeCo, RDAudio1 */
412 	SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010048, &spec_normal),
413 	/* BridgeCo, Audio5 */
414 	SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal),
415 	/* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */
416 	SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal),
417 	/* Mackie, d.2 (Firewire Option) */
418 	SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal),
419 	/* Stanton, ScratchAmp */
420 	SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal),
421 	/* Tascam, IF-FW DM */
422 	SND_BEBOB_DEV_ENTRY(VEN_TASCAM, 0x00010067, &spec_normal),
423 	/* Behringer, XENIX UFX 1204 */
424 	SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001204, &spec_normal),
425 	/* Behringer, XENIX UFX 1604 */
426 	SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001604, &spec_normal),
427 	/* Behringer, Digital Mixer X32 series (X-UF Card) */
428 	SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00000006, &spec_normal),
429 	/*  Behringer, F-Control Audio 1616 */
430 	SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x001616, &spec_normal),
431 	/*  Behringer, F-Control Audio 610 */
432 	SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x000610, &spec_normal),
433 	/* Apogee Electronics, Rosetta 200/400 (X-FireWire card) */
434 	/* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */
435 	SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00010048, &spec_normal),
436 	/* Apogee Electronics, Ensemble */
437 	SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00001eee, &spec_normal),
438 	/* ESI, Quatafire610 */
439 	SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal),
440 	/* AcousticReality, eARMasterOne */
441 	SND_BEBOB_DEV_ENTRY(VEN_ACOUSTIC, 0x00000002, &spec_normal),
442 	/* CME, MatrixKFW */
443 	SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal),
444 	/* Phonic, Helix Board 12 MkII */
445 	SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00050000, &spec_normal),
446 	/* Phonic, Helix Board 18 MkII */
447 	SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00060000, &spec_normal),
448 	/* Phonic, Helix Board 24 MkII */
449 	SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00070000, &spec_normal),
450 	/* Phonic, Helix Board 12 Universal/18 Universal/24 Universal */
451 	SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00000000, &spec_normal),
452 	/* Lynx, Aurora 8/16 (LT-FW) */
453 	SND_BEBOB_DEV_ENTRY(VEN_LYNX, 0x00000001, &spec_normal),
454 	/* ICON, FireXon */
455 	SND_BEBOB_DEV_ENTRY(VEN_ICON, 0x00000001, &spec_normal),
456 	/* PrismSound, Orpheus */
457 	SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal),
458 	/* PrismSound, ADA-8XR */
459 	SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal),
460 	/* TerraTec Electronic GmbH, PHASE 88 Rack FW */
461 	SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec),
462 	/* TerraTec Electronic GmbH, PHASE 24 FW */
463 	SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &yamaha_terratec_spec),
464 	/* TerraTec Electronic GmbH, Phase X24 FW */
465 	SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &yamaha_terratec_spec),
466 	/* TerraTec Electronic GmbH, EWS MIC2/MIC8 */
467 	SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal),
468 	/* Terratec Electronic GmbH, Aureon 7.1 Firewire */
469 	SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal),
470 	/* Yamaha, GO44 */
471 	SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_terratec_spec),
472 	/* YAMAHA, GO46 */
473 	SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_terratec_spec),
474 	/* Focusrite, SaffirePro 26 I/O */
475 	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec),
476 	/* Focusrite, SaffirePro 10 I/O */
477 	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000006, &saffirepro_10_spec),
478 	/* Focusrite, Saffire(no label and LE) */
479 	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH,
480 			    &saffire_spec),
481 	/* M-Audio, Firewire 410 */
482 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010058, NULL),	/* bootloader */
483 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010046, &maudio_fw410_spec),
484 	/* M-Audio, Firewire Audiophile */
485 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_AUDIOPHILE_BOTH,
486 			    &maudio_audiophile_spec),
487 	/* M-Audio, Firewire Solo */
488 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010062, &maudio_solo_spec),
489 	/* M-Audio, Ozonic */
490 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x0000000a, &maudio_ozonic_spec),
491 	/* M-Audio NRV10 */
492 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec),
493 	/* M-Audio, ProFireLightbridge */
494 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x000100a1, &spec_normal),
495 	/* Firewire 1814 */
496 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL),	/* bootloader */
497 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814,
498 			    &maudio_special_spec),
499 	/* M-Audio ProjectMix */
500 	SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROJECTMIX,
501 			    &maudio_special_spec),
502 	/* Digidesign Mbox 2 Pro */
503 	SND_BEBOB_DEV_ENTRY(VEN_DIGIDESIGN, 0x0000a9, &spec_normal),
504 	/* IDs are unknown but able to be supported */
505 	/*  Apogee, Mini-ME Firewire */
506 	/*  Apogee, Mini-DAC Firewire */
507 	/*  Cakawalk, Sonar Power Studio 66 */
508 	/*  CME, UF400e */
509 	/*  ESI, Quotafire XL */
510 	/*  Infrasonic, DewX */
511 	/*  Infrasonic, Windy6 */
512 	/*  Mackie, Digital X Bus x.200 */
513 	/*  Mackie, Digital X Bus x.400 */
514 	/*  Phonic, HB 12 */
515 	/*  Phonic, HB 24 */
516 	/*  Phonic, HB 18 */
517 	/*  Phonic, FireFly 202 */
518 	/*  Phonic, FireFly 302 */
519 	/*  Rolf Spuler, Firewire Guitar */
520 	{}
521 };
522 MODULE_DEVICE_TABLE(ieee1394, bebob_id_table);
523 
524 static struct fw_driver bebob_driver = {
525 	.driver = {
526 		.owner	= THIS_MODULE,
527 		.name	= "snd-bebob",
528 		.bus	= &fw_bus_type,
529 	},
530 	.probe    = bebob_probe,
531 	.update	  = bebob_update,
532 	.remove   = bebob_remove,
533 	.id_table = bebob_id_table,
534 };
535 
536 static int __init
537 snd_bebob_init(void)
538 {
539 	return driver_register(&bebob_driver.driver);
540 }
541 
542 static void __exit
543 snd_bebob_exit(void)
544 {
545 	driver_unregister(&bebob_driver.driver);
546 }
547 
548 module_init(snd_bebob_init);
549 module_exit(snd_bebob_exit);
550