bebob.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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. * BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire
  10. * devices with DM1000/DM1100/DM1500 chipset. It gives common way for host
  11. * system to handle BeBoB based devices.
  12. */
  13. #include "bebob.h"
  14. MODULE_DESCRIPTION("BridgeCo BeBoB driver");
  15. MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
  16. MODULE_LICENSE("GPL v2");
  17. static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
  18. static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
  19. static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
  20. module_param_array(index, int, NULL, 0444);
  21. MODULE_PARM_DESC(index, "card index");
  22. module_param_array(id, charp, NULL, 0444);
  23. MODULE_PARM_DESC(id, "ID string");
  24. module_param_array(enable, bool, NULL, 0444);
  25. MODULE_PARM_DESC(enable, "enable BeBoB sound card");
  26. static DEFINE_MUTEX(devices_mutex);
  27. static DECLARE_BITMAP(devices_used, SNDRV_CARDS);
  28. /* Offsets from information register. */
  29. #define INFO_OFFSET_BEBOB_VERSION 0x08
  30. #define INFO_OFFSET_GUID 0x10
  31. #define INFO_OFFSET_HW_MODEL_ID 0x18
  32. #define INFO_OFFSET_HW_MODEL_REVISION 0x1c
  33. #define VEN_EDIROL 0x000040ab
  34. #define VEN_PRESONUS 0x00000a92
  35. #define VEN_BRIDGECO 0x000007f5
  36. #define VEN_MACKIE1 0x0000000f
  37. #define VEN_MACKIE2 0x00000ff2
  38. #define VEN_STANTON 0x00001260
  39. #define VEN_TASCAM 0x0000022e
  40. #define VEN_BEHRINGER 0x00001564
  41. #define VEN_APOGEE 0x000003db
  42. #define VEN_ESI 0x00000f1b
  43. #define VEN_ACOUSTIC 0x00000002
  44. #define VEN_CME 0x0000000a
  45. #define VEN_PHONIC 0x00001496
  46. #define VEN_LYNX 0x000019e5
  47. #define VEN_ICON 0x00001a9e
  48. #define VEN_PRISMSOUND 0x00001198
  49. #define VEN_TERRATEC 0x00000aac
  50. #define VEN_YAMAHA 0x0000a0de
  51. #define VEN_FOCUSRITE 0x0000130e
  52. #define VEN_MAUDIO1 0x00000d6c
  53. #define VEN_MAUDIO2 0x000007f5
  54. #define VEN_DIGIDESIGN 0x00a07e
  55. #define MODEL_FOCUSRITE_SAFFIRE_BOTH 0x00000000
  56. #define MODEL_MAUDIO_AUDIOPHILE_BOTH 0x00010060
  57. #define MODEL_MAUDIO_FW1814 0x00010071
  58. #define MODEL_MAUDIO_PROJECTMIX 0x00010091
  59. static int
  60. name_device(struct snd_bebob *bebob, unsigned int vendor_id)
  61. {
  62. struct fw_device *fw_dev = fw_parent_device(bebob->unit);
  63. char vendor[24] = {0};
  64. char model[32] = {0};
  65. u32 hw_id;
  66. u32 data[2] = {0};
  67. u32 revision;
  68. u32 version;
  69. int err;
  70. /* get vendor name from root directory */
  71. err = fw_csr_string(fw_dev->config_rom + 5, CSR_VENDOR,
  72. vendor, sizeof(vendor));
  73. if (err < 0)
  74. goto end;
  75. /* get model name from unit directory */
  76. err = fw_csr_string(bebob->unit->directory, CSR_MODEL,
  77. model, sizeof(model));
  78. if (err < 0)
  79. goto end;
  80. /* get hardware id */
  81. err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_ID,
  82. &hw_id);
  83. if (err < 0)
  84. goto end;
  85. /* get hardware revision */
  86. err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_REVISION,
  87. &revision);
  88. if (err < 0)
  89. goto end;
  90. /* get GUID */
  91. err = snd_bebob_read_block(bebob->unit, INFO_OFFSET_GUID,
  92. data, sizeof(data));
  93. if (err < 0)
  94. goto end;
  95. err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_BEBOB_VERSION,
  96. &version);
  97. if (err < 0)
  98. goto end;
  99. bebob->version = version;
  100. strcpy(bebob->card->driver, "BeBoB");
  101. strcpy(bebob->card->shortname, model);
  102. strcpy(bebob->card->mixername, model);
  103. snprintf(bebob->card->longname, sizeof(bebob->card->longname),
  104. "%s %s (id:%d, rev:%d), GUID %08x%08x at %s, S%d",
  105. vendor, model, hw_id, revision,
  106. data[0], data[1], dev_name(&bebob->unit->device),
  107. 100 << fw_dev->max_speed);
  108. end:
  109. return err;
  110. }
  111. /*
  112. * This module releases the FireWire unit data after all ALSA character devices
  113. * are released by applications. This is for releasing stream data or finishing
  114. * transactions safely. Thus at returning from .remove(), this module still keep
  115. * references for the unit.
  116. */
  117. static void
  118. bebob_card_free(struct snd_card *card)
  119. {
  120. struct snd_bebob *bebob = card->private_data;
  121. snd_bebob_stream_destroy_duplex(bebob);
  122. fw_unit_put(bebob->unit);
  123. kfree(bebob->maudio_special_quirk);
  124. if (bebob->card_index >= 0) {
  125. mutex_lock(&devices_mutex);
  126. clear_bit(bebob->card_index, devices_used);
  127. mutex_unlock(&devices_mutex);
  128. }
  129. mutex_destroy(&bebob->mutex);
  130. }
  131. static const struct snd_bebob_spec *
  132. get_saffire_spec(struct fw_unit *unit)
  133. {
  134. char name[24] = {0};
  135. if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
  136. return NULL;
  137. if (strcmp(name, "SaffireLE") == 0)
  138. return &saffire_le_spec;
  139. else
  140. return &saffire_spec;
  141. }
  142. static bool
  143. check_audiophile_booted(struct fw_unit *unit)
  144. {
  145. char name[24] = {0};
  146. if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
  147. return false;
  148. return strncmp(name, "FW Audiophile Bootloader", 15) != 0;
  149. }
  150. static int
  151. bebob_probe(struct fw_unit *unit,
  152. const struct ieee1394_device_id *entry)
  153. {
  154. struct snd_card *card;
  155. struct snd_bebob *bebob;
  156. const struct snd_bebob_spec *spec;
  157. unsigned int card_index;
  158. int err;
  159. mutex_lock(&devices_mutex);
  160. for (card_index = 0; card_index < SNDRV_CARDS; card_index++) {
  161. if (!test_bit(card_index, devices_used) && enable[card_index])
  162. break;
  163. }
  164. if (card_index >= SNDRV_CARDS) {
  165. err = -ENOENT;
  166. goto end;
  167. }
  168. if ((entry->vendor_id == VEN_FOCUSRITE) &&
  169. (entry->model_id == MODEL_FOCUSRITE_SAFFIRE_BOTH))
  170. spec = get_saffire_spec(unit);
  171. else if ((entry->vendor_id == VEN_MAUDIO1) &&
  172. (entry->model_id == MODEL_MAUDIO_AUDIOPHILE_BOTH) &&
  173. !check_audiophile_booted(unit))
  174. spec = NULL;
  175. else
  176. spec = (const struct snd_bebob_spec *)entry->driver_data;
  177. if (spec == NULL) {
  178. if ((entry->vendor_id == VEN_MAUDIO1) ||
  179. (entry->vendor_id == VEN_MAUDIO2))
  180. err = snd_bebob_maudio_load_firmware(unit);
  181. else
  182. err = -ENOSYS;
  183. goto end;
  184. }
  185. err = snd_card_new(&unit->device, index[card_index], id[card_index],
  186. THIS_MODULE, sizeof(struct snd_bebob), &card);
  187. if (err < 0)
  188. goto end;
  189. bebob = card->private_data;
  190. bebob->card_index = card_index;
  191. set_bit(card_index, devices_used);
  192. card->private_free = bebob_card_free;
  193. bebob->card = card;
  194. bebob->unit = fw_unit_get(unit);
  195. bebob->spec = spec;
  196. mutex_init(&bebob->mutex);
  197. spin_lock_init(&bebob->lock);
  198. init_waitqueue_head(&bebob->hwdep_wait);
  199. err = name_device(bebob, entry->vendor_id);
  200. if (err < 0)
  201. goto error;
  202. if ((entry->vendor_id == VEN_MAUDIO1) &&
  203. (entry->model_id == MODEL_MAUDIO_FW1814))
  204. err = snd_bebob_maudio_special_discover(bebob, true);
  205. else if ((entry->vendor_id == VEN_MAUDIO1) &&
  206. (entry->model_id == MODEL_MAUDIO_PROJECTMIX))
  207. err = snd_bebob_maudio_special_discover(bebob, false);
  208. else
  209. err = snd_bebob_stream_discover(bebob);
  210. if (err < 0)
  211. goto error;
  212. snd_bebob_proc_init(bebob);
  213. if ((bebob->midi_input_ports > 0) ||
  214. (bebob->midi_output_ports > 0)) {
  215. err = snd_bebob_create_midi_devices(bebob);
  216. if (err < 0)
  217. goto error;
  218. }
  219. err = snd_bebob_create_pcm_devices(bebob);
  220. if (err < 0)
  221. goto error;
  222. err = snd_bebob_create_hwdep_device(bebob);
  223. if (err < 0)
  224. goto error;
  225. err = snd_bebob_stream_init_duplex(bebob);
  226. if (err < 0)
  227. goto error;
  228. if (!bebob->maudio_special_quirk) {
  229. err = snd_card_register(card);
  230. if (err < 0) {
  231. snd_bebob_stream_destroy_duplex(bebob);
  232. goto error;
  233. }
  234. } else {
  235. /*
  236. * This is a workaround. This bus reset seems to have an effect
  237. * to make devices correctly handling transactions. Without
  238. * this, the devices have gap_count mismatch. This causes much
  239. * failure of transaction.
  240. *
  241. * Just after registration, user-land application receive
  242. * signals from dbus and starts I/Os. To avoid I/Os till the
  243. * future bus reset, registration is done in next update().
  244. */
  245. bebob->deferred_registration = true;
  246. fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card,
  247. false, true);
  248. }
  249. dev_set_drvdata(&unit->device, bebob);
  250. end:
  251. mutex_unlock(&devices_mutex);
  252. return err;
  253. error:
  254. mutex_unlock(&devices_mutex);
  255. snd_card_free(card);
  256. return err;
  257. }
  258. static void
  259. bebob_update(struct fw_unit *unit)
  260. {
  261. struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
  262. if (bebob == NULL)
  263. return;
  264. fcp_bus_reset(bebob->unit);
  265. snd_bebob_stream_update_duplex(bebob);
  266. if (bebob->deferred_registration) {
  267. if (snd_card_register(bebob->card) < 0) {
  268. snd_bebob_stream_destroy_duplex(bebob);
  269. snd_card_free(bebob->card);
  270. }
  271. bebob->deferred_registration = false;
  272. }
  273. }
  274. static void bebob_remove(struct fw_unit *unit)
  275. {
  276. struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
  277. if (bebob == NULL)
  278. return;
  279. /* Awake bus-reset waiters. */
  280. if (!completion_done(&bebob->bus_reset))
  281. complete_all(&bebob->bus_reset);
  282. /* No need to wait for releasing card object in this context. */
  283. snd_card_free_when_closed(bebob->card);
  284. }
  285. static const struct snd_bebob_rate_spec normal_rate_spec = {
  286. .get = &snd_bebob_stream_get_rate,
  287. .set = &snd_bebob_stream_set_rate
  288. };
  289. static const struct snd_bebob_spec spec_normal = {
  290. .clock = NULL,
  291. .rate = &normal_rate_spec,
  292. .meter = NULL
  293. };
  294. static const struct ieee1394_device_id bebob_id_table[] = {
  295. /* Edirol, FA-66 */
  296. SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010049, &spec_normal),
  297. /* Edirol, FA-101 */
  298. SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010048, &spec_normal),
  299. /* Presonus, FIREBOX */
  300. SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010000, &spec_normal),
  301. /* PreSonus, FIREPOD/FP10 */
  302. SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010066, &spec_normal),
  303. /* PreSonus, Inspire1394 */
  304. SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010001, &spec_normal),
  305. /* BridgeCo, RDAudio1 */
  306. SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010048, &spec_normal),
  307. /* BridgeCo, Audio5 */
  308. SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal),
  309. /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */
  310. SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal),
  311. /* Mackie, d.2 (Firewire Option) */
  312. SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal),
  313. /* Stanton, ScratchAmp */
  314. SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal),
  315. /* Tascam, IF-FW DM */
  316. SND_BEBOB_DEV_ENTRY(VEN_TASCAM, 0x00010067, &spec_normal),
  317. /* Behringer, XENIX UFX 1204 */
  318. SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001204, &spec_normal),
  319. /* Behringer, XENIX UFX 1604 */
  320. SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001604, &spec_normal),
  321. /* Behringer, Digital Mixer X32 series (X-UF Card) */
  322. SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00000006, &spec_normal),
  323. /* Behringer, F-Control Audio 1616 */
  324. SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x001616, &spec_normal),
  325. /* Behringer, F-Control Audio 610 */
  326. SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x000610, &spec_normal),
  327. /* Apogee Electronics, Rosetta 200/400 (X-FireWire card) */
  328. /* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */
  329. SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00010048, &spec_normal),
  330. /* Apogee Electronics, Ensemble */
  331. SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x01eeee, &spec_normal),
  332. /* ESI, Quatafire610 */
  333. SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal),
  334. /* AcousticReality, eARMasterOne */
  335. SND_BEBOB_DEV_ENTRY(VEN_ACOUSTIC, 0x00000002, &spec_normal),
  336. /* CME, MatrixKFW */
  337. SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal),
  338. /* Phonic, Helix Board 12 MkII */
  339. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00050000, &spec_normal),
  340. /* Phonic, Helix Board 18 MkII */
  341. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00060000, &spec_normal),
  342. /* Phonic, Helix Board 24 MkII */
  343. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00070000, &spec_normal),
  344. /* Phonic, Helix Board 12 Universal/18 Universal/24 Universal */
  345. SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00000000, &spec_normal),
  346. /* Lynx, Aurora 8/16 (LT-FW) */
  347. SND_BEBOB_DEV_ENTRY(VEN_LYNX, 0x00000001, &spec_normal),
  348. /* ICON, FireXon */
  349. SND_BEBOB_DEV_ENTRY(VEN_ICON, 0x00000001, &spec_normal),
  350. /* PrismSound, Orpheus */
  351. SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal),
  352. /* PrismSound, ADA-8XR */
  353. SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal),
  354. /* TerraTec Electronic GmbH, PHASE 88 Rack FW */
  355. SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec),
  356. /* TerraTec Electronic GmbH, PHASE 24 FW */
  357. SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &phase24_series_spec),
  358. /* TerraTec Electronic GmbH, Phase X24 FW */
  359. SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &phase24_series_spec),
  360. /* TerraTec Electronic GmbH, EWS MIC2/MIC8 */
  361. SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal),
  362. /* Terratec Electronic GmbH, Aureon 7.1 Firewire */
  363. SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal),
  364. /* Yamaha, GO44 */
  365. SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_go_spec),
  366. /* YAMAHA, GO46 */
  367. SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_go_spec),
  368. /* Focusrite, SaffirePro 26 I/O */
  369. SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec),
  370. /* Focusrite, SaffirePro 10 I/O */
  371. {
  372. // The combination of vendor_id and model_id is the same as the
  373. // same as the one of Liquid Saffire 56.
  374. .match_flags = IEEE1394_MATCH_VENDOR_ID |
  375. IEEE1394_MATCH_MODEL_ID |
  376. IEEE1394_MATCH_SPECIFIER_ID |
  377. IEEE1394_MATCH_VERSION,
  378. .vendor_id = VEN_FOCUSRITE,
  379. .model_id = 0x000006,
  380. .specifier_id = 0x00a02d,
  381. .version = 0x010001,
  382. .driver_data = (kernel_ulong_t)&saffirepro_10_spec,
  383. },
  384. /* Focusrite, Saffire(no label and LE) */
  385. SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH,
  386. &saffire_spec),
  387. /* M-Audio, Firewire 410 */
  388. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010058, NULL), /* bootloader */
  389. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010046, &maudio_fw410_spec),
  390. /* M-Audio, Firewire Audiophile */
  391. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_AUDIOPHILE_BOTH,
  392. &maudio_audiophile_spec),
  393. /* M-Audio, Firewire Solo */
  394. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010062, &maudio_solo_spec),
  395. /* M-Audio, Ozonic */
  396. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x0000000a, &maudio_ozonic_spec),
  397. /* M-Audio NRV10 */
  398. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec),
  399. /* M-Audio, ProFireLightbridge */
  400. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x000100a1, &spec_normal),
  401. /* Firewire 1814 */
  402. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL), /* bootloader */
  403. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814,
  404. &maudio_special_spec),
  405. /* M-Audio ProjectMix */
  406. SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROJECTMIX,
  407. &maudio_special_spec),
  408. /* Digidesign Mbox 2 Pro */
  409. SND_BEBOB_DEV_ENTRY(VEN_DIGIDESIGN, 0x0000a9, &spec_normal),
  410. /* IDs are unknown but able to be supported */
  411. /* Apogee, Mini-ME Firewire */
  412. /* Apogee, Mini-DAC Firewire */
  413. /* Cakawalk, Sonar Power Studio 66 */
  414. /* CME, UF400e */
  415. /* ESI, Quotafire XL */
  416. /* Infrasonic, DewX */
  417. /* Infrasonic, Windy6 */
  418. /* Mackie, Digital X Bus x.200 */
  419. /* Mackie, Digital X Bus x.400 */
  420. /* Phonic, HB 12 */
  421. /* Phonic, HB 24 */
  422. /* Phonic, HB 18 */
  423. /* Phonic, FireFly 202 */
  424. /* Phonic, FireFly 302 */
  425. /* Rolf Spuler, Firewire Guitar */
  426. {}
  427. };
  428. MODULE_DEVICE_TABLE(ieee1394, bebob_id_table);
  429. static struct fw_driver bebob_driver = {
  430. .driver = {
  431. .owner = THIS_MODULE,
  432. .name = "snd-bebob",
  433. .bus = &fw_bus_type,
  434. },
  435. .probe = bebob_probe,
  436. .update = bebob_update,
  437. .remove = bebob_remove,
  438. .id_table = bebob_id_table,
  439. };
  440. static int __init
  441. snd_bebob_init(void)
  442. {
  443. return driver_register(&bebob_driver.driver);
  444. }
  445. static void __exit
  446. snd_bebob_exit(void)
  447. {
  448. driver_unregister(&bebob_driver.driver);
  449. }
  450. module_init(snd_bebob_init);
  451. module_exit(snd_bebob_exit);