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()
132 struct snd_bebob *bebob = card->private_data; in bebob_card_free() local
135 clear_bit(bebob->card_index, devices_used); in bebob_card_free()
138 snd_bebob_stream_destroy_duplex(bebob); in bebob_card_free()
169 struct snd_bebob *bebob = in do_registration() local
174 if (bebob->registered) in do_registration()
187 err = snd_card_new(&bebob->unit->device, index[card_index], in do_registration()
188 id[card_index], THIS_MODULE, 0, &bebob->card); in do_registration()
196 bebob->card->private_free = bebob_card_free; in do_registration()
197 bebob->card->private_data = bebob; in do_registration()
199 err = name_device(bebob); in do_registration()
203 if (bebob->spec == &maudio_special_spec) { in do_registration()
204 if (bebob->entry->model_id == MODEL_MAUDIO_FW1814) in do_registration()
205 err = snd_bebob_maudio_special_discover(bebob, true); in do_registration()
207 err = snd_bebob_maudio_special_discover(bebob, false); in do_registration()
209 err = snd_bebob_stream_discover(bebob); in do_registration()
214 err = snd_bebob_stream_init_duplex(bebob); in do_registration()
218 snd_bebob_proc_init(bebob); in do_registration()
220 if (bebob->midi_input_ports > 0 || bebob->midi_output_ports > 0) { in do_registration()
221 err = snd_bebob_create_midi_devices(bebob); in do_registration()
226 err = snd_bebob_create_pcm_devices(bebob); in do_registration()
230 err = snd_bebob_create_hwdep_device(bebob); in do_registration()
234 err = snd_card_register(bebob->card); in do_registration()
238 bebob->registered = true; in do_registration()
242 snd_card_free(bebob->card); in do_registration()
243 dev_info(&bebob->unit->device, in do_registration()
250 struct snd_bebob *bebob; in bebob_probe() local
272 bebob = devm_kzalloc(&unit->device, sizeof(struct snd_bebob), in bebob_probe()
274 if (!bebob) in bebob_probe()
276 bebob->unit = fw_unit_get(unit); in bebob_probe()
277 dev_set_drvdata(&unit->device, bebob); in bebob_probe()
279 bebob->entry = entry; in bebob_probe()
280 bebob->spec = spec; in bebob_probe()
281 mutex_init(&bebob->mutex); in bebob_probe()
282 spin_lock_init(&bebob->lock); in bebob_probe()
283 init_waitqueue_head(&bebob->hwdep_wait); in bebob_probe()
286 INIT_DEFERRABLE_WORK(&bebob->dwork, do_registration); in bebob_probe()
291 snd_fw_schedule_registration(unit, &bebob->dwork); in bebob_probe()
303 fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card, in bebob_probe()
329 struct snd_bebob *bebob = dev_get_drvdata(&unit->device); in bebob_update() local
331 if (bebob == NULL) in bebob_update()
335 if (!bebob->registered) in bebob_update()
336 snd_fw_schedule_registration(unit, &bebob->dwork); in bebob_update()
338 fcp_bus_reset(bebob->unit); in bebob_update()
343 struct snd_bebob *bebob = dev_get_drvdata(&unit->device); in bebob_remove() local
345 if (bebob == NULL) in bebob_remove()
353 cancel_delayed_work_sync(&bebob->dwork); in bebob_remove()
355 if (bebob->registered) { in bebob_remove()
357 snd_card_free(bebob->card); in bebob_remove()
360 mutex_destroy(&bebob->mutex); in bebob_remove()
361 fw_unit_put(bebob->unit); in bebob_remove()