/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.h | 152 int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg, 154 int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg, 156 int snd_motu_transaction_register(struct snd_motu *motu); 157 int snd_motu_transaction_reregister(struct snd_motu *motu); 158 void snd_motu_transaction_unregister(struct snd_motu *motu); 160 int snd_motu_stream_init_duplex(struct snd_motu *motu); 161 void snd_motu_stream_destroy_duplex(struct snd_motu *motu); 162 int snd_motu_stream_cache_packet_formats(struct snd_motu *motu); 163 int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate, 166 int snd_motu_stream_start_duplex(struct snd_motu *motu); [all …]
|
D | motu-protocol-v1.c | 136 static int get_clock_rate_828(struct snd_motu *motu, unsigned int *rate) in get_clock_rate_828() argument 141 err = snd_motu_transaction_read(motu, CLK_828_STATUS_OFFSET, ®, sizeof(reg)); in get_clock_rate_828() 171 static int get_clock_rate_896(struct snd_motu *motu, unsigned int *rate) in get_clock_rate_896() argument 176 err = snd_motu_transaction_read(motu, CLK_896_STATUS_OFFSET, ®, sizeof(reg)); in get_clock_rate_896() 182 int snd_motu_protocol_v1_get_clock_rate(struct snd_motu *motu, unsigned int *rate) in snd_motu_protocol_v1_get_clock_rate() argument 184 if (motu->spec == &snd_motu_spec_828) in snd_motu_protocol_v1_get_clock_rate() 185 return get_clock_rate_828(motu, rate); in snd_motu_protocol_v1_get_clock_rate() 186 else if (motu->spec == &snd_motu_spec_896) in snd_motu_protocol_v1_get_clock_rate() 187 return get_clock_rate_896(motu, rate); in snd_motu_protocol_v1_get_clock_rate() 192 static int set_clock_rate_828(struct snd_motu *motu, unsigned int rate) in set_clock_rate_828() argument [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.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-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-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-protocol-v3.c | 36 int snd_motu_protocol_v3_get_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_get_clock_rate() argument 43 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_get_clock_rate() 58 int snd_motu_protocol_v3_set_clock_rate(struct snd_motu *motu, in snd_motu_protocol_v3_set_clock_rate() argument 73 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 85 err = snd_motu_transaction_write(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_set_clock_rate() 93 motu->msg = 0; in snd_motu_protocol_v3_set_clock_rate() 94 result = wait_event_interruptible_timeout(motu->hwdep_wait, in snd_motu_protocol_v3_set_clock_rate() 95 motu->msg & V3_MSG_FLAG_CLK_CHANGED, in snd_motu_protocol_v3_set_clock_rate() 106 int snd_motu_protocol_v3_get_clock_source(struct snd_motu *motu, in snd_motu_protocol_v3_get_clock_source() argument 113 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®, in snd_motu_protocol_v3_get_clock_source() [all …]
|
D | motu-protocol-v2.c | 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->spec == &snd_motu_spec_traveler); in get_clock_source() 103 if (motu->spec == &snd_motu_spec_896hd) { in get_clock_source() 111 int err = snd_motu_transaction_read(motu, V2_IN_OUT_CONF_OFFSET, ®, in get_clock_source() [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 motu-protocol-v1.o 8 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
|
/sound/firewire/ |
D | Makefile | 17 obj-$(CONFIG_SND_FIREWIRE_MOTU) += motu/
|
D | Kconfig | 183 will be called snd-firewire-motu.
|