Lines Matching refs:err

67 	int err;  in snd_bebob_stream_get_rate()  local
71 err = avc_general_get_sig_fmt(bebob->unit, &tx_rate, in snd_bebob_stream_get_rate()
73 } while (err == -EAGAIN && ++trials < 3); in snd_bebob_stream_get_rate()
74 if (err < 0) in snd_bebob_stream_get_rate()
79 err = avc_general_get_sig_fmt(bebob->unit, &rx_rate, in snd_bebob_stream_get_rate()
81 } while (err == -EAGAIN && ++trials < 3); in snd_bebob_stream_get_rate()
82 if (err < 0) in snd_bebob_stream_get_rate()
90 err = avc_general_set_sig_fmt(bebob->unit, rx_rate, in snd_bebob_stream_get_rate()
93 return err; in snd_bebob_stream_get_rate()
99 int err; in snd_bebob_stream_set_rate() local
101 err = avc_general_set_sig_fmt(bebob->unit, rate, in snd_bebob_stream_set_rate()
103 if (err < 0) in snd_bebob_stream_set_rate()
106 err = avc_general_set_sig_fmt(bebob->unit, rate, in snd_bebob_stream_set_rate()
108 if (err < 0) in snd_bebob_stream_set_rate()
117 return err; in snd_bebob_stream_set_rate()
127 int err = 0; in snd_bebob_stream_get_clock_src() local
131 err = clk_spec->get(bebob, &id); in snd_bebob_stream_get_clock_src()
132 if (err < 0) { in snd_bebob_stream_get_clock_src()
134 "fail to get clock source: %d\n", err); in snd_bebob_stream_get_clock_src()
142 err = -EIO; in snd_bebob_stream_get_clock_src()
165 err = avc_bridgeco_get_plug_input(bebob->unit, addr, input); in snd_bebob_stream_get_clock_src()
166 if (err < 0) { in snd_bebob_stream_get_clock_src()
169 bebob->sync_input_plug, err); in snd_bebob_stream_get_clock_src()
222 err = avc_bridgeco_get_plug_type(bebob->unit, addr, in snd_bebob_stream_get_clock_src()
224 if (err < 0) in snd_bebob_stream_get_clock_src()
250 err = -EIO; in snd_bebob_stream_get_clock_src()
252 return err; in snd_bebob_stream_get_clock_src()
262 int err; in map_data_channels() local
278 err = avc_bridgeco_get_plug_ch_pos(bebob->unit, addr, buf, 256); in map_data_channels()
279 if (err < 0) { in map_data_channels()
283 err); in map_data_channels()
299 err = avc_bridgeco_get_plug_section_type(bebob->unit, addr, in map_data_channels()
301 if (err < 0) { in map_data_channels()
306 err); in map_data_channels()
311 err = -ENOSYS; in map_data_channels()
338 err = -ENOSYS; in map_data_channels()
358 err = -ENOSYS; in map_data_channels()
374 return err; in map_data_channels()
382 int err; in check_connection_used_by_others() local
389 err = cmp_connection_check_used(conn, &used); in check_connection_used_by_others()
390 if ((err >= 0) && used && !amdtp_stream_running(s)) { in check_connection_used_by_others()
395 err = -EBUSY; in check_connection_used_by_others()
398 return err; in check_connection_used_by_others()
416 int err = 0; in start_stream() local
425 err = map_data_channels(bebob, stream); in start_stream()
426 if (err < 0) in start_stream()
427 return err; in start_stream()
430 err = cmp_connection_establish(conn); in start_stream()
431 if (err < 0) in start_stream()
432 return err; in start_stream()
443 int err; in init_stream() local
455 err = cmp_connection_init(conn, bebob->unit, dir_conn, 0); in init_stream()
456 if (err < 0) in init_stream()
457 return err; in init_stream()
459 err = amdtp_am824_init(stream, bebob->unit, dir_stream, CIP_BLOCKING); in init_stream()
460 if (err < 0) { in init_stream()
462 return err; in init_stream()
496 int err; in snd_bebob_stream_init_duplex() local
498 err = init_stream(bebob, &bebob->tx_stream); in snd_bebob_stream_init_duplex()
499 if (err < 0) in snd_bebob_stream_init_duplex()
500 return err; in snd_bebob_stream_init_duplex()
502 err = init_stream(bebob, &bebob->rx_stream); in snd_bebob_stream_init_duplex()
503 if (err < 0) { in snd_bebob_stream_init_duplex()
505 return err; in snd_bebob_stream_init_duplex()
508 err = amdtp_domain_init(&bebob->domain); in snd_bebob_stream_init_duplex()
509 if (err < 0) { in snd_bebob_stream_init_duplex()
514 return err; in snd_bebob_stream_init_duplex()
522 int err; in keep_resources() local
532 err = amdtp_am824_set_parameters(stream, rate, formation->pcm, in keep_resources()
534 if (err < 0) in keep_resources()
535 return err; in keep_resources()
545 int err; in snd_bebob_stream_reserve_duplex() local
549 err = check_connection_used_by_others(bebob, &bebob->rx_stream); in snd_bebob_stream_reserve_duplex()
550 if (err < 0) in snd_bebob_stream_reserve_duplex()
551 return err; in snd_bebob_stream_reserve_duplex()
553 err = bebob->spec->rate->get(bebob, &curr_rate); in snd_bebob_stream_reserve_duplex()
554 if (err < 0) in snd_bebob_stream_reserve_duplex()
555 return err; in snd_bebob_stream_reserve_duplex()
574 err = bebob->spec->rate->set(bebob, rate); in snd_bebob_stream_reserve_duplex()
575 if (err < 0) { in snd_bebob_stream_reserve_duplex()
578 err); in snd_bebob_stream_reserve_duplex()
579 return err; in snd_bebob_stream_reserve_duplex()
582 err = get_formation_index(rate, &index); in snd_bebob_stream_reserve_duplex()
583 if (err < 0) in snd_bebob_stream_reserve_duplex()
584 return err; in snd_bebob_stream_reserve_duplex()
586 err = keep_resources(bebob, &bebob->tx_stream, rate, index); in snd_bebob_stream_reserve_duplex()
587 if (err < 0) in snd_bebob_stream_reserve_duplex()
588 return err; in snd_bebob_stream_reserve_duplex()
590 err = keep_resources(bebob, &bebob->rx_stream, rate, index); in snd_bebob_stream_reserve_duplex()
591 if (err < 0) { in snd_bebob_stream_reserve_duplex()
593 return err; in snd_bebob_stream_reserve_duplex()
596 err = amdtp_domain_set_events_per_period(&bebob->domain, in snd_bebob_stream_reserve_duplex()
598 if (err < 0) { in snd_bebob_stream_reserve_duplex()
601 return err; in snd_bebob_stream_reserve_duplex()
610 int err; in snd_bebob_stream_start_duplex() local
630 err = bebob->spec->rate->get(bebob, &curr_rate); in snd_bebob_stream_start_duplex()
631 if (err < 0) in snd_bebob_stream_start_duplex()
632 return err; in snd_bebob_stream_start_duplex()
635 err = snd_bebob_stream_get_clock_src(bebob, &src); in snd_bebob_stream_start_duplex()
636 if (err < 0) in snd_bebob_stream_start_duplex()
637 return err; in snd_bebob_stream_start_duplex()
647 err = start_stream(bebob, master); in snd_bebob_stream_start_duplex()
648 if (err < 0) in snd_bebob_stream_start_duplex()
651 err = start_stream(bebob, slave); in snd_bebob_stream_start_duplex()
652 if (err < 0) in snd_bebob_stream_start_duplex()
668 err = amdtp_domain_start(&bebob->domain, ir_delay_cycle); in snd_bebob_stream_start_duplex()
669 if (err < 0) in snd_bebob_stream_start_duplex()
676 err = bebob->spec->rate->set(bebob, curr_rate); in snd_bebob_stream_start_duplex()
677 if (err < 0) { in snd_bebob_stream_start_duplex()
680 err); in snd_bebob_stream_start_duplex()
689 err = -ETIMEDOUT; in snd_bebob_stream_start_duplex()
698 return err; in snd_bebob_stream_start_duplex()
807 int err; in fill_stream_formations() local
822 err = avc_bridgeco_get_plug_strm_fmt(bebob->unit, addr, buf, in fill_stream_formations()
825 if (err == -EINVAL && eid > 0) { in fill_stream_formations()
826 err = 0; in fill_stream_formations()
828 } else if (err < 0) { in fill_stream_formations()
834 pid, err); in fill_stream_formations()
838 err = parse_stream_formation(buf, len, formations); in fill_stream_formations()
839 if (err < 0) in fill_stream_formations()
844 return err; in fill_stream_formations()
853 int err; in seek_msu_sync_input_plug() local
856 err = avc_general_get_plug_info(bebob->unit, 0x0c, 0x00, 0x00, plugs); in seek_msu_sync_input_plug()
857 if (err < 0) { in seek_msu_sync_input_plug()
860 err); in seek_msu_sync_input_plug()
868 err = avc_bridgeco_get_plug_type(bebob->unit, addr, &type); in seek_msu_sync_input_plug()
869 if (err < 0) { in seek_msu_sync_input_plug()
872 i, err); in seek_msu_sync_input_plug()
882 return err; in seek_msu_sync_input_plug()
891 int err; in snd_bebob_stream_discover() local
894 err = avc_general_get_plug_info(bebob->unit, 0x1f, 0x07, 0x00, plugs); in snd_bebob_stream_discover()
895 if (err < 0) { in snd_bebob_stream_discover()
898 err); in snd_bebob_stream_discover()
907 err = -ENOSYS; in snd_bebob_stream_discover()
913 err = avc_bridgeco_get_plug_type(bebob->unit, addr, &type); in snd_bebob_stream_discover()
914 if (err < 0) { in snd_bebob_stream_discover()
916 "fail to get type for isoc in plug 0: %d\n", err); in snd_bebob_stream_discover()
919 err = -ENOSYS; in snd_bebob_stream_discover()
922 err = fill_stream_formations(bebob, AVC_BRIDGECO_PLUG_DIR_IN, 0); in snd_bebob_stream_discover()
923 if (err < 0) in snd_bebob_stream_discover()
928 err = avc_bridgeco_get_plug_type(bebob->unit, addr, &type); in snd_bebob_stream_discover()
929 if (err < 0) { in snd_bebob_stream_discover()
931 "fail to get type for isoc out plug 0: %d\n", err); in snd_bebob_stream_discover()
934 err = -ENOSYS; in snd_bebob_stream_discover()
937 err = fill_stream_formations(bebob, AVC_BRIDGECO_PLUG_DIR_OUT, 0); in snd_bebob_stream_discover()
938 if (err < 0) in snd_bebob_stream_discover()
946 err = avc_bridgeco_get_plug_type(bebob->unit, addr, &type); in snd_bebob_stream_discover()
947 if (err < 0) { in snd_bebob_stream_discover()
950 i, err); in snd_bebob_stream_discover()
962 err = avc_bridgeco_get_plug_type(bebob->unit, addr, &type); in snd_bebob_stream_discover()
963 if (err < 0) { in snd_bebob_stream_discover()
966 i, err); in snd_bebob_stream_discover()
975 err = seek_msu_sync_input_plug(bebob); in snd_bebob_stream_discover()
977 return err; in snd_bebob_stream_discover()
988 int err; in snd_bebob_stream_lock_try() local
994 err = -EBUSY; in snd_bebob_stream_lock_try()
1001 err = 0; in snd_bebob_stream_lock_try()
1004 return err; in snd_bebob_stream_lock_try()