Lines Matching refs:bebob

70 name_device(struct snd_bebob *bebob)  in name_device()  argument
72 struct fw_device *fw_dev = fw_parent_device(bebob->unit); in name_device()
88 err = fw_csr_string(bebob->unit->directory, CSR_MODEL, in name_device()
94 err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_ID, in name_device()
100 err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_REVISION, in name_device()
106 err = snd_bebob_read_block(bebob->unit, INFO_OFFSET_GUID, in name_device()
111 err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_BEBOB_VERSION, in name_device()
115 bebob->version = version; in name_device()
117 strcpy(bebob->card->driver, "BeBoB"); in name_device()
118 strcpy(bebob->card->shortname, model); in name_device()
119 strcpy(bebob->card->mixername, model); in name_device()
120 snprintf(bebob->card->longname, sizeof(bebob->card->longname), in name_device()
123 data[0], data[1], dev_name(&bebob->unit->device), in name_device()
129 static void bebob_free(struct snd_bebob *bebob) in bebob_free() argument
131 snd_bebob_stream_destroy_duplex(bebob); in bebob_free()
132 fw_unit_put(bebob->unit); in bebob_free()
134 kfree(bebob->maudio_special_quirk); in bebob_free()
136 mutex_destroy(&bebob->mutex); in bebob_free()
137 kfree(bebob); in bebob_free()
149 struct snd_bebob *bebob = card->private_data; in bebob_card_free() local
152 clear_bit(bebob->card_index, devices_used); in bebob_card_free()
186 struct snd_bebob *bebob = in do_registration() local
191 if (bebob->registered) in do_registration()
205 err = snd_card_new(&bebob->unit->device, index[card_index], in do_registration()
206 id[card_index], THIS_MODULE, 0, &bebob->card); in do_registration()
212 err = name_device(bebob); in do_registration()
216 if (bebob->spec == &maudio_special_spec) { in do_registration()
217 if (bebob->entry->model_id == MODEL_MAUDIO_FW1814) in do_registration()
218 err = snd_bebob_maudio_special_discover(bebob, true); in do_registration()
220 err = snd_bebob_maudio_special_discover(bebob, false); in do_registration()
222 err = snd_bebob_stream_discover(bebob); in do_registration()
227 err = snd_bebob_stream_init_duplex(bebob); in do_registration()
231 snd_bebob_proc_init(bebob); in do_registration()
233 if (bebob->midi_input_ports > 0 || bebob->midi_output_ports > 0) { in do_registration()
234 err = snd_bebob_create_midi_devices(bebob); in do_registration()
239 err = snd_bebob_create_pcm_devices(bebob); in do_registration()
243 err = snd_bebob_create_hwdep_device(bebob); in do_registration()
247 err = snd_card_register(bebob->card); in do_registration()
258 bebob->card->private_free = bebob_card_free; in do_registration()
259 bebob->card->private_data = bebob; in do_registration()
260 bebob->registered = true; in do_registration()
265 snd_bebob_stream_destroy_duplex(bebob); in do_registration()
266 kfree(bebob->maudio_special_quirk); in do_registration()
267 bebob->maudio_special_quirk = NULL; in do_registration()
268 snd_card_free(bebob->card); in do_registration()
269 dev_info(&bebob->unit->device, in do_registration()
276 struct snd_bebob *bebob; in bebob_probe() local
298 bebob = kzalloc(sizeof(struct snd_bebob), GFP_KERNEL); in bebob_probe()
299 if (bebob == NULL) in bebob_probe()
302 bebob->unit = fw_unit_get(unit); in bebob_probe()
303 bebob->entry = entry; in bebob_probe()
304 bebob->spec = spec; in bebob_probe()
305 dev_set_drvdata(&unit->device, bebob); in bebob_probe()
307 mutex_init(&bebob->mutex); in bebob_probe()
308 spin_lock_init(&bebob->lock); in bebob_probe()
309 init_waitqueue_head(&bebob->hwdep_wait); in bebob_probe()
312 INIT_DEFERRABLE_WORK(&bebob->dwork, do_registration); in bebob_probe()
317 snd_fw_schedule_registration(unit, &bebob->dwork); in bebob_probe()
329 fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card, in bebob_probe()
355 struct snd_bebob *bebob = dev_get_drvdata(&unit->device); in bebob_update() local
357 if (bebob == NULL) in bebob_update()
361 if (!bebob->registered) in bebob_update()
362 snd_fw_schedule_registration(unit, &bebob->dwork); in bebob_update()
364 fcp_bus_reset(bebob->unit); in bebob_update()
369 struct snd_bebob *bebob = dev_get_drvdata(&unit->device); in bebob_remove() local
371 if (bebob == NULL) in bebob_remove()
379 cancel_delayed_work_sync(&bebob->dwork); in bebob_remove()
381 if (bebob->registered) { in bebob_remove()
383 snd_card_free_when_closed(bebob->card); in bebob_remove()
386 bebob_free(bebob); in bebob_remove()