/kernel/linux/linux-5.10/sound/firewire/motu/ |
H A D | motu-stream.c | 3 * motu-stream.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 28 static int keep_resources(struct snd_motu *motu, unsigned int rate, in keep_resources() argument 36 if (stream == &motu->rx_stream) { in keep_resources() 37 resources = &motu->rx_resources; in keep_resources() 38 packet_format = &motu->rx_packet_formats; in keep_resources() 40 if ((motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_2ND_Q) || in keep_resources() 41 (motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_3RD_Q)) in keep_resources() 44 resources = &motu->tx_resources; in keep_resources() 45 packet_format = &motu in keep_resources() 62 begin_session(struct snd_motu *motu) begin_session() argument 85 finish_session(struct snd_motu *motu) finish_session() argument 109 snd_motu_stream_cache_packet_formats(struct snd_motu *motu) snd_motu_stream_cache_packet_formats() argument 136 snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate, unsigned int frames_per_period, unsigned int frames_per_buffer) snd_motu_stream_reserve_duplex() argument 189 ensure_packet_formats(struct snd_motu *motu) ensure_packet_formats() argument 215 snd_motu_stream_start_duplex(struct snd_motu *motu) snd_motu_stream_start_duplex() argument 291 snd_motu_stream_stop_duplex(struct snd_motu *motu) snd_motu_stream_stop_duplex() argument 302 init_stream(struct snd_motu *motu, struct amdtp_stream *s) init_stream() argument 327 destroy_stream(struct snd_motu *motu, struct amdtp_stream *s) destroy_stream() argument 337 snd_motu_stream_init_duplex(struct snd_motu *motu) snd_motu_stream_init_duplex() argument 362 snd_motu_stream_destroy_duplex(struct snd_motu *motu) snd_motu_stream_destroy_duplex() argument 372 motu_lock_changed(struct snd_motu *motu) motu_lock_changed() argument 378 snd_motu_stream_lock_try(struct snd_motu *motu) snd_motu_stream_lock_try() argument 397 snd_motu_stream_lock_release(struct snd_motu *motu) snd_motu_stream_lock_release() argument [all...] |
H A D | motu.c | 3 * motu.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 28 static void name_card(struct snd_motu *motu) in name_card() argument 30 struct fw_device *fw_dev = fw_parent_device(motu->unit); in name_card() 35 fw_csr_iterator_init(&it, motu->unit->directory); in name_card() 44 strcpy(motu->card->driver, "FW-MOTU"); in name_card() 45 strcpy(motu->card->shortname, motu->spec->name); in name_card() 46 strcpy(motu->card->mixername, motu in name_card() 56 struct snd_motu *motu = card->private_data; motu_card_free() local 64 struct snd_motu *motu = container_of(work, struct snd_motu, dwork.work); do_registration() local 122 struct snd_motu *motu; motu_probe() local 145 struct snd_motu *motu = dev_get_drvdata(&unit->device); motu_remove() local 165 struct snd_motu *motu = dev_get_drvdata(&unit->device); motu_bus_update() local [all...] |
H A D | motu-hwdep.c | 3 * motu-hwdep.c - a part of driver for MOTU FireWire series 17 #include "motu.h" 22 struct snd_motu *motu = hwdep->private_data; in hwdep_read() local 26 spin_lock_irq(&motu->lock); in hwdep_read() 28 while (!motu->dev_lock_changed && motu->msg == 0) { in hwdep_read() 29 prepare_to_wait(&motu->hwdep_wait, &wait, TASK_INTERRUPTIBLE); in hwdep_read() 30 spin_unlock_irq(&motu->lock); in hwdep_read() 32 finish_wait(&motu->hwdep_wait, &wait); in hwdep_read() 35 spin_lock_irq(&motu in hwdep_read() 64 struct snd_motu *motu = hwdep->private_data; hwdep_poll() local 79 hwdep_get_info(struct snd_motu *motu, void __user *arg) hwdep_get_info() argument 98 hwdep_lock(struct snd_motu *motu) hwdep_lock() argument 116 hwdep_unlock(struct snd_motu *motu) hwdep_unlock() argument 136 struct snd_motu *motu = hwdep->private_data; hwdep_release() local 149 struct snd_motu *motu = hwdep->private_data; hwdep_ioctl() local 174 snd_motu_create_hwdep_device(struct snd_motu *motu) snd_motu_create_hwdep_device() argument [all...] |
H A D | motu.h | 3 * motu.h - a part of driver for MOTU FireWire series 136 int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg, 138 int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg, 140 int snd_motu_transaction_register(struct snd_motu *motu); 141 int snd_motu_transaction_reregister(struct snd_motu *motu); 142 void snd_motu_transaction_unregister(struct snd_motu *motu); 144 int snd_motu_stream_init_duplex(struct snd_motu *motu); 145 void snd_motu_stream_destroy_duplex(struct snd_motu *motu); 146 int snd_motu_stream_cache_packet_formats(struct snd_motu *motu); 147 int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigne 183 snd_motu_protocol_get_clock_rate(struct snd_motu *motu, unsigned int *rate) snd_motu_protocol_get_clock_rate() argument 194 snd_motu_protocol_set_clock_rate(struct snd_motu *motu, unsigned int rate) snd_motu_protocol_set_clock_rate() argument 205 snd_motu_protocol_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *source) snd_motu_protocol_get_clock_source() argument 216 snd_motu_protocol_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_switch_fetching_mode() argument 227 snd_motu_protocol_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_cache_packet_formats() argument [all...] |
H A D | motu-protocol-v3.c | 3 * motu-protocol-v3.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 30 int snd_motu_protocol_v3_get_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_get_clock_rate() argument 37 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_get_clock_rate() 52 int snd_motu_protocol_v3_set_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_set_clock_rate() argument 67 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 79 err = snd_motu_transaction_write(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 87 motu->msg = 0; in snd_motu_protocol_v3_set_clock_rate() 88 result = wait_event_interruptible_timeout(motu->hwdep_wait, in snd_motu_protocol_v3_set_clock_rate() 89 motu in snd_motu_protocol_v3_set_clock_rate() 100 detect_clock_source_828mk3(struct snd_motu *motu, u32 data, enum snd_motu_clock_source *src) detect_clock_source_828mk3() argument 151 v3_detect_clock_source(struct snd_motu *motu, u32 data, enum snd_motu_clock_source *src) v3_detect_clock_source() argument 175 snd_motu_protocol_v3_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *src) snd_motu_protocol_v3_get_clock_source() argument 194 snd_motu_protocol_v3_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_v3_switch_fetching_mode() argument 217 detect_packet_formats_828mk3(struct snd_motu *motu, u32 data) detect_packet_formats_828mk3() argument 262 snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_v3_cache_packet_formats() argument [all...] |
H A D | motu-pcm.c | 3 * motu-pcm.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 69 static void limit_channels_and_rates(struct snd_motu *motu, in limit_channels_and_rates() argument 95 static int init_hw_info(struct snd_motu *motu, in init_hw_info() argument 106 stream = &motu->tx_stream; in init_hw_info() 107 formats = &motu->tx_packet_formats; in init_hw_info() 110 stream = &motu->rx_stream; in init_hw_info() 111 formats = &motu->rx_packet_formats; in init_hw_info() 114 limit_channels_and_rates(motu, runtime, formats); in init_hw_info() 132 struct snd_motu *motu in pcm_open() local 200 struct snd_motu *motu = substream->private_data; pcm_close() local 210 struct snd_motu *motu = substream->private_data; pcm_hw_params() local 231 struct snd_motu *motu = substream->private_data; pcm_hw_free() local 247 struct snd_motu *motu = substream->private_data; capture_prepare() local 260 struct snd_motu *motu = substream->private_data; playback_prepare() local 274 struct snd_motu *motu = substream->private_data; capture_trigger() local 291 struct snd_motu *motu = substream->private_data; playback_trigger() local 309 struct snd_motu *motu = substream->private_data; capture_pointer() local 315 struct snd_motu *motu = substream->private_data; playback_pointer() local 322 struct snd_motu *motu = substream->private_data; capture_ack() local 329 struct snd_motu *motu = substream->private_data; playback_ack() local 334 snd_motu_create_pcm_devices(struct snd_motu *motu) snd_motu_create_pcm_devices() argument [all...] |
H A D | motu-midi.c | 3 * motu-midi.h - a part of driver for MOTU FireWire series 7 #include "motu.h" 11 struct snd_motu *motu = substream->rmidi->private_data; in midi_open() local 14 err = snd_motu_stream_lock_try(motu); in midi_open() 18 mutex_lock(&motu->mutex); in midi_open() 20 err = snd_motu_stream_reserve_duplex(motu, 0, 0, 0); in midi_open() 22 ++motu->substreams_counter; in midi_open() 23 err = snd_motu_stream_start_duplex(motu); in midi_open() 25 --motu->substreams_counter; in midi_open() 28 mutex_unlock(&motu in midi_open() 38 struct snd_motu *motu = substream->rmidi->private_data; midi_close() local 53 struct snd_motu *motu = substrm->rmidi->private_data; midi_capture_trigger() local 70 struct snd_motu *motu = substrm->rmidi->private_data; midi_playback_trigger() local 85 set_midi_substream_names(struct snd_motu *motu, struct snd_rawmidi_str *str) set_midi_substream_names() argument 96 snd_motu_create_midi_devices(struct snd_motu *motu) snd_motu_create_midi_devices() argument [all...] |
H A D | motu-protocol-v2.c | 3 * motu-protocol-v2.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 38 int snd_motu_protocol_v2_get_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v2_get_clock_rate() argument 44 err = snd_motu_transaction_read(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_get_clock_rate() 52 int snd_motu_protocol_v2_set_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v2_set_clock_rate() argument 67 err = snd_motu_transaction_read(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_set_clock_rate() 77 return snd_motu_transaction_write(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_set_clock_rate() 81 static int detect_clock_source_optical_model(struct snd_motu *motu, u32 data, in detect_clock_source_optical_model() argument 96 int err = snd_motu_transaction_read(motu, V2_IN_OUT_CONF_OFFSET, ®, sizeof(reg)); in detect_clock_source_optical_model() 123 static int v2_detect_clock_source(struct snd_motu *motu, u3 argument 147 get_clock_source(struct snd_motu *motu, u32 data, enum snd_motu_clock_source *src) get_clock_source() argument 158 snd_motu_protocol_v2_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *src) snd_motu_protocol_v2_get_clock_source() argument 173 switch_fetching_mode_cyclone(struct snd_motu *motu, u32 *data, bool enable) switch_fetching_mode_cyclone() argument 182 switch_fetching_mode_spartan(struct snd_motu *motu, u32 *data, bool enable) switch_fetching_mode_spartan() argument 203 snd_motu_protocol_v2_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_v2_switch_fetching_mode() argument 237 detect_packet_formats_828mk2(struct snd_motu *motu, u32 data) detect_packet_formats_828mk2() argument 254 detect_packet_formats_traveler(struct snd_motu *motu, u32 data) detect_packet_formats_traveler() argument 271 detect_packet_formats_8pre(struct snd_motu *motu, u32 data) detect_packet_formats_8pre() argument 288 snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_v2_cache_packet_formats() argument [all...] |
H A D | motu-transaction.c | 3 * motu-transaction.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 15 int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg, in snd_motu_transaction_read() argument 27 return snd_fw_transaction(motu->unit, tcode, in snd_motu_transaction_read() 31 int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg, in snd_motu_transaction_write() argument 43 return snd_fw_transaction(motu->unit, tcode, in snd_motu_transaction_write() 52 struct snd_motu *motu = callback_data; in handle_message() local 61 if (offset != motu->async_handler.offset || length != 4) { in handle_message() 66 spin_lock_irqsave(&motu->lock, flags); in handle_message() 67 motu in handle_message() 75 snd_motu_transaction_reregister(struct snd_motu *motu) snd_motu_transaction_reregister() argument 97 snd_motu_transaction_register(struct snd_motu *motu) snd_motu_transaction_register() argument 124 snd_motu_transaction_unregister(struct snd_motu *motu) snd_motu_transaction_unregister() argument [all...] |
H A D | Makefile | 2 CFLAGS_amdtp-motu.o := -I$(src) 4 snd-firewire-motu-objs := motu.o amdtp-motu.o motu-transaction.o motu-stream.o \ 5 motu-proc.o motu-pcm.o motu-midi.o motu [all...] |
H A D | motu-proc.c | 3 * motu-proc.c - a part of driver for MOTU FireWire series 8 #include "./motu.h" 30 struct snd_motu *motu = entry->private_data; in proc_read_clock() local 34 if (snd_motu_protocol_get_clock_rate(motu, &rate) < 0) in proc_read_clock() 36 if (snd_motu_protocol_get_clock_source(motu, &source) < 0) in proc_read_clock() 46 struct snd_motu *motu = entry->private_data; in proc_read_format() local 51 if (snd_motu_protocol_cache_packet_formats(motu) < 0) in proc_read_format() 58 formats = &motu->tx_packet_formats; in proc_read_format() 63 motu->spec->tx_fixed_pcm_chunks[mode], in proc_read_format() 71 formats = &motu in proc_read_format() 81 add_node(struct snd_motu *motu, struct snd_info_entry *root, const char *name, void (*op)(struct snd_info_entry *e, struct snd_info_buffer *b)) add_node() argument 93 snd_motu_proc_init(struct snd_motu *motu) snd_motu_proc_init() argument [all...] |
/kernel/linux/linux-6.6/sound/firewire/motu/ |
H A D | motu-stream.c | 3 * motu-stream.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 28 static int keep_resources(struct snd_motu *motu, unsigned int rate, in keep_resources() argument 36 if (stream == &motu->rx_stream) { in keep_resources() 37 resources = &motu->rx_resources; in keep_resources() 38 packet_format = &motu->rx_packet_formats; in keep_resources() 40 if ((motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_2ND_Q) || in keep_resources() 41 (motu->spec->flags & SND_MOTU_SPEC_RX_MIDI_3RD_Q)) in keep_resources() 44 resources = &motu->tx_resources; in keep_resources() 45 packet_format = &motu in keep_resources() 62 begin_session(struct snd_motu *motu) begin_session() argument 85 finish_session(struct snd_motu *motu) finish_session() argument 109 snd_motu_stream_cache_packet_formats(struct snd_motu *motu) snd_motu_stream_cache_packet_formats() argument 136 snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate, unsigned int frames_per_period, unsigned int frames_per_buffer) snd_motu_stream_reserve_duplex() argument 201 ensure_packet_formats(struct snd_motu *motu) ensure_packet_formats() argument 227 snd_motu_stream_start_duplex(struct snd_motu *motu) snd_motu_stream_start_duplex() argument 318 snd_motu_stream_stop_duplex(struct snd_motu *motu) snd_motu_stream_stop_duplex() argument 332 init_stream(struct snd_motu *motu, struct amdtp_stream *s) init_stream() argument 357 destroy_stream(struct snd_motu *motu, struct amdtp_stream *s) destroy_stream() argument 367 snd_motu_stream_init_duplex(struct snd_motu *motu) snd_motu_stream_init_duplex() argument 392 snd_motu_stream_destroy_duplex(struct snd_motu *motu) snd_motu_stream_destroy_duplex() argument 402 motu_lock_changed(struct snd_motu *motu) motu_lock_changed() argument 408 snd_motu_stream_lock_try(struct snd_motu *motu) snd_motu_stream_lock_try() argument 427 snd_motu_stream_lock_release(struct snd_motu *motu) snd_motu_stream_lock_release() argument [all...] |
H A D | motu.h | 3 * motu.h - a part of driver for MOTU FireWire series 159 int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg, 161 int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg, 163 int snd_motu_transaction_register(struct snd_motu *motu); 164 int snd_motu_transaction_reregister(struct snd_motu *motu); 165 void snd_motu_transaction_unregister(struct snd_motu *motu); 167 int snd_motu_stream_init_duplex(struct snd_motu *motu); 168 void snd_motu_stream_destroy_duplex(struct snd_motu *motu); 169 int snd_motu_stream_cache_packet_formats(struct snd_motu *motu); 170 int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigne 216 snd_motu_protocol_get_clock_rate(struct snd_motu *motu, unsigned int *rate) snd_motu_protocol_get_clock_rate() argument 229 snd_motu_protocol_set_clock_rate(struct snd_motu *motu, unsigned int rate) snd_motu_protocol_set_clock_rate() argument 242 snd_motu_protocol_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *source) snd_motu_protocol_get_clock_source() argument 255 snd_motu_protocol_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_switch_fetching_mode() argument 268 snd_motu_protocol_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_cache_packet_formats() argument [all...] |
H A D | motu.c | 3 * motu.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 28 static void name_card(struct snd_motu *motu) in name_card() argument 30 struct fw_device *fw_dev = fw_parent_device(motu->unit); in name_card() 35 fw_csr_iterator_init(&it, motu->unit->directory); in name_card() 44 strcpy(motu->card->driver, "FW-MOTU"); in name_card() 45 strcpy(motu->card->shortname, motu->spec->name); in name_card() 46 strcpy(motu->card->mixername, motu in name_card() 56 struct snd_motu *motu = card->private_data; motu_card_free() local 68 struct snd_motu *motu; motu_probe() local 137 struct snd_motu *motu = dev_get_drvdata(&unit->device); motu_remove() local 145 struct snd_motu *motu = dev_get_drvdata(&unit->device); motu_bus_update() local [all...] |
H A D | motu-protocol-v1.c | 2 // motu-protocol-v1.c - a part of driver for MOTU FireWire series 6 #include "motu.h" 12 // 0xffff0000: ISOC_COMM_CONTROL_MASK in motu-stream.c. 133 static int get_clock_rate_828(struct snd_motu *motu, unsigned int *rate) in get_clock_rate_828() argument 138 err = snd_motu_transaction_read(motu, CLK_828_STATUS_OFFSET, ®, sizeof(reg)); in get_clock_rate_828() 168 static int get_clock_rate_896(struct snd_motu *motu, unsigned int *rate) in get_clock_rate_896() argument 173 err = snd_motu_transaction_read(motu, CLK_896_STATUS_OFFSET, ®, sizeof(reg)); in get_clock_rate_896() 179 int snd_motu_protocol_v1_get_clock_rate(struct snd_motu *motu, unsigned int *rate) in snd_motu_protocol_v1_get_clock_rate() argument 181 if (motu->spec == &snd_motu_spec_828) in snd_motu_protocol_v1_get_clock_rate() 182 return get_clock_rate_828(motu, rat in snd_motu_protocol_v1_get_clock_rate() 189 set_clock_rate_828(struct snd_motu *motu, unsigned int rate) set_clock_rate_828() argument 208 set_clock_rate_896(struct snd_motu *motu, unsigned int rate) set_clock_rate_896() argument 244 snd_motu_protocol_v1_set_clock_rate(struct snd_motu *motu, unsigned int rate) snd_motu_protocol_v1_set_clock_rate() argument 254 get_clock_source_828(struct snd_motu *motu, enum snd_motu_clock_source *src) get_clock_source_828() argument 293 get_clock_source_896(struct snd_motu *motu, enum snd_motu_clock_source *src) get_clock_source_896() argument 330 snd_motu_protocol_v1_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *src) snd_motu_protocol_v1_get_clock_source() argument 340 switch_fetching_mode_828(struct snd_motu *motu, bool enable) switch_fetching_mode_828() argument 364 switch_fetching_mode_896(struct snd_motu *motu, bool enable) switch_fetching_mode_896() argument 383 snd_motu_protocol_v1_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_v1_switch_fetching_mode() argument 393 detect_packet_formats_828(struct snd_motu *motu) detect_packet_formats_828() argument 420 detect_packet_formats_896(struct snd_motu *motu) detect_packet_formats_896() argument 441 snd_motu_protocol_v1_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_v1_cache_packet_formats() argument [all...] |
H A D | motu-pcm.c | 3 * motu-pcm.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 69 static void limit_channels_and_rates(struct snd_motu *motu, in limit_channels_and_rates() argument 95 static int init_hw_info(struct snd_motu *motu, in init_hw_info() argument 106 stream = &motu->tx_stream; in init_hw_info() 107 formats = &motu->tx_packet_formats; in init_hw_info() 110 stream = &motu->rx_stream; in init_hw_info() 111 formats = &motu->rx_packet_formats; in init_hw_info() 114 limit_channels_and_rates(motu, runtime, formats); in init_hw_info() 132 struct snd_motu *motu in pcm_open() local 200 struct snd_motu *motu = substream->private_data; pcm_close() local 210 struct snd_motu *motu = substream->private_data; pcm_hw_params() local 231 struct snd_motu *motu = substream->private_data; pcm_hw_free() local 247 struct snd_motu *motu = substream->private_data; capture_prepare() local 260 struct snd_motu *motu = substream->private_data; playback_prepare() local 274 struct snd_motu *motu = substream->private_data; capture_trigger() local 291 struct snd_motu *motu = substream->private_data; playback_trigger() local 309 struct snd_motu *motu = substream->private_data; capture_pointer() local 315 struct snd_motu *motu = substream->private_data; playback_pointer() local 322 struct snd_motu *motu = substream->private_data; capture_ack() local 329 struct snd_motu *motu = substream->private_data; playback_ack() local 334 snd_motu_create_pcm_devices(struct snd_motu *motu) snd_motu_create_pcm_devices() argument [all...] |
H A D | motu-hwdep.c | 3 * motu-hwdep.c - a part of driver for MOTU FireWire series 17 #include "motu.h" 19 static bool has_dsp_event(struct snd_motu *motu) in has_dsp_event() argument 21 if (motu->spec->flags & SND_MOTU_SPEC_REGISTER_DSP) in has_dsp_event() 22 return (snd_motu_register_dsp_message_parser_count_event(motu) > 0); in has_dsp_event() 30 struct snd_motu *motu = hwdep->private_data; in hwdep_read() local 34 spin_lock_irq(&motu->lock); in hwdep_read() 36 while (!motu->dev_lock_changed && motu->msg == 0 && !has_dsp_event(motu)) { in hwdep_read() 102 struct snd_motu *motu = hwdep->private_data; hwdep_poll() local 117 hwdep_get_info(struct snd_motu *motu, void __user *arg) hwdep_get_info() argument 136 hwdep_lock(struct snd_motu *motu) hwdep_lock() argument 154 hwdep_unlock(struct snd_motu *motu) hwdep_unlock() argument 174 struct snd_motu *motu = hwdep->private_data; hwdep_release() local 187 struct snd_motu *motu = hwdep->private_data; hwdep_ioctl() local 277 snd_motu_create_hwdep_device(struct snd_motu *motu) snd_motu_create_hwdep_device() argument [all...] |
H A D | motu-midi.c | 3 * motu-midi.h - a part of driver for MOTU FireWire series 7 #include "motu.h" 11 struct snd_motu *motu = substream->rmidi->private_data; in midi_open() local 14 err = snd_motu_stream_lock_try(motu); in midi_open() 18 mutex_lock(&motu->mutex); in midi_open() 20 err = snd_motu_stream_reserve_duplex(motu, 0, 0, 0); in midi_open() 22 ++motu->substreams_counter; in midi_open() 23 err = snd_motu_stream_start_duplex(motu); in midi_open() 25 --motu->substreams_counter; in midi_open() 28 mutex_unlock(&motu in midi_open() 38 struct snd_motu *motu = substream->rmidi->private_data; midi_close() local 53 struct snd_motu *motu = substrm->rmidi->private_data; midi_capture_trigger() local 70 struct snd_motu *motu = substrm->rmidi->private_data; midi_playback_trigger() local 85 set_midi_substream_names(struct snd_motu *motu, struct snd_rawmidi_str *str) set_midi_substream_names() argument 96 snd_motu_create_midi_devices(struct snd_motu *motu) snd_motu_create_midi_devices() argument [all...] |
H A D | motu-transaction.c | 3 * motu-transaction.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 15 int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg, in snd_motu_transaction_read() argument 27 return snd_fw_transaction(motu->unit, tcode, in snd_motu_transaction_read() 31 int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg, in snd_motu_transaction_write() argument 43 return snd_fw_transaction(motu->unit, tcode, in snd_motu_transaction_write() 52 struct snd_motu *motu = callback_data; in handle_message() local 61 if (offset != motu->async_handler.offset || length != 4) { in handle_message() 66 spin_lock_irqsave(&motu->lock, flags); in handle_message() 67 motu in handle_message() 75 snd_motu_transaction_reregister(struct snd_motu *motu) snd_motu_transaction_reregister() argument 97 snd_motu_transaction_register(struct snd_motu *motu) snd_motu_transaction_register() argument 124 snd_motu_transaction_unregister(struct snd_motu *motu) snd_motu_transaction_unregister() argument [all...] |
H A D | motu-protocol-v2.c | 3 * motu-protocol-v2.c - a part of driver for MOTU FireWire series 8 #include "motu.h" 45 int snd_motu_protocol_v2_get_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v2_get_clock_rate() argument 51 err = snd_motu_transaction_read(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_get_clock_rate() 59 int snd_motu_protocol_v2_set_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v2_set_clock_rate() argument 74 err = snd_motu_transaction_read(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_set_clock_rate() 84 return snd_motu_transaction_write(motu, V2_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v2_set_clock_rate() 88 static int get_clock_source(struct snd_motu *motu, u32 data, in get_clock_source() argument 100 bool support_iec60958_on_opt = (motu->spec == &snd_motu_spec_828mk2 || in get_clock_source() 101 motu in get_clock_source() 145 snd_motu_protocol_v2_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *src) snd_motu_protocol_v2_get_clock_source() argument 160 switch_fetching_mode_cyclone(struct snd_motu *motu, u32 *data, bool enable) switch_fetching_mode_cyclone() argument 169 switch_fetching_mode_spartan(struct snd_motu *motu, u32 *data, bool enable) switch_fetching_mode_spartan() argument 190 snd_motu_protocol_v2_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_v2_switch_fetching_mode() argument 227 snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_v2_cache_packet_formats() argument [all...] |
H A D | motu-protocol-v3.c | 3 * motu-protocol-v3.c - a part of driver for MOTU FireWire series 9 #include "motu.h" 37 int snd_motu_protocol_v3_get_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_get_clock_rate() argument 44 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_get_clock_rate() 59 int snd_motu_protocol_v3_set_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_set_clock_rate() argument 74 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 86 err = snd_motu_transaction_write(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 94 motu->msg = 0; in snd_motu_protocol_v3_set_clock_rate() 95 result = wait_event_interruptible_timeout(motu->hwdep_wait, in snd_motu_protocol_v3_set_clock_rate() 96 motu in snd_motu_protocol_v3_set_clock_rate() 107 snd_motu_protocol_v3_get_clock_source(struct snd_motu *motu, enum snd_motu_clock_source *src) snd_motu_protocol_v3_get_clock_source() argument 169 snd_motu_protocol_v3_switch_fetching_mode(struct snd_motu *motu, bool enable) snd_motu_protocol_v3_switch_fetching_mode() argument 192 detect_packet_formats_with_opt_ifaces(struct snd_motu *motu, u32 data) detect_packet_formats_with_opt_ifaces() argument 237 snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu) snd_motu_protocol_v3_cache_packet_formats() argument [all...] |
H A D | Makefile | 2 CFLAGS_amdtp-motu.o := -I$(src) 4 snd-firewire-motu-objs := motu.o amdtp-motu.o motu-transaction.o motu-stream.o \ 5 motu-proc.o motu-pcm.o motu-midi.o motu [all...] |
H A D | motu-proc.c | 3 * motu-proc.c - a part of driver for MOTU FireWire series 8 #include "./motu.h" 30 struct snd_motu *motu = entry->private_data; in proc_read_clock() local 34 if (snd_motu_protocol_get_clock_rate(motu, &rate) < 0) in proc_read_clock() 36 if (snd_motu_protocol_get_clock_source(motu, &source) < 0) in proc_read_clock() 46 struct snd_motu *motu = entry->private_data; in proc_read_format() local 51 if (snd_motu_protocol_cache_packet_formats(motu) < 0) in proc_read_format() 58 formats = &motu->tx_packet_formats; in proc_read_format() 63 motu->spec->tx_fixed_pcm_chunks[mode], in proc_read_format() 71 formats = &motu in proc_read_format() 81 add_node(struct snd_motu *motu, struct snd_info_entry *root, const char *name, void (*op)(struct snd_info_entry *e, struct snd_info_buffer *b)) add_node() argument 93 snd_motu_proc_init(struct snd_motu *motu) snd_motu_proc_init() argument [all...] |
H A D | motu-register-dsp-message-parser.c | 3 // motu-register-dsp-message-parser.c - a part of driver for MOTU FireWire series 22 #include "motu.h" 101 int snd_motu_register_dsp_message_parser_new(struct snd_motu *motu) in snd_motu_register_dsp_message_parser_new() argument 104 parser = devm_kzalloc(&motu->card->card_dev, sizeof(*parser), GFP_KERNEL); in snd_motu_register_dsp_message_parser_new() 108 if (motu->spec == &snd_motu_spec_4pre || motu->spec == &snd_motu_spec_audio_express) in snd_motu_register_dsp_message_parser_new() 110 motu->message_parser = parser; in snd_motu_register_dsp_message_parser_new() 114 int snd_motu_register_dsp_message_parser_init(struct snd_motu *motu) in snd_motu_register_dsp_message_parser_init() argument 116 struct msg_parser *parser = motu->message_parser; in snd_motu_register_dsp_message_parser_init() 127 static void queue_event(struct snd_motu *motu, u argument 148 struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream); snd_motu_register_dsp_message_parser_parse() local 370 snd_motu_register_dsp_message_parser_copy_meter(struct snd_motu *motu, struct snd_firewire_motu_register_dsp_meter *meter) snd_motu_register_dsp_message_parser_copy_meter() argument 381 snd_motu_register_dsp_message_parser_copy_parameter(struct snd_motu *motu, struct snd_firewire_motu_register_dsp_parameter *param) snd_motu_register_dsp_message_parser_copy_parameter() argument 392 snd_motu_register_dsp_message_parser_count_event(struct snd_motu *motu) snd_motu_register_dsp_message_parser_count_event() argument 402 snd_motu_register_dsp_message_parser_copy_event(struct snd_motu *motu, u32 *event) snd_motu_register_dsp_message_parser_copy_event() argument [all...] |
H A D | motu-command-dsp-message-parser.c | 3 // motu-command-dsp-message-parser.c - a part of driver for MOTU FireWire series 17 #include "motu.h" 36 int snd_motu_command_dsp_message_parser_new(struct snd_motu *motu) in snd_motu_command_dsp_message_parser_new() argument 40 parser = devm_kzalloc(&motu->card->card_dev, sizeof(*parser), GFP_KERNEL); in snd_motu_command_dsp_message_parser_new() 44 motu->message_parser = parser; in snd_motu_command_dsp_message_parser_new() 49 int snd_motu_command_dsp_message_parser_init(struct snd_motu *motu, enum cip_sfc sfc) in snd_motu_command_dsp_message_parser_init() argument 51 struct msg_parser *parser = motu->message_parser; in snd_motu_command_dsp_message_parser_init() 86 struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream); in snd_motu_command_dsp_message_parser_parse() local 88 struct msg_parser *parser = motu->message_parser; in snd_motu_command_dsp_message_parser_parse() 175 void snd_motu_command_dsp_message_parser_copy_meter(struct snd_motu *motu, in snd_motu_command_dsp_message_parser_copy_meter() argument [all...] |