Home
last modified time | relevance | path

Searched refs:motu (Results 1 – 18 of 18) sorted by relevance

/Linux-v6.6/sound/firewire/motu/
Dmotu-stream.c28 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 …]
Dmotu.h159 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, unsigned int rate,
173 int snd_motu_stream_start_duplex(struct snd_motu *motu);
[all …]
Dmotu-hwdep.c19 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()
37 prepare_to_wait(&motu->hwdep_wait, &wait, TASK_INTERRUPTIBLE); in hwdep_read()
38 spin_unlock_irq(&motu->lock); in hwdep_read()
40 finish_wait(&motu->hwdep_wait, &wait); in hwdep_read()
43 spin_lock_irq(&motu->lock); in hwdep_read()
[all …]
Dmotu-protocol-v1.c133 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, &reg, 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, &reg, 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, rate); in snd_motu_protocol_v1_get_clock_rate()
183 else if (motu->spec == &snd_motu_spec_896) in snd_motu_protocol_v1_get_clock_rate()
184 return get_clock_rate_896(motu, rate); in snd_motu_protocol_v1_get_clock_rate()
189 static int set_clock_rate_828(struct snd_motu *motu, unsigned int rate) in set_clock_rate_828() argument
[all …]
Dmotu.c28 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 …]
Dmotu-midi.c11 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 …]
Dmotu-pcm.c69 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 …]
Dmotu-protocol-v3.c37 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, &reg, 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, &reg, in snd_motu_protocol_v3_set_clock_rate()
86 err = snd_motu_transaction_write(motu, V3_CLOCK_STATUS_OFFSET, &reg, 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->msg & V3_MSG_FLAG_CLK_CHANGED, in snd_motu_protocol_v3_set_clock_rate()
107 int snd_motu_protocol_v3_get_clock_source(struct snd_motu *motu, in snd_motu_protocol_v3_get_clock_source() argument
114 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, &reg, in snd_motu_protocol_v3_get_clock_source()
[all …]
Dmotu-transaction.c15 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 …]
Dmotu-protocol-v2.c45 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, &reg, 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, &reg, in snd_motu_protocol_v2_set_clock_rate()
84 return snd_motu_transaction_write(motu, V2_CLOCK_STATUS_OFFSET, &reg, 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, &reg, in get_clock_source()
[all …]
DMakefile2 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 motu-register-dsp-message-parser.o \
8 motu-command-dsp-message-parser.o
9 obj-$(CONFIG_SND_FIREWIRE_MOTU) += snd-firewire-motu.o
Dmotu-proc.c30 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 …]
Dmotu-register-dsp-message-parser.c101 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, u8 msg_type, u8 identifier0, u8 identifier1, u8 val) in queue_event() argument
129 struct msg_parser *parser = motu->message_parser; in queue_event()
133 if (!motu->hwdep || motu->hwdep->used == 0) in queue_event()
148 struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream); in snd_motu_register_dsp_message_parser_parse() local
[all …]
Dmotu-command-dsp-message-parser.c36 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
178 struct msg_parser *parser = motu->message_parser; in snd_motu_command_dsp_message_parser_copy_meter()
Damdtp-motu.c334 struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream); in process_ir_ctx_payloads() local
362 if (motu->spec->flags & SND_MOTU_SPEC_REGISTER_DSP) in process_ir_ctx_payloads()
364 else if (motu->spec->flags & SND_MOTU_SPEC_COMMAND_DSP) in process_ir_ctx_payloads()
Damdtp-motu-trace.h84 #define TRACE_INCLUDE_FILE amdtp-motu-trace
/Linux-v6.6/sound/firewire/
DMakefile17 obj-$(CONFIG_SND_FIREWIRE_MOTU) += motu/
DKconfig186 will be called snd-firewire-motu.