dg00x 22 sound/firewire/digi00x/digi00x-hwdep.c struct snd_dg00x *dg00x = hwdep->private_data; dg00x 26 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 28 sound/firewire/digi00x/digi00x-hwdep.c while (!dg00x->dev_lock_changed && dg00x->msg == 0) { dg00x 29 sound/firewire/digi00x/digi00x-hwdep.c prepare_to_wait(&dg00x->hwdep_wait, &wait, TASK_INTERRUPTIBLE); dg00x 30 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 32 sound/firewire/digi00x/digi00x-hwdep.c finish_wait(&dg00x->hwdep_wait, &wait); dg00x 35 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 39 sound/firewire/digi00x/digi00x-hwdep.c if (dg00x->dev_lock_changed) { dg00x 41 sound/firewire/digi00x/digi00x-hwdep.c event.lock_status.status = (dg00x->dev_lock_count > 0); dg00x 42 sound/firewire/digi00x/digi00x-hwdep.c dg00x->dev_lock_changed = false; dg00x 48 sound/firewire/digi00x/digi00x-hwdep.c event.digi00x_message.message = dg00x->msg; dg00x 49 sound/firewire/digi00x/digi00x-hwdep.c dg00x->msg = 0; dg00x 54 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 65 sound/firewire/digi00x/digi00x-hwdep.c struct snd_dg00x *dg00x = hwdep->private_data; dg00x 68 sound/firewire/digi00x/digi00x-hwdep.c poll_wait(file, &dg00x->hwdep_wait, wait); dg00x 70 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 71 sound/firewire/digi00x/digi00x-hwdep.c if (dg00x->dev_lock_changed || dg00x->msg) dg00x 75 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 80 sound/firewire/digi00x/digi00x-hwdep.c static int hwdep_get_info(struct snd_dg00x *dg00x, void __user *arg) dg00x 82 sound/firewire/digi00x/digi00x-hwdep.c struct fw_device *dev = fw_parent_device(dg00x->unit); dg00x 99 sound/firewire/digi00x/digi00x-hwdep.c static int hwdep_lock(struct snd_dg00x *dg00x) dg00x 103 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 105 sound/firewire/digi00x/digi00x-hwdep.c if (dg00x->dev_lock_count == 0) { dg00x 106 sound/firewire/digi00x/digi00x-hwdep.c dg00x->dev_lock_count = -1; dg00x 112 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 117 sound/firewire/digi00x/digi00x-hwdep.c static int hwdep_unlock(struct snd_dg00x *dg00x) dg00x 121 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 123 sound/firewire/digi00x/digi00x-hwdep.c if (dg00x->dev_lock_count == -1) { dg00x 124 sound/firewire/digi00x/digi00x-hwdep.c dg00x->dev_lock_count = 0; dg00x 130 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 137 sound/firewire/digi00x/digi00x-hwdep.c struct snd_dg00x *dg00x = hwdep->private_data; dg00x 139 sound/firewire/digi00x/digi00x-hwdep.c spin_lock_irq(&dg00x->lock); dg00x 140 sound/firewire/digi00x/digi00x-hwdep.c if (dg00x->dev_lock_count == -1) dg00x 141 sound/firewire/digi00x/digi00x-hwdep.c dg00x->dev_lock_count = 0; dg00x 142 sound/firewire/digi00x/digi00x-hwdep.c spin_unlock_irq(&dg00x->lock); dg00x 150 sound/firewire/digi00x/digi00x-hwdep.c struct snd_dg00x *dg00x = hwdep->private_data; dg00x 154 sound/firewire/digi00x/digi00x-hwdep.c return hwdep_get_info(dg00x, (void __user *)arg); dg00x 156 sound/firewire/digi00x/digi00x-hwdep.c return hwdep_lock(dg00x); dg00x 158 sound/firewire/digi00x/digi00x-hwdep.c return hwdep_unlock(dg00x); dg00x 175 sound/firewire/digi00x/digi00x-hwdep.c int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x) dg00x 187 sound/firewire/digi00x/digi00x-hwdep.c err = snd_hwdep_new(dg00x->card, "Digi00x", 0, &hwdep); dg00x 194 sound/firewire/digi00x/digi00x-hwdep.c hwdep->private_data = dg00x; dg00x 12 sound/firewire/digi00x/digi00x-midi.c struct snd_dg00x *dg00x = substream->rmidi->private_data; dg00x 15 sound/firewire/digi00x/digi00x-midi.c err = snd_dg00x_stream_lock_try(dg00x); dg00x 19 sound/firewire/digi00x/digi00x-midi.c mutex_lock(&dg00x->mutex); dg00x 20 sound/firewire/digi00x/digi00x-midi.c err = snd_dg00x_stream_reserve_duplex(dg00x, 0); dg00x 22 sound/firewire/digi00x/digi00x-midi.c ++dg00x->substreams_counter; dg00x 23 sound/firewire/digi00x/digi00x-midi.c err = snd_dg00x_stream_start_duplex(dg00x); dg00x 25 sound/firewire/digi00x/digi00x-midi.c --dg00x->substreams_counter; dg00x 27 sound/firewire/digi00x/digi00x-midi.c mutex_unlock(&dg00x->mutex); dg00x 29 sound/firewire/digi00x/digi00x-midi.c snd_dg00x_stream_lock_release(dg00x); dg00x 36 sound/firewire/digi00x/digi00x-midi.c struct snd_dg00x *dg00x = substream->rmidi->private_data; dg00x 38 sound/firewire/digi00x/digi00x-midi.c mutex_lock(&dg00x->mutex); dg00x 39 sound/firewire/digi00x/digi00x-midi.c --dg00x->substreams_counter; dg00x 40 sound/firewire/digi00x/digi00x-midi.c snd_dg00x_stream_stop_duplex(dg00x); dg00x 41 sound/firewire/digi00x/digi00x-midi.c mutex_unlock(&dg00x->mutex); dg00x 43 sound/firewire/digi00x/digi00x-midi.c snd_dg00x_stream_lock_release(dg00x); dg00x 50 sound/firewire/digi00x/digi00x-midi.c struct snd_dg00x *dg00x = substream->rmidi->private_data; dg00x 59 sound/firewire/digi00x/digi00x-midi.c spin_lock_irqsave(&dg00x->lock, flags); dg00x 62 sound/firewire/digi00x/digi00x-midi.c amdtp_dot_midi_trigger(&dg00x->tx_stream, port, substream); dg00x 64 sound/firewire/digi00x/digi00x-midi.c amdtp_dot_midi_trigger(&dg00x->tx_stream, port, NULL); dg00x 66 sound/firewire/digi00x/digi00x-midi.c spin_unlock_irqrestore(&dg00x->lock, flags); dg00x 72 sound/firewire/digi00x/digi00x-midi.c struct snd_dg00x *dg00x = substream->rmidi->private_data; dg00x 81 sound/firewire/digi00x/digi00x-midi.c spin_lock_irqsave(&dg00x->lock, flags); dg00x 84 sound/firewire/digi00x/digi00x-midi.c amdtp_dot_midi_trigger(&dg00x->rx_stream, port, substream); dg00x 86 sound/firewire/digi00x/digi00x-midi.c amdtp_dot_midi_trigger(&dg00x->rx_stream, port, NULL); dg00x 88 sound/firewire/digi00x/digi00x-midi.c spin_unlock_irqrestore(&dg00x->lock, flags); dg00x 91 sound/firewire/digi00x/digi00x-midi.c static void set_substream_names(struct snd_dg00x *dg00x, dg00x 105 sound/firewire/digi00x/digi00x-midi.c dg00x->card->shortname, dg00x 110 sound/firewire/digi00x/digi00x-midi.c dg00x->card->shortname); dg00x 116 sound/firewire/digi00x/digi00x-midi.c static int add_substream_pair(struct snd_dg00x *dg00x, unsigned int out_ports, dg00x 134 sound/firewire/digi00x/digi00x-midi.c err = snd_rawmidi_new(dg00x->card, dg00x->card->driver, is_console, dg00x 138 sound/firewire/digi00x/digi00x-midi.c rmidi->private_data = dg00x; dg00x 145 sound/firewire/digi00x/digi00x-midi.c dg00x->card->shortname); dg00x 154 sound/firewire/digi00x/digi00x-midi.c set_substream_names(dg00x, rmidi, is_console); dg00x 159 sound/firewire/digi00x/digi00x-midi.c int snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x) dg00x 164 sound/firewire/digi00x/digi00x-midi.c err = add_substream_pair(dg00x, DOT_MIDI_OUT_PORTS, DOT_MIDI_IN_PORTS, dg00x 169 sound/firewire/digi00x/digi00x-midi.c if (dg00x->is_console) dg00x 170 sound/firewire/digi00x/digi00x-midi.c err = add_substream_pair(dg00x, 1, 1, true); dg00x 57 sound/firewire/digi00x/digi00x-pcm.c static int pcm_init_hw_params(struct snd_dg00x *dg00x, dg00x 68 sound/firewire/digi00x/digi00x-pcm.c s = &dg00x->tx_stream; dg00x 71 sound/firewire/digi00x/digi00x-pcm.c s = &dg00x->rx_stream; dg00x 102 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 108 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_lock_try(dg00x); dg00x 112 sound/firewire/digi00x/digi00x-pcm.c err = pcm_init_hw_params(dg00x, substream); dg00x 117 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_get_clock(dg00x, &clock); dg00x 121 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_check_external_clock(dg00x, &detect); dg00x 131 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_running(&dg00x->rx_stream) || dg00x 132 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_running(&dg00x->tx_stream)) { dg00x 133 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_get_external_rate(dg00x, &rate); dg00x 144 sound/firewire/digi00x/digi00x-pcm.c snd_dg00x_stream_lock_release(dg00x); dg00x 150 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 152 sound/firewire/digi00x/digi00x-pcm.c snd_dg00x_stream_lock_release(dg00x); dg00x 160 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 171 sound/firewire/digi00x/digi00x-pcm.c mutex_lock(&dg00x->mutex); dg00x 172 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_reserve_duplex(dg00x, rate); dg00x 174 sound/firewire/digi00x/digi00x-pcm.c ++dg00x->substreams_counter; dg00x 175 sound/firewire/digi00x/digi00x-pcm.c mutex_unlock(&dg00x->mutex); dg00x 183 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 185 sound/firewire/digi00x/digi00x-pcm.c mutex_lock(&dg00x->mutex); dg00x 188 sound/firewire/digi00x/digi00x-pcm.c --dg00x->substreams_counter; dg00x 190 sound/firewire/digi00x/digi00x-pcm.c snd_dg00x_stream_stop_duplex(dg00x); dg00x 192 sound/firewire/digi00x/digi00x-pcm.c mutex_unlock(&dg00x->mutex); dg00x 199 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 202 sound/firewire/digi00x/digi00x-pcm.c mutex_lock(&dg00x->mutex); dg00x 204 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_start_duplex(dg00x); dg00x 206 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_prepare(&dg00x->tx_stream); dg00x 208 sound/firewire/digi00x/digi00x-pcm.c mutex_unlock(&dg00x->mutex); dg00x 215 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 218 sound/firewire/digi00x/digi00x-pcm.c mutex_lock(&dg00x->mutex); dg00x 220 sound/firewire/digi00x/digi00x-pcm.c err = snd_dg00x_stream_start_duplex(dg00x); dg00x 222 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_prepare(&dg00x->rx_stream); dg00x 223 sound/firewire/digi00x/digi00x-pcm.c amdtp_dot_reset(&dg00x->rx_stream); dg00x 226 sound/firewire/digi00x/digi00x-pcm.c mutex_unlock(&dg00x->mutex); dg00x 233 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 237 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_trigger(&dg00x->tx_stream, substream); dg00x 240 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_trigger(&dg00x->tx_stream, NULL); dg00x 251 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 255 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_trigger(&dg00x->rx_stream, substream); dg00x 258 sound/firewire/digi00x/digi00x-pcm.c amdtp_stream_pcm_trigger(&dg00x->rx_stream, NULL); dg00x 269 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = sbstrm->private_data; dg00x 271 sound/firewire/digi00x/digi00x-pcm.c return amdtp_stream_pcm_pointer(&dg00x->tx_stream); dg00x 276 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = sbstrm->private_data; dg00x 278 sound/firewire/digi00x/digi00x-pcm.c return amdtp_stream_pcm_pointer(&dg00x->rx_stream); dg00x 283 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 285 sound/firewire/digi00x/digi00x-pcm.c return amdtp_stream_pcm_ack(&dg00x->tx_stream); dg00x 290 sound/firewire/digi00x/digi00x-pcm.c struct snd_dg00x *dg00x = substream->private_data; dg00x 292 sound/firewire/digi00x/digi00x-pcm.c return amdtp_stream_pcm_ack(&dg00x->rx_stream); dg00x 295 sound/firewire/digi00x/digi00x-pcm.c int snd_dg00x_create_pcm_devices(struct snd_dg00x *dg00x) dg00x 324 sound/firewire/digi00x/digi00x-pcm.c err = snd_pcm_new(dg00x->card, dg00x->card->driver, 0, 1, 1, &pcm); dg00x 328 sound/firewire/digi00x/digi00x-pcm.c pcm->private_data = dg00x; dg00x 330 sound/firewire/digi00x/digi00x-pcm.c "%s PCM", dg00x->card->shortname); dg00x 10 sound/firewire/digi00x/digi00x-proc.c static int get_optical_iface_mode(struct snd_dg00x *dg00x, dg00x 16 sound/firewire/digi00x/digi00x-proc.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 38 sound/firewire/digi00x/digi00x-proc.c struct snd_dg00x *dg00x = entry->private_data; dg00x 44 sound/firewire/digi00x/digi00x-proc.c if (get_optical_iface_mode(dg00x, &mode) < 0) dg00x 46 sound/firewire/digi00x/digi00x-proc.c if (snd_dg00x_stream_get_local_rate(dg00x, &rate) < 0) dg00x 48 sound/firewire/digi00x/digi00x-proc.c if (snd_dg00x_stream_get_clock(dg00x, &clock) < 0) dg00x 58 sound/firewire/digi00x/digi00x-proc.c if (snd_dg00x_stream_check_external_clock(dg00x, &detect) < 0) dg00x 64 sound/firewire/digi00x/digi00x-proc.c if (snd_dg00x_stream_get_external_rate(dg00x, &rate) >= 0) dg00x 68 sound/firewire/digi00x/digi00x-proc.c void snd_dg00x_proc_init(struct snd_dg00x *dg00x) dg00x 76 sound/firewire/digi00x/digi00x-proc.c root = snd_info_create_card_entry(dg00x->card, "firewire", dg00x 77 sound/firewire/digi00x/digi00x-proc.c dg00x->card->proc_root); dg00x 83 sound/firewire/digi00x/digi00x-proc.c entry = snd_info_create_card_entry(dg00x->card, "clock", root); dg00x 85 sound/firewire/digi00x/digi00x-proc.c snd_info_set_text_ops(entry, dg00x, proc_read_clock); dg00x 30 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_get_local_rate(struct snd_dg00x *dg00x, unsigned int *rate) dg00x 36 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 51 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_set_local_rate(struct snd_dg00x *dg00x, unsigned int rate) dg00x 64 sound/firewire/digi00x/digi00x-stream.c return snd_fw_transaction(dg00x->unit, TCODE_WRITE_QUADLET_REQUEST, dg00x 69 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_get_clock(struct snd_dg00x *dg00x, dg00x 75 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 88 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_check_external_clock(struct snd_dg00x *dg00x, bool *detect) dg00x 93 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 102 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_get_external_rate(struct snd_dg00x *dg00x, dg00x 109 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 125 sound/firewire/digi00x/digi00x-stream.c static void finish_session(struct snd_dg00x *dg00x) dg00x 130 sound/firewire/digi00x/digi00x-stream.c snd_fw_transaction(dg00x->unit, TCODE_WRITE_QUADLET_REQUEST, dg00x 136 sound/firewire/digi00x/digi00x-stream.c snd_fw_transaction(dg00x->unit, TCODE_WRITE_QUADLET_REQUEST, dg00x 145 sound/firewire/digi00x/digi00x-stream.c static int begin_session(struct snd_dg00x *dg00x) dg00x 152 sound/firewire/digi00x/digi00x-stream.c data = cpu_to_be32((dg00x->tx_resources.channel << 16) | dg00x 153 sound/firewire/digi00x/digi00x-stream.c dg00x->rx_resources.channel); dg00x 154 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_WRITE_QUADLET_REQUEST, dg00x 160 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, dg00x 173 sound/firewire/digi00x/digi00x-stream.c err = snd_fw_transaction(dg00x->unit, dg00x 188 sound/firewire/digi00x/digi00x-stream.c static int keep_resources(struct snd_dg00x *dg00x, struct amdtp_stream *stream, dg00x 203 sound/firewire/digi00x/digi00x-stream.c if (stream == &dg00x->tx_stream) dg00x 204 sound/firewire/digi00x/digi00x-stream.c resources = &dg00x->tx_resources; dg00x 206 sound/firewire/digi00x/digi00x-stream.c resources = &dg00x->rx_resources; dg00x 215 sound/firewire/digi00x/digi00x-stream.c fw_parent_device(dg00x->unit)->max_speed); dg00x 218 sound/firewire/digi00x/digi00x-stream.c static int init_stream(struct snd_dg00x *dg00x, struct amdtp_stream *s) dg00x 224 sound/firewire/digi00x/digi00x-stream.c if (s == &dg00x->tx_stream) { dg00x 225 sound/firewire/digi00x/digi00x-stream.c resources = &dg00x->tx_resources; dg00x 228 sound/firewire/digi00x/digi00x-stream.c resources = &dg00x->rx_resources; dg00x 232 sound/firewire/digi00x/digi00x-stream.c err = fw_iso_resources_init(resources, dg00x->unit); dg00x 236 sound/firewire/digi00x/digi00x-stream.c err = amdtp_dot_init(s, dg00x->unit, dir); dg00x 243 sound/firewire/digi00x/digi00x-stream.c static void destroy_stream(struct snd_dg00x *dg00x, struct amdtp_stream *s) dg00x 247 sound/firewire/digi00x/digi00x-stream.c if (s == &dg00x->tx_stream) dg00x 248 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_destroy(&dg00x->tx_resources); dg00x 250 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_destroy(&dg00x->rx_resources); dg00x 253 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_init_duplex(struct snd_dg00x *dg00x) dg00x 257 sound/firewire/digi00x/digi00x-stream.c err = init_stream(dg00x, &dg00x->rx_stream); dg00x 261 sound/firewire/digi00x/digi00x-stream.c err = init_stream(dg00x, &dg00x->tx_stream); dg00x 263 sound/firewire/digi00x/digi00x-stream.c destroy_stream(dg00x, &dg00x->rx_stream); dg00x 265 sound/firewire/digi00x/digi00x-stream.c err = amdtp_domain_init(&dg00x->domain); dg00x 267 sound/firewire/digi00x/digi00x-stream.c destroy_stream(dg00x, &dg00x->rx_stream); dg00x 268 sound/firewire/digi00x/digi00x-stream.c destroy_stream(dg00x, &dg00x->tx_stream); dg00x 278 sound/firewire/digi00x/digi00x-stream.c void snd_dg00x_stream_destroy_duplex(struct snd_dg00x *dg00x) dg00x 280 sound/firewire/digi00x/digi00x-stream.c amdtp_domain_destroy(&dg00x->domain); dg00x 282 sound/firewire/digi00x/digi00x-stream.c destroy_stream(dg00x, &dg00x->rx_stream); dg00x 283 sound/firewire/digi00x/digi00x-stream.c destroy_stream(dg00x, &dg00x->tx_stream); dg00x 286 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_reserve_duplex(struct snd_dg00x *dg00x, unsigned int rate) dg00x 291 sound/firewire/digi00x/digi00x-stream.c err = snd_dg00x_stream_get_local_rate(dg00x, &curr_rate); dg00x 297 sound/firewire/digi00x/digi00x-stream.c if (dg00x->substreams_counter == 0 || curr_rate != rate) { dg00x 298 sound/firewire/digi00x/digi00x-stream.c amdtp_domain_stop(&dg00x->domain); dg00x 300 sound/firewire/digi00x/digi00x-stream.c finish_session(dg00x); dg00x 302 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_free(&dg00x->tx_resources); dg00x 303 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_free(&dg00x->rx_resources); dg00x 305 sound/firewire/digi00x/digi00x-stream.c err = snd_dg00x_stream_set_local_rate(dg00x, rate); dg00x 309 sound/firewire/digi00x/digi00x-stream.c err = keep_resources(dg00x, &dg00x->rx_stream, rate); dg00x 313 sound/firewire/digi00x/digi00x-stream.c err = keep_resources(dg00x, &dg00x->tx_stream, rate); dg00x 315 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_free(&dg00x->rx_resources); dg00x 323 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x) dg00x 325 sound/firewire/digi00x/digi00x-stream.c unsigned int generation = dg00x->rx_resources.generation; dg00x 328 sound/firewire/digi00x/digi00x-stream.c if (dg00x->substreams_counter == 0) dg00x 331 sound/firewire/digi00x/digi00x-stream.c if (amdtp_streaming_error(&dg00x->tx_stream) || dg00x 332 sound/firewire/digi00x/digi00x-stream.c amdtp_streaming_error(&dg00x->rx_stream)) { dg00x 333 sound/firewire/digi00x/digi00x-stream.c amdtp_domain_stop(&dg00x->domain); dg00x 334 sound/firewire/digi00x/digi00x-stream.c finish_session(dg00x); dg00x 337 sound/firewire/digi00x/digi00x-stream.c if (generation != fw_parent_device(dg00x->unit)->card->generation) { dg00x 338 sound/firewire/digi00x/digi00x-stream.c err = fw_iso_resources_update(&dg00x->tx_resources); dg00x 342 sound/firewire/digi00x/digi00x-stream.c err = fw_iso_resources_update(&dg00x->rx_resources); dg00x 351 sound/firewire/digi00x/digi00x-stream.c if (!amdtp_stream_running(&dg00x->rx_stream)) { dg00x 352 sound/firewire/digi00x/digi00x-stream.c int spd = fw_parent_device(dg00x->unit)->max_speed; dg00x 354 sound/firewire/digi00x/digi00x-stream.c err = begin_session(dg00x); dg00x 358 sound/firewire/digi00x/digi00x-stream.c err = amdtp_domain_add_stream(&dg00x->domain, &dg00x->rx_stream, dg00x 359 sound/firewire/digi00x/digi00x-stream.c dg00x->rx_resources.channel, spd); dg00x 363 sound/firewire/digi00x/digi00x-stream.c err = amdtp_domain_add_stream(&dg00x->domain, &dg00x->tx_stream, dg00x 364 sound/firewire/digi00x/digi00x-stream.c dg00x->tx_resources.channel, spd); dg00x 368 sound/firewire/digi00x/digi00x-stream.c err = amdtp_domain_start(&dg00x->domain); dg00x 372 sound/firewire/digi00x/digi00x-stream.c if (!amdtp_stream_wait_callback(&dg00x->rx_stream, dg00x 374 sound/firewire/digi00x/digi00x-stream.c !amdtp_stream_wait_callback(&dg00x->tx_stream, dg00x 383 sound/firewire/digi00x/digi00x-stream.c amdtp_domain_stop(&dg00x->domain); dg00x 384 sound/firewire/digi00x/digi00x-stream.c finish_session(dg00x); dg00x 389 sound/firewire/digi00x/digi00x-stream.c void snd_dg00x_stream_stop_duplex(struct snd_dg00x *dg00x) dg00x 391 sound/firewire/digi00x/digi00x-stream.c if (dg00x->substreams_counter == 0) { dg00x 392 sound/firewire/digi00x/digi00x-stream.c amdtp_domain_stop(&dg00x->domain); dg00x 393 sound/firewire/digi00x/digi00x-stream.c finish_session(dg00x); dg00x 395 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_free(&dg00x->tx_resources); dg00x 396 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_free(&dg00x->rx_resources); dg00x 400 sound/firewire/digi00x/digi00x-stream.c void snd_dg00x_stream_update_duplex(struct snd_dg00x *dg00x) dg00x 402 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_update(&dg00x->tx_resources); dg00x 403 sound/firewire/digi00x/digi00x-stream.c fw_iso_resources_update(&dg00x->rx_resources); dg00x 405 sound/firewire/digi00x/digi00x-stream.c amdtp_stream_update(&dg00x->tx_stream); dg00x 406 sound/firewire/digi00x/digi00x-stream.c amdtp_stream_update(&dg00x->rx_stream); dg00x 409 sound/firewire/digi00x/digi00x-stream.c void snd_dg00x_stream_lock_changed(struct snd_dg00x *dg00x) dg00x 411 sound/firewire/digi00x/digi00x-stream.c dg00x->dev_lock_changed = true; dg00x 412 sound/firewire/digi00x/digi00x-stream.c wake_up(&dg00x->hwdep_wait); dg00x 415 sound/firewire/digi00x/digi00x-stream.c int snd_dg00x_stream_lock_try(struct snd_dg00x *dg00x) dg00x 419 sound/firewire/digi00x/digi00x-stream.c spin_lock_irq(&dg00x->lock); dg00x 422 sound/firewire/digi00x/digi00x-stream.c if (dg00x->dev_lock_count < 0) { dg00x 428 sound/firewire/digi00x/digi00x-stream.c if (dg00x->dev_lock_count++ == 0) dg00x 429 sound/firewire/digi00x/digi00x-stream.c snd_dg00x_stream_lock_changed(dg00x); dg00x 432 sound/firewire/digi00x/digi00x-stream.c spin_unlock_irq(&dg00x->lock); dg00x 436 sound/firewire/digi00x/digi00x-stream.c void snd_dg00x_stream_lock_release(struct snd_dg00x *dg00x) dg00x 438 sound/firewire/digi00x/digi00x-stream.c spin_lock_irq(&dg00x->lock); dg00x 440 sound/firewire/digi00x/digi00x-stream.c if (WARN_ON(dg00x->dev_lock_count <= 0)) dg00x 442 sound/firewire/digi00x/digi00x-stream.c if (--dg00x->dev_lock_count == 0) dg00x 443 sound/firewire/digi00x/digi00x-stream.c snd_dg00x_stream_lock_changed(dg00x); dg00x 445 sound/firewire/digi00x/digi00x-stream.c spin_unlock_irq(&dg00x->lock); dg00x 11 sound/firewire/digi00x/digi00x-transaction.c static void handle_unknown_message(struct snd_dg00x *dg00x, dg00x 16 sound/firewire/digi00x/digi00x-transaction.c spin_lock_irqsave(&dg00x->lock, flags); dg00x 17 sound/firewire/digi00x/digi00x-transaction.c dg00x->msg = be32_to_cpu(*buf); dg00x 18 sound/firewire/digi00x/digi00x-transaction.c spin_unlock_irqrestore(&dg00x->lock, flags); dg00x 20 sound/firewire/digi00x/digi00x-transaction.c wake_up(&dg00x->hwdep_wait); dg00x 28 sound/firewire/digi00x/digi00x-transaction.c struct snd_dg00x *dg00x = callback_data; dg00x 33 sound/firewire/digi00x/digi00x-transaction.c if (offset == dg00x->async_handler.offset) dg00x 34 sound/firewire/digi00x/digi00x-transaction.c handle_unknown_message(dg00x, offset, buf); dg00x 37 sound/firewire/digi00x/digi00x-transaction.c int snd_dg00x_transaction_reregister(struct snd_dg00x *dg00x) dg00x 39 sound/firewire/digi00x/digi00x-transaction.c struct fw_device *device = fw_parent_device(dg00x->unit); dg00x 44 sound/firewire/digi00x/digi00x-transaction.c (dg00x->async_handler.offset >> 32)); dg00x 45 sound/firewire/digi00x/digi00x-transaction.c data[1] = cpu_to_be32(dg00x->async_handler.offset); dg00x 46 sound/firewire/digi00x/digi00x-transaction.c return snd_fw_transaction(dg00x->unit, TCODE_WRITE_BLOCK_REQUEST, dg00x 51 sound/firewire/digi00x/digi00x-transaction.c void snd_dg00x_transaction_unregister(struct snd_dg00x *dg00x) dg00x 53 sound/firewire/digi00x/digi00x-transaction.c if (dg00x->async_handler.callback_data == NULL) dg00x 56 sound/firewire/digi00x/digi00x-transaction.c fw_core_remove_address_handler(&dg00x->async_handler); dg00x 58 sound/firewire/digi00x/digi00x-transaction.c dg00x->async_handler.callback_data = NULL; dg00x 61 sound/firewire/digi00x/digi00x-transaction.c int snd_dg00x_transaction_register(struct snd_dg00x *dg00x) dg00x 69 sound/firewire/digi00x/digi00x-transaction.c dg00x->async_handler.length = 4; dg00x 70 sound/firewire/digi00x/digi00x-transaction.c dg00x->async_handler.address_callback = handle_message; dg00x 71 sound/firewire/digi00x/digi00x-transaction.c dg00x->async_handler.callback_data = dg00x; dg00x 73 sound/firewire/digi00x/digi00x-transaction.c err = fw_core_add_address_handler(&dg00x->async_handler, dg00x 78 sound/firewire/digi00x/digi00x-transaction.c err = snd_dg00x_transaction_reregister(dg00x); dg00x 80 sound/firewire/digi00x/digi00x-transaction.c snd_dg00x_transaction_unregister(dg00x); dg00x 18 sound/firewire/digi00x/digi00x.c static int name_card(struct snd_dg00x *dg00x) dg00x 20 sound/firewire/digi00x/digi00x.c struct fw_device *fw_dev = fw_parent_device(dg00x->unit); dg00x 25 sound/firewire/digi00x/digi00x.c err = fw_csr_string(dg00x->unit->directory, CSR_MODEL, name, dg00x 32 sound/firewire/digi00x/digi00x.c strcpy(dg00x->card->driver, "Digi00x"); dg00x 33 sound/firewire/digi00x/digi00x.c strcpy(dg00x->card->shortname, model); dg00x 34 sound/firewire/digi00x/digi00x.c strcpy(dg00x->card->mixername, model); dg00x 35 sound/firewire/digi00x/digi00x.c snprintf(dg00x->card->longname, sizeof(dg00x->card->longname), dg00x 38 sound/firewire/digi00x/digi00x.c dev_name(&dg00x->unit->device), 100 << fw_dev->max_speed); dg00x 45 sound/firewire/digi00x/digi00x.c struct snd_dg00x *dg00x = card->private_data; dg00x 47 sound/firewire/digi00x/digi00x.c snd_dg00x_stream_destroy_duplex(dg00x); dg00x 48 sound/firewire/digi00x/digi00x.c snd_dg00x_transaction_unregister(dg00x); dg00x 53 sound/firewire/digi00x/digi00x.c struct snd_dg00x *dg00x = dg00x 57 sound/firewire/digi00x/digi00x.c if (dg00x->registered) dg00x 60 sound/firewire/digi00x/digi00x.c err = snd_card_new(&dg00x->unit->device, -1, NULL, THIS_MODULE, 0, dg00x 61 sound/firewire/digi00x/digi00x.c &dg00x->card); dg00x 64 sound/firewire/digi00x/digi00x.c dg00x->card->private_free = dg00x_card_free; dg00x 65 sound/firewire/digi00x/digi00x.c dg00x->card->private_data = dg00x; dg00x 67 sound/firewire/digi00x/digi00x.c err = name_card(dg00x); dg00x 71 sound/firewire/digi00x/digi00x.c err = snd_dg00x_stream_init_duplex(dg00x); dg00x 75 sound/firewire/digi00x/digi00x.c snd_dg00x_proc_init(dg00x); dg00x 77 sound/firewire/digi00x/digi00x.c err = snd_dg00x_create_pcm_devices(dg00x); dg00x 81 sound/firewire/digi00x/digi00x.c err = snd_dg00x_create_midi_devices(dg00x); dg00x 85 sound/firewire/digi00x/digi00x.c err = snd_dg00x_create_hwdep_device(dg00x); dg00x 89 sound/firewire/digi00x/digi00x.c err = snd_dg00x_transaction_register(dg00x); dg00x 93 sound/firewire/digi00x/digi00x.c err = snd_card_register(dg00x->card); dg00x 97 sound/firewire/digi00x/digi00x.c dg00x->registered = true; dg00x 101 sound/firewire/digi00x/digi00x.c snd_card_free(dg00x->card); dg00x 102 sound/firewire/digi00x/digi00x.c dev_info(&dg00x->unit->device, dg00x 109 sound/firewire/digi00x/digi00x.c struct snd_dg00x *dg00x; dg00x 112 sound/firewire/digi00x/digi00x.c dg00x = devm_kzalloc(&unit->device, sizeof(struct snd_dg00x), dg00x 114 sound/firewire/digi00x/digi00x.c if (!dg00x) dg00x 117 sound/firewire/digi00x/digi00x.c dg00x->unit = fw_unit_get(unit); dg00x 118 sound/firewire/digi00x/digi00x.c dev_set_drvdata(&unit->device, dg00x); dg00x 120 sound/firewire/digi00x/digi00x.c mutex_init(&dg00x->mutex); dg00x 121 sound/firewire/digi00x/digi00x.c spin_lock_init(&dg00x->lock); dg00x 122 sound/firewire/digi00x/digi00x.c init_waitqueue_head(&dg00x->hwdep_wait); dg00x 124 sound/firewire/digi00x/digi00x.c dg00x->is_console = entry->model_id == MODEL_CONSOLE; dg00x 127 sound/firewire/digi00x/digi00x.c INIT_DEFERRABLE_WORK(&dg00x->dwork, do_registration); dg00x 128 sound/firewire/digi00x/digi00x.c snd_fw_schedule_registration(unit, &dg00x->dwork); dg00x 135 sound/firewire/digi00x/digi00x.c struct snd_dg00x *dg00x = dev_get_drvdata(&unit->device); dg00x 138 sound/firewire/digi00x/digi00x.c if (!dg00x->registered) dg00x 139 sound/firewire/digi00x/digi00x.c snd_fw_schedule_registration(unit, &dg00x->dwork); dg00x 141 sound/firewire/digi00x/digi00x.c snd_dg00x_transaction_reregister(dg00x); dg00x 147 sound/firewire/digi00x/digi00x.c if (dg00x->registered) { dg00x 148 sound/firewire/digi00x/digi00x.c mutex_lock(&dg00x->mutex); dg00x 149 sound/firewire/digi00x/digi00x.c snd_dg00x_stream_update_duplex(dg00x); dg00x 150 sound/firewire/digi00x/digi00x.c mutex_unlock(&dg00x->mutex); dg00x 156 sound/firewire/digi00x/digi00x.c struct snd_dg00x *dg00x = dev_get_drvdata(&unit->device); dg00x 163 sound/firewire/digi00x/digi00x.c cancel_delayed_work_sync(&dg00x->dwork); dg00x 165 sound/firewire/digi00x/digi00x.c if (dg00x->registered) { dg00x 167 sound/firewire/digi00x/digi00x.c snd_card_free(dg00x->card); dg00x 170 sound/firewire/digi00x/digi00x.c mutex_destroy(&dg00x->mutex); dg00x 171 sound/firewire/digi00x/digi00x.c fw_unit_put(dg00x->unit); dg00x 128 sound/firewire/digi00x/digi00x.h int snd_dg00x_transaction_register(struct snd_dg00x *dg00x); dg00x 129 sound/firewire/digi00x/digi00x.h int snd_dg00x_transaction_reregister(struct snd_dg00x *dg00x); dg00x 130 sound/firewire/digi00x/digi00x.h void snd_dg00x_transaction_unregister(struct snd_dg00x *dg00x); dg00x 134 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_get_external_rate(struct snd_dg00x *dg00x, dg00x 136 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_get_local_rate(struct snd_dg00x *dg00x, dg00x 138 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_set_local_rate(struct snd_dg00x *dg00x, unsigned int rate); dg00x 139 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_get_clock(struct snd_dg00x *dg00x, dg00x 141 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_check_external_clock(struct snd_dg00x *dg00x, dg00x 143 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_init_duplex(struct snd_dg00x *dg00x); dg00x 144 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_reserve_duplex(struct snd_dg00x *dg00x, unsigned int rate); dg00x 145 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x); dg00x 146 sound/firewire/digi00x/digi00x.h void snd_dg00x_stream_stop_duplex(struct snd_dg00x *dg00x); dg00x 147 sound/firewire/digi00x/digi00x.h void snd_dg00x_stream_update_duplex(struct snd_dg00x *dg00x); dg00x 148 sound/firewire/digi00x/digi00x.h void snd_dg00x_stream_destroy_duplex(struct snd_dg00x *dg00x); dg00x 150 sound/firewire/digi00x/digi00x.h void snd_dg00x_stream_lock_changed(struct snd_dg00x *dg00x); dg00x 151 sound/firewire/digi00x/digi00x.h int snd_dg00x_stream_lock_try(struct snd_dg00x *dg00x); dg00x 152 sound/firewire/digi00x/digi00x.h void snd_dg00x_stream_lock_release(struct snd_dg00x *dg00x); dg00x 154 sound/firewire/digi00x/digi00x.h void snd_dg00x_proc_init(struct snd_dg00x *dg00x); dg00x 156 sound/firewire/digi00x/digi00x.h int snd_dg00x_create_pcm_devices(struct snd_dg00x *dg00x); dg00x 158 sound/firewire/digi00x/digi00x.h int snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x); dg00x 160 sound/firewire/digi00x/digi00x.h int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x);