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 scnprintf(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);
198 mutex_destroy(&efw->mutex);
199 fw_unit_put(efw->unit);
206 struct snd_efw *efw;
221 sizeof(*efw), &card);
230 efw = card->private_data;
231 efw->unit = fw_unit_get(unit);
232 dev_set_drvdata(&unit->device, efw);
233 efw->card = card;
234 efw->card_index = card_index;
236 mutex_init(&efw->mutex);
237 spin_lock_init(&efw->lock);
238 init_waitqueue_head(&efw->hwdep_wait);
242 efw->resp_buf = devm_kzalloc(&card->card_dev, snd_efw_resp_buf_size, GFP_KERNEL);
243 if (!efw->resp_buf) {
247 efw->pull_ptr = efw->push_ptr = efw->resp_buf;
248 snd_efw_transaction_add_instance(efw);
250 err = get_hardware_info(efw);
254 err = snd_efw_stream_init_duplex(efw);
258 snd_efw_proc_init(efw);
260 if (efw->midi_out_ports || efw->midi_in_ports) {
261 err = snd_efw_create_midi_devices(efw);
266 err = snd_efw_create_pcm_devices(efw);
270 err = snd_efw_create_hwdep_device(efw);
286 struct snd_efw *efw = dev_get_drvdata(&unit->device);
288 snd_efw_transaction_bus_reset(efw->unit);
290 mutex_lock(&efw->mutex);
291 snd_efw_stream_update_duplex(efw);
292 mutex_unlock(&efw->mutex);
297 struct snd_efw *efw = dev_get_drvdata(&unit->device);
300 snd_card_free(efw->card);