/kernel/linux/linux-5.10/sound/firewire/motu/ |
D | motu-stream.c | 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->tx_packet_formats; in keep_resources() 47 if ((motu->spec->flags & SND_MOTU_SPEC_TX_MIDI_2ND_Q) || in keep_resources() 48 (motu->spec->flags & SND_MOTU_SPEC_TX_MIDI_3RD_Q)) in keep_resources() [all …]
|
D | motu.c | 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->spec->name); in name_card() 47 snprintf(motu->card->longname, sizeof(motu->card->longname), in name_card() 49 motu->spec->name, version, in name_card() 51 dev_name(&motu->unit->device), 100 << fw_dev->max_speed); in name_card() 56 struct snd_motu *motu = card->private_data; in motu_card_free() local [all …]
|
D | motu.h | 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, unsigned int rate, 150 int snd_motu_stream_start_duplex(struct snd_motu *motu); [all …]
|
D | motu-hwdep.c | 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->lock); in hwdep_read() 39 if (motu->dev_lock_changed) { in hwdep_read() 41 event.lock_status.status = (motu->dev_lock_count > 0); in hwdep_read() 42 motu->dev_lock_changed = false; in hwdep_read() [all …]
|
D | motu-protocol-v2.c | 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, u32 data, in v2_detect_clock_source() argument 147 static int get_clock_source(struct snd_motu *motu, u32 data, in get_clock_source() argument 151 if (motu->spec == &snd_motu_spec_828mk2 || in get_clock_source() [all …]
|
D | motu-midi.c | 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->mutex); in midi_open() 31 snd_motu_stream_lock_release(motu); in midi_open() 38 struct snd_motu *motu = substream->rmidi->private_data; in midi_close() local [all …]
|
D | motu-protocol-v3.c | 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->msg & V3_MSG_FLAG_CLK_CHANGED, in snd_motu_protocol_v3_set_clock_rate() 100 static int detect_clock_source_828mk3(struct snd_motu *motu, u32 data, in detect_clock_source_828mk3() argument 123 err = snd_motu_transaction_read(motu, in detect_clock_source_828mk3() [all …]
|
D | motu-pcm.c | 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 = substream->private_data; in pcm_open() local 133 struct amdtp_domain *d = &motu->domain; in pcm_open() 137 err = snd_motu_stream_lock_try(motu); in pcm_open() [all …]
|
D | motu-transaction.c | 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->msg = be32_to_cpu(*buf); in handle_message() 68 spin_unlock_irqrestore(&motu->lock, flags); in handle_message() 72 wake_up(&motu->hwdep_wait); in handle_message() [all …]
|
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-hwdep.o \ 6 motu-protocol-v2.o motu-protocol-v3.o 7 obj-$(CONFIG_SND_FIREWIRE_MOTU) += snd-firewire-motu.o
|
D | motu-proc.c | 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->rx_packet_formats; in proc_read_format() 76 motu->spec->rx_fixed_pcm_chunks[mode], in proc_read_format() 81 static void add_node(struct snd_motu *motu, struct snd_info_entry *root, in add_node() argument [all …]
|
D | amdtp-motu-trace.h | 84 #define TRACE_INCLUDE_FILE amdtp-motu-trace
|
/kernel/linux/linux-5.10/sound/firewire/ |
D | Makefile | 17 obj-$(CONFIG_SND_FIREWIRE_MOTU) += motu/
|
D | Kconfig | 162 will be called snd-firewire-motu.
|