/linux-5.19.10/sound/firewire/fireworks/ |
D | fireworks_stream.c | 11 static int init_stream(struct snd_efw *efw, struct amdtp_stream *stream) in init_stream() argument 18 if (stream == &efw->tx_stream) { in init_stream() 19 conn = &efw->out_conn; in init_stream() 23 conn = &efw->in_conn; in init_stream() 28 err = cmp_connection_init(conn, efw->unit, c_dir, 0); in init_stream() 32 err = amdtp_am824_init(stream, efw->unit, s_dir, CIP_BLOCKING | CIP_UNAWARE_SYT); in init_stream() 39 if (stream == &efw->tx_stream) { in init_stream() 41 efw->tx_stream.flags |= CIP_EMPTY_WITH_TAG0; in init_stream() 43 efw->tx_stream.flags |= CIP_DBC_IS_END_EVENT; in init_stream() 45 efw->tx_stream.flags |= CIP_SKIP_DBC_ZERO_CHECK; in init_stream() [all …]
|
D | fireworks_midi.c | 12 struct snd_efw *efw = substream->rmidi->private_data; in midi_open() local 15 err = snd_efw_stream_lock_try(efw); in midi_open() 19 mutex_lock(&efw->mutex); in midi_open() 20 err = snd_efw_stream_reserve_duplex(efw, 0, 0, 0); in midi_open() 22 ++efw->substreams_counter; in midi_open() 23 err = snd_efw_stream_start_duplex(efw); in midi_open() 25 --efw->substreams_counter; in midi_open() 27 mutex_unlock(&efw->mutex); in midi_open() 29 snd_efw_stream_lock_release(efw); in midi_open() 36 struct snd_efw *efw = substream->rmidi->private_data; in midi_close() local [all …]
|
D | fireworks_hwdep.c | 22 hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, in hwdep_read_resp_buf() argument 42 spin_lock_irq(&efw->lock); in hwdep_read_resp_buf() 49 pull_ptr = efw->pull_ptr; in hwdep_read_resp_buf() 51 while (efw->push_ptr != pull_ptr) { in hwdep_read_resp_buf() 62 (unsigned int)(pull_ptr - efw->resp_buf); in hwdep_read_resp_buf() 65 spin_unlock_irq(&efw->lock); in hwdep_read_resp_buf() 70 spin_lock_irq(&efw->lock); in hwdep_read_resp_buf() 73 if (pull_ptr >= efw->resp_buf + snd_efw_resp_buf_size) in hwdep_read_resp_buf() 91 efw->pull_ptr = pull_ptr; in hwdep_read_resp_buf() 93 spin_unlock_irq(&efw->lock); in hwdep_read_resp_buf() [all …]
|
D | fireworks.c | 72 get_hardware_info(struct snd_efw *efw) in get_hardware_info() argument 74 struct fw_device *fw_dev = fw_parent_device(efw->unit); in get_hardware_info() 83 err = snd_efw_command_get_hwinfo(efw, hwinfo); in get_hardware_info() 91 efw->firmware_version = hwinfo->arm_version; in get_hardware_info() 93 strcpy(efw->card->driver, "Fireworks"); in get_hardware_info() 94 strcpy(efw->card->shortname, hwinfo->model_name); in get_hardware_info() 95 strcpy(efw->card->mixername, hwinfo->model_name); in get_hardware_info() 96 snprintf(efw->card->longname, sizeof(efw->card->longname), in get_hardware_info() 100 dev_name(&efw->unit->device), 100 << fw_dev->max_speed); in get_hardware_info() 103 efw->resp_addr_changable = true; in get_hardware_info() [all …]
|
D | fireworks_pcm.c | 132 pcm_init_hw_params(struct snd_efw *efw, in pcm_init_hw_params() argument 142 s = &efw->tx_stream; in pcm_init_hw_params() 143 pcm_channels = efw->pcm_capture_channels; in pcm_init_hw_params() 146 s = &efw->rx_stream; in pcm_init_hw_params() 147 pcm_channels = efw->pcm_playback_channels; in pcm_init_hw_params() 151 runtime->hw.rates = efw->supported_sampling_rate; in pcm_init_hw_params() 175 struct snd_efw *efw = substream->private_data; in pcm_open() local 176 struct amdtp_domain *d = &efw->domain; in pcm_open() 180 err = snd_efw_stream_lock_try(efw); in pcm_open() 184 err = pcm_init_hw_params(efw, substream); in pcm_open() [all …]
|
D | fireworks_proc.c | 30 struct snd_efw *efw = entry->private_data; in proc_read_hwinfo() local 38 if (snd_efw_command_get_hwinfo(efw, hwinfo) < 0) in proc_read_hwinfo() 107 struct snd_efw *efw = entry->private_data; in proc_read_clock() local 111 if (snd_efw_command_get_clock_source(efw, &clock_source) < 0) in proc_read_clock() 114 if (snd_efw_command_get_sampling_rate(efw, &sampling_rate) < 0) in proc_read_clock() 130 struct snd_efw *efw = entry->private_data; in proc_read_phys_meters() local 138 (efw->phys_in + efw->phys_out) * sizeof(u32); in proc_read_phys_meters() 143 err = snd_efw_command_get_phys_meters(efw, meters, size); in proc_read_phys_meters() 150 max = min(efw->phys_out, meters->out_meters); in proc_read_phys_meters() 153 for (g = 0; g < efw->phys_out_grp_count; g++) { in proc_read_phys_meters() [all …]
|
D | fireworks.h | 119 void snd_efw_transaction_add_instance(struct snd_efw *efw); 120 void snd_efw_transaction_remove_instance(struct snd_efw *efw); 192 int snd_efw_command_set_resp_addr(struct snd_efw *efw, 194 int snd_efw_command_set_tx_mode(struct snd_efw *efw, 196 int snd_efw_command_get_hwinfo(struct snd_efw *efw, 198 int snd_efw_command_get_phys_meters(struct snd_efw *efw, 201 int snd_efw_command_get_clock_source(struct snd_efw *efw, 203 int snd_efw_command_get_sampling_rate(struct snd_efw *efw, unsigned int *rate); 204 int snd_efw_command_set_sampling_rate(struct snd_efw *efw, unsigned int rate); 206 int snd_efw_stream_init_duplex(struct snd_efw *efw); [all …]
|
D | fireworks_command.c | 101 efw_transaction(struct snd_efw *efw, unsigned int category, in efw_transaction() argument 122 spin_lock(&efw->lock); in efw_transaction() 123 if ((efw->seqnum < KERNEL_SEQNUM_MIN) || in efw_transaction() 124 (efw->seqnum >= KERNEL_SEQNUM_MAX - 2)) in efw_transaction() 125 efw->seqnum = KERNEL_SEQNUM_MIN; in efw_transaction() 127 efw->seqnum += 2; in efw_transaction() 128 seqnum = efw->seqnum; in efw_transaction() 129 spin_unlock(&efw->lock); in efw_transaction() 144 err = snd_efw_transaction_run(efw->unit, buf, cmd_bytes, in efw_transaction() 154 dev_err(&efw->unit->device, "EFW command failed [%u/%u]: %s\n", in efw_transaction() [all …]
|
D | fireworks_transaction.c | 118 copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode) in copy_resp_to_buf() argument 126 spin_lock(&efw->lock); in copy_resp_to_buf() 128 if (efw->push_ptr < efw->pull_ptr) in copy_resp_to_buf() 129 capacity = (unsigned int)(efw->pull_ptr - efw->push_ptr); in copy_resp_to_buf() 132 (unsigned int)(efw->push_ptr - efw->pull_ptr); in copy_resp_to_buf() 143 (unsigned int)(efw->push_ptr - efw->resp_buf); in copy_resp_to_buf() 146 memcpy(efw->push_ptr, data, till_end); in copy_resp_to_buf() 148 efw->push_ptr += till_end; in copy_resp_to_buf() 149 if (efw->push_ptr >= efw->resp_buf + snd_efw_resp_buf_size) in copy_resp_to_buf() 150 efw->push_ptr -= snd_efw_resp_buf_size; in copy_resp_to_buf() [all …]
|