Lines Matching refs:efw

72 get_hardware_info(struct snd_efw *efw)
74 struct fw_device *fw_dev = fw_parent_device(efw->unit);
83 err = snd_efw_command_get_hwinfo(efw, hwinfo);
91 efw->firmware_version = hwinfo->arm_version;
93 strcpy(efw->card->driver, "Fireworks");
94 strcpy(efw->card->shortname, hwinfo->model_name);
95 strcpy(efw->card->mixername, hwinfo->model_name);
96 snprintf(efw->card->longname, sizeof(efw->card->longname),
100 dev_name(&efw->unit->device), 100 << fw_dev->max_speed);
103 efw->resp_addr_changable = true;
105 efw->supported_sampling_rate = 0;
108 efw->supported_sampling_rate |= SNDRV_PCM_RATE_22050;
111 efw->supported_sampling_rate |= SNDRV_PCM_RATE_32000;
114 efw->supported_sampling_rate |= SNDRV_PCM_RATE_44100;
117 efw->supported_sampling_rate |= SNDRV_PCM_RATE_48000;
120 efw->supported_sampling_rate |= SNDRV_PCM_RATE_88200;
123 efw->supported_sampling_rate |= SNDRV_PCM_RATE_96000;
126 efw->supported_sampling_rate |= SNDRV_PCM_RATE_176400;
129 efw->supported_sampling_rate |= SNDRV_PCM_RATE_192000;
137 efw->midi_out_ports = hwinfo->midi_out_ports;
138 efw->midi_in_ports = hwinfo->midi_in_ports;
149 efw->pcm_capture_channels[0] = hwinfo->amdtp_tx_pcm_channels;
150 efw->pcm_capture_channels[1] = hwinfo->amdtp_tx_pcm_channels_2x;
151 efw->pcm_capture_channels[2] = hwinfo->amdtp_tx_pcm_channels_4x;
152 efw->pcm_playback_channels[0] = hwinfo->amdtp_rx_pcm_channels;
153 efw->pcm_playback_channels[1] = hwinfo->amdtp_rx_pcm_channels_2x;
154 efw->pcm_playback_channels[2] = hwinfo->amdtp_rx_pcm_channels_4x;
162 efw->phys_in = hwinfo->phys_in;
163 efw->phys_out = hwinfo->phys_out;
164 efw->phys_in_grp_count = hwinfo->phys_in_grp_count;
165 efw->phys_out_grp_count = hwinfo->phys_out_grp_count;
166 memcpy(&efw->phys_in_grps, hwinfo->phys_in_grps,
168 memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps,
173 efw->is_af9 = true;
180 efw->is_fireworks3 = true;
189 struct snd_efw *efw = card->private_data;
192 clear_bit(efw->card_index, devices_used);
195 snd_efw_stream_destroy_duplex(efw);
196 snd_efw_transaction_remove_instance(efw);
202 struct snd_efw *efw = container_of(work, struct snd_efw, dwork.work);
206 if (efw->registered)
220 err = snd_card_new(&efw->unit->device, index[card_index],
221 id[card_index], THIS_MODULE, 0, &efw->card);
229 efw->card->private_free = efw_card_free;
230 efw->card->private_data = efw;
235 efw->resp_buf = devm_kzalloc(&efw->card->card_dev,
237 if (!efw->resp_buf) {
241 efw->pull_ptr = efw->push_ptr = efw->resp_buf;
242 snd_efw_transaction_add_instance(efw);
244 err = get_hardware_info(efw);
248 err = snd_efw_stream_init_duplex(efw);
252 snd_efw_proc_init(efw);
254 if (efw->midi_out_ports || efw->midi_in_ports) {
255 err = snd_efw_create_midi_devices(efw);
260 err = snd_efw_create_pcm_devices(efw);
264 err = snd_efw_create_hwdep_device(efw);
268 err = snd_card_register(efw->card);
272 efw->registered = true;
276 snd_card_free(efw->card);
277 dev_info(&efw->unit->device,
284 struct snd_efw *efw;
286 efw = devm_kzalloc(&unit->device, sizeof(struct snd_efw), GFP_KERNEL);
287 if (efw == NULL)
289 efw->unit = fw_unit_get(unit);
290 dev_set_drvdata(&unit->device, efw);
292 mutex_init(&efw->mutex);
293 spin_lock_init(&efw->lock);
294 init_waitqueue_head(&efw->hwdep_wait);
297 INIT_DEFERRABLE_WORK(&efw->dwork, do_registration);
298 snd_fw_schedule_registration(unit, &efw->dwork);
305 struct snd_efw *efw = dev_get_drvdata(&unit->device);
308 if (!efw->registered)
309 snd_fw_schedule_registration(unit, &efw->dwork);
311 snd_efw_transaction_bus_reset(efw->unit);
317 if (efw->registered) {
318 mutex_lock(&efw->mutex);
319 snd_efw_stream_update_duplex(efw);
320 mutex_unlock(&efw->mutex);
326 struct snd_efw *efw = dev_get_drvdata(&unit->device);
333 cancel_delayed_work_sync(&efw->dwork);
335 if (efw->registered) {
337 snd_card_free(efw->card);
340 mutex_destroy(&efw->mutex);
341 fw_unit_put(efw->unit);