Lines Matching refs:oxfw
64 static int name_card(struct snd_oxfw *oxfw, const struct ieee1394_device_id *entry) in name_card() argument
66 struct fw_device *fw_dev = fw_parent_device(oxfw->unit); in name_card()
81 err = fw_csr_string(oxfw->unit->directory, CSR_MODEL, in name_card()
86 err = snd_fw_transaction(oxfw->unit, TCODE_READ_QUADLET_REQUEST, in name_card()
93 oxfw->quirks |= SND_OXFW_QUIRK_JUMBO_PAYLOAD; in name_card()
107 strcpy(oxfw->card->driver, d); in name_card()
108 strcpy(oxfw->card->mixername, m); in name_card()
109 strcpy(oxfw->card->shortname, m); in name_card()
111 snprintf(oxfw->card->longname, sizeof(oxfw->card->longname), in name_card()
115 dev_name(&oxfw->unit->device), 100 << fw_dev->max_speed); in name_card()
122 struct snd_oxfw *oxfw = card->private_data; in oxfw_card_free() local
124 if (oxfw->has_output || oxfw->has_input) in oxfw_card_free()
125 snd_oxfw_stream_destroy_duplex(oxfw); in oxfw_card_free()
127 mutex_destroy(&oxfw->mutex); in oxfw_card_free()
128 fw_unit_put(oxfw->unit); in oxfw_card_free()
131 static int detect_quirks(struct snd_oxfw *oxfw, const struct ieee1394_device_id *entry) in detect_quirks() argument
133 struct fw_device *fw_dev = fw_parent_device(oxfw->unit); in detect_quirks()
143 return snd_oxfw_add_spkr(oxfw, false); in detect_quirks()
145 return snd_oxfw_add_spkr(oxfw, true); in detect_quirks()
152 oxfw->quirks |= SND_OXFW_QUIRK_SCS_TRANSACTION; in detect_quirks()
154 oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION; in detect_quirks()
157 oxfw->midi_input_ports = 0; in detect_quirks()
158 oxfw->midi_output_ports = 0; in detect_quirks()
160 return snd_oxfw_scs1x_add(oxfw); in detect_quirks()
164 oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION | in detect_quirks()
173 oxfw->midi_input_ports++; in detect_quirks()
174 oxfw->midi_output_ports++; in detect_quirks()
191 oxfw->quirks |= SND_OXFW_QUIRK_WRONG_DBS; in detect_quirks()
194 if (!(oxfw->quirks & SND_OXFW_QUIRK_JUMBO_PAYLOAD)) in detect_quirks()
195 oxfw->quirks |= SND_OXFW_QUIRK_BLOCKING_TRANSMISSION; in detect_quirks()
200 oxfw->quirks |= SND_OXFW_QUIRK_IGNORE_NO_INFO_PACKET | in detect_quirks()
211 struct snd_oxfw *oxfw; in oxfw_probe() local
217 err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, sizeof(*oxfw), &card); in oxfw_probe()
222 oxfw = card->private_data; in oxfw_probe()
223 oxfw->unit = fw_unit_get(unit); in oxfw_probe()
224 dev_set_drvdata(&unit->device, oxfw); in oxfw_probe()
225 oxfw->card = card; in oxfw_probe()
227 mutex_init(&oxfw->mutex); in oxfw_probe()
228 spin_lock_init(&oxfw->lock); in oxfw_probe()
229 init_waitqueue_head(&oxfw->hwdep_wait); in oxfw_probe()
231 err = name_card(oxfw, entry); in oxfw_probe()
235 err = snd_oxfw_stream_discover(oxfw); in oxfw_probe()
239 err = detect_quirks(oxfw, entry); in oxfw_probe()
243 if (oxfw->has_output || oxfw->has_input) { in oxfw_probe()
244 err = snd_oxfw_stream_init_duplex(oxfw); in oxfw_probe()
248 err = snd_oxfw_create_pcm(oxfw); in oxfw_probe()
252 snd_oxfw_proc_init(oxfw); in oxfw_probe()
254 err = snd_oxfw_create_midi(oxfw); in oxfw_probe()
258 err = snd_oxfw_create_hwdep(oxfw); in oxfw_probe()
275 struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); in oxfw_bus_reset() local
277 fcp_bus_reset(oxfw->unit); in oxfw_bus_reset()
279 if (oxfw->has_output || oxfw->has_input) { in oxfw_bus_reset()
280 mutex_lock(&oxfw->mutex); in oxfw_bus_reset()
281 snd_oxfw_stream_update_duplex(oxfw); in oxfw_bus_reset()
282 mutex_unlock(&oxfw->mutex); in oxfw_bus_reset()
285 if (oxfw->quirks & SND_OXFW_QUIRK_SCS_TRANSACTION) in oxfw_bus_reset()
286 snd_oxfw_scs1x_update(oxfw); in oxfw_bus_reset()
291 struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); in oxfw_remove() local
294 snd_card_free(oxfw->card); in oxfw_remove()