• Home
  • Raw
  • Download

Lines Matching refs:motu

28 static void name_card(struct snd_motu *motu)  in name_card()  argument
30 struct fw_device *fw_dev = fw_parent_device(motu->unit); in name_card()
35 fw_csr_iterator_init(&it, motu->unit->directory); in name_card()
44 strcpy(motu->card->driver, "FW-MOTU"); in name_card()
45 strcpy(motu->card->shortname, motu->spec->name); in name_card()
46 strcpy(motu->card->mixername, motu->spec->name); in name_card()
47 snprintf(motu->card->longname, sizeof(motu->card->longname), in name_card()
49 motu->spec->name, version, in name_card()
51 dev_name(&motu->unit->device), 100 << fw_dev->max_speed); in name_card()
56 struct snd_motu *motu = card->private_data; in motu_card_free() local
58 snd_motu_transaction_unregister(motu); in motu_card_free()
59 snd_motu_stream_destroy_duplex(motu); in motu_card_free()
64 struct snd_motu *motu = container_of(work, struct snd_motu, dwork.work); in do_registration() local
67 if (motu->registered) in do_registration()
70 err = snd_card_new(&motu->unit->device, -1, NULL, THIS_MODULE, 0, in do_registration()
71 &motu->card); in do_registration()
74 motu->card->private_free = motu_card_free; in do_registration()
75 motu->card->private_data = motu; in do_registration()
77 name_card(motu); in do_registration()
79 err = snd_motu_transaction_register(motu); in do_registration()
83 err = snd_motu_stream_init_duplex(motu); in do_registration()
87 snd_motu_proc_init(motu); in do_registration()
89 err = snd_motu_create_pcm_devices(motu); in do_registration()
93 if ((motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_2ND_Q) || in do_registration()
94 (motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_3RD_Q) || in do_registration()
95 (motu->spec->flags & SND_MOTU_SPEC_TX_MIDI_2ND_Q) || in do_registration()
96 (motu->spec->flags & SND_MOTU_SPEC_TX_MIDI_3RD_Q)) { in do_registration()
97 err = snd_motu_create_midi_devices(motu); in do_registration()
102 err = snd_motu_create_hwdep_device(motu); in do_registration()
106 err = snd_card_register(motu->card); in do_registration()
110 motu->registered = true; in do_registration()
114 snd_card_free(motu->card); in do_registration()
115 dev_info(&motu->unit->device, in do_registration()
122 struct snd_motu *motu; in motu_probe() local
125 motu = devm_kzalloc(&unit->device, sizeof(struct snd_motu), GFP_KERNEL); in motu_probe()
126 if (!motu) in motu_probe()
128 motu->unit = fw_unit_get(unit); in motu_probe()
129 dev_set_drvdata(&unit->device, motu); in motu_probe()
131 motu->spec = (const struct snd_motu_spec *)entry->driver_data; in motu_probe()
132 mutex_init(&motu->mutex); in motu_probe()
133 spin_lock_init(&motu->lock); in motu_probe()
134 init_waitqueue_head(&motu->hwdep_wait); in motu_probe()
137 INIT_DEFERRABLE_WORK(&motu->dwork, do_registration); in motu_probe()
138 snd_fw_schedule_registration(unit, &motu->dwork); in motu_probe()
145 struct snd_motu *motu = dev_get_drvdata(&unit->device); in motu_remove() local
152 cancel_delayed_work_sync(&motu->dwork); in motu_remove()
154 if (motu->registered) { in motu_remove()
156 snd_card_free(motu->card); in motu_remove()
159 mutex_destroy(&motu->mutex); in motu_remove()
160 fw_unit_put(motu->unit); in motu_remove()
165 struct snd_motu *motu = dev_get_drvdata(&unit->device); in motu_bus_update() local
168 if (!motu->registered) in motu_bus_update()
169 snd_fw_schedule_registration(unit, &motu->dwork); in motu_bus_update()
172 snd_motu_transaction_reregister(motu); in motu_bus_update()