• Home
  • Raw
  • Download

Lines Matching refs:err

44 	int err;  in set_rate()  local
46 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate()
48 if (err < 0) in set_rate()
52 err = avc_general_set_sig_fmt(oxfw->unit, rate, in set_rate()
55 return err; in set_rate()
65 int i, err; in set_stream_format() local
77 err = snd_oxfw_stream_parse_format(formats[i], &formation); in set_stream_format()
78 if (err < 0) in set_stream_format()
79 return err; in set_stream_format()
94 err = avc_stream_set_format(oxfw->unit, dir, 0, formats[i], len); in set_stream_format()
95 if (err < 0) in set_stream_format()
96 return err; in set_stream_format()
122 int err; in start_stream() local
137 err = snd_oxfw_stream_parse_format(formats[i], &formation); in start_stream()
138 if (err < 0) in start_stream()
146 err = -EINVAL; in start_stream()
155 err = -EINVAL; in start_stream()
158 err = amdtp_am824_set_parameters(stream, rate, pcm_channels, midi_ports, in start_stream()
160 if (err < 0) in start_stream()
163 err = cmp_connection_establish(conn, in start_stream()
165 if (err < 0) in start_stream()
168 err = amdtp_stream_start(stream, in start_stream()
171 if (err < 0) { in start_stream()
179 err = -ETIMEDOUT; in start_stream()
182 return err; in start_stream()
190 int err; in check_connection_used_by_others() local
197 err = cmp_connection_check_used(conn, &used); in check_connection_used_by_others()
198 if ((err >= 0) && used && !amdtp_stream_running(stream)) { in check_connection_used_by_others()
203 err = -EBUSY; in check_connection_used_by_others()
206 return err; in check_connection_used_by_others()
215 int err; in snd_oxfw_stream_init_simplex() local
227 err = cmp_connection_init(conn, oxfw->unit, c_dir, 0); in snd_oxfw_stream_init_simplex()
228 if (err < 0) in snd_oxfw_stream_init_simplex()
231 err = amdtp_am824_init(stream, oxfw->unit, s_dir, CIP_NONBLOCKING); in snd_oxfw_stream_init_simplex()
232 if (err < 0) { in snd_oxfw_stream_init_simplex()
250 return err; in snd_oxfw_stream_init_simplex()
261 int err = 0; in snd_oxfw_stream_start_simplex() local
287 err = check_connection_used_by_others(oxfw, stream); in snd_oxfw_stream_start_simplex()
288 if (err < 0) in snd_oxfw_stream_start_simplex()
295 err = snd_oxfw_stream_get_current_formation(oxfw, dir, &formation); in snd_oxfw_stream_start_simplex()
296 if (err < 0) in snd_oxfw_stream_start_simplex()
305 err = check_connection_used_by_others(oxfw, opposite); in snd_oxfw_stream_start_simplex()
306 if (err < 0) in snd_oxfw_stream_start_simplex()
312 err = set_stream_format(oxfw, stream, rate, pcm_channels); in snd_oxfw_stream_start_simplex()
313 if (err < 0) { in snd_oxfw_stream_start_simplex()
315 "fail to set stream format: %d\n", err); in snd_oxfw_stream_start_simplex()
322 err = start_stream(oxfw, opposite, rate, 0); in snd_oxfw_stream_start_simplex()
323 if (err < 0) { in snd_oxfw_stream_start_simplex()
325 "fail to restart stream: %d\n", err); in snd_oxfw_stream_start_simplex()
333 err = start_stream(oxfw, stream, rate, pcm_channels); in snd_oxfw_stream_start_simplex()
334 if (err < 0) in snd_oxfw_stream_start_simplex()
336 "fail to start stream: %d\n", err); in snd_oxfw_stream_start_simplex()
339 return err; in snd_oxfw_stream_start_simplex()
392 int err; in snd_oxfw_stream_get_current_formation() local
399 err = avc_stream_get_format_single(oxfw->unit, dir, 0, format, &len); in snd_oxfw_stream_get_current_formation()
400 if (err < 0) in snd_oxfw_stream_get_current_formation()
403 err = -EIO; in snd_oxfw_stream_get_current_formation()
407 err = snd_oxfw_stream_parse_format(format, formation); in snd_oxfw_stream_get_current_formation()
410 return err; in snd_oxfw_stream_get_current_formation()
502 int err; in assume_stream_formats() local
505 err = avc_stream_get_format_single(oxfw->unit, dir, pid, buf, len); in assume_stream_formats()
506 if (err < 0) { in assume_stream_formats()
510 pid, err); in assume_stream_formats()
516 err = snd_oxfw_stream_parse_format(buf, &formation); in assume_stream_formats()
517 if (err < 0) in assume_stream_formats()
522 err = -ENOMEM; in assume_stream_formats()
531 err = avc_general_inquiry_sig_fmt(oxfw->unit, in assume_stream_formats()
534 if (err < 0) in assume_stream_formats()
540 err = -ENOMEM; in assume_stream_formats()
546 err = 0; in assume_stream_formats()
549 return err; in assume_stream_formats()
559 int err; in fill_stream_formats() local
572 err = avc_stream_get_format_list(oxfw->unit, dir, 0, buf, &len, 0); in fill_stream_formats()
573 if (err == -ENOSYS) { in fill_stream_formats()
576 err = assume_stream_formats(oxfw, dir, pid, buf, &len, in fill_stream_formats()
579 } else if (err < 0) { in fill_stream_formats()
583 pid, err); in fill_stream_formats()
591 err = -EIO; in fill_stream_formats()
596 err = snd_oxfw_stream_parse_format(buf, &dummy); in fill_stream_formats()
597 if (err < 0) in fill_stream_formats()
602 err = -ENOMEM; in fill_stream_formats()
608 err = avc_stream_get_format_list(oxfw->unit, dir, 0, in fill_stream_formats()
611 if (err == -EINVAL) { in fill_stream_formats()
612 err = 0; in fill_stream_formats()
614 } else if (err < 0) { in fill_stream_formats()
619 pid, err); in fill_stream_formats()
625 return err; in fill_stream_formats()
634 int err; in snd_oxfw_stream_discover() local
637 err = avc_general_get_plug_info(oxfw->unit, 0x1f, 0x07, 0x00, plugs); in snd_oxfw_stream_discover()
638 if (err < 0) { in snd_oxfw_stream_discover()
641 err); in snd_oxfw_stream_discover()
644 err = -ENOSYS; in snd_oxfw_stream_discover()
650 err = fill_stream_formats(oxfw, AVC_GENERAL_PLUG_DIR_OUT, 0); in snd_oxfw_stream_discover()
651 if (err < 0) in snd_oxfw_stream_discover()
658 err = snd_oxfw_stream_parse_format(format, &formation); in snd_oxfw_stream_discover()
659 if (err < 0) in snd_oxfw_stream_discover()
672 err = fill_stream_formats(oxfw, AVC_GENERAL_PLUG_DIR_IN, 0); in snd_oxfw_stream_discover()
673 if (err < 0) in snd_oxfw_stream_discover()
680 err = snd_oxfw_stream_parse_format(format, &formation); in snd_oxfw_stream_discover()
681 if (err < 0) in snd_oxfw_stream_discover()
690 return err; in snd_oxfw_stream_discover()
701 int err; in snd_oxfw_stream_lock_try() local
707 err = -EBUSY; in snd_oxfw_stream_lock_try()
714 err = 0; in snd_oxfw_stream_lock_try()
717 return err; in snd_oxfw_stream_lock_try()