Lines Matching refs:err

34 	int err;
52 err = amdtp_motu_set_parameters(stream, rate, midi_ports,
54 if (err < 0)
55 return err;
66 int err;
69 err = snd_motu_transaction_read(motu, ISOC_COMM_CONTROL_OFFSET, &reg,
71 if (err < 0)
72 return err;
89 int err;
91 err = snd_motu_protocol_switch_fetching_mode(motu, false);
92 if (err < 0)
95 err = snd_motu_transaction_read(motu, ISOC_COMM_CONTROL_OFFSET, &reg,
97 if (err < 0)
111 int err;
113 err = snd_motu_protocol_cache_packet_formats(motu);
114 if (err < 0)
115 return err;
141 int err;
143 err = snd_motu_protocol_get_clock_rate(motu, &curr_rate);
144 if (err < 0)
145 return err;
159 err = snd_motu_protocol_set_clock_rate(motu, rate);
160 if (err < 0) {
162 "fail to set sampling rate: %d\n", err);
163 return err;
166 err = snd_motu_stream_cache_packet_formats(motu);
167 if (err < 0)
168 return err;
170 err = keep_resources(motu, rate, &motu->tx_stream);
171 if (err < 0)
172 return err;
174 err = keep_resources(motu, rate, &motu->rx_stream);
175 if (err < 0) {
177 return err;
180 err = amdtp_domain_set_events_per_period(&motu->domain,
182 if (err < 0) {
185 return err;
205 int err;
207 err = snd_motu_transaction_read(motu, PACKET_FORMAT_OFFSET, &reg,
209 if (err < 0)
210 return err;
230 int err = 0;
242 err = fw_iso_resources_update(&motu->rx_resources);
243 if (err < 0)
244 return err;
246 err = fw_iso_resources_update(&motu->tx_resources);
247 if (err < 0)
248 return err;
254 err = ensure_packet_formats(motu);
255 if (err < 0)
256 return err;
259 err = snd_motu_register_dsp_message_parser_init(motu);
260 if (err < 0)
261 return err;
263 err = snd_motu_command_dsp_message_parser_init(motu, motu->tx_stream.sfc);
264 if (err < 0)
265 return err;
268 err = begin_session(motu);
269 if (err < 0) {
271 "fail to start isochronous comm: %d\n", err);
275 err = amdtp_domain_add_stream(&motu->domain, &motu->tx_stream,
277 if (err < 0)
280 err = amdtp_domain_add_stream(&motu->domain, &motu->rx_stream,
282 if (err < 0)
293 err = amdtp_domain_start(&motu->domain, 0, true, false);
294 if (err < 0)
298 err = -ETIMEDOUT;
302 err = snd_motu_protocol_switch_fetching_mode(motu, true);
303 if (err < 0) {
305 "fail to enable frame fetching: %d\n", err);
315 return err;
336 int err;
346 err = fw_iso_resources_init(resources, motu->unit);
347 if (err < 0)
348 return err;
350 err = amdtp_motu_init(s, motu->unit, dir, motu->spec, &motu->cache);
351 if (err < 0)
354 return err;
369 int err;
371 err = init_stream(motu, &motu->tx_stream);
372 if (err < 0)
373 return err;
375 err = init_stream(motu, &motu->rx_stream);
376 if (err < 0) {
378 return err;
381 err = amdtp_domain_init(&motu->domain);
382 if (err < 0) {
387 return err;
410 int err;
415 err = -EBUSY;
421 err = 0;
424 return err;