Lines Matching refs:err
34 static void cap_discover_cb(struct bt_conn *conn, int err, in cap_discover_cb() argument
38 if (err != 0) { in cap_discover_cb()
39 bt_shell_error("discover failed (%d)", err); in cap_discover_cb()
47 static void cap_volume_changed_cb(struct bt_conn *conn, int err) in cap_volume_changed_cb() argument
49 if (err != 0) { in cap_volume_changed_cb()
50 bt_shell_error("Volume change failed (%d)", err); in cap_volume_changed_cb()
57 static void cap_volume_mute_changed_cb(struct bt_conn *conn, int err) in cap_volume_mute_changed_cb() argument
59 if (err != 0) { in cap_volume_mute_changed_cb()
60 bt_shell_error("Volume mute change failed (%d)", err); in cap_volume_mute_changed_cb()
67 static void cap_volume_offset_changed_cb(struct bt_conn *conn, int err) in cap_volume_offset_changed_cb() argument
69 if (err != 0) { in cap_volume_offset_changed_cb()
70 bt_shell_error("Volume offset change failed (%d)", err); in cap_volume_offset_changed_cb()
80 static void cap_microphone_mute_changed_cb(struct bt_conn *conn, int err) in cap_microphone_mute_changed_cb() argument
82 if (err != 0) { in cap_microphone_mute_changed_cb()
83 bt_shell_error("Microphone mute change failed (%d)", err); in cap_microphone_mute_changed_cb()
91 static void cap_microphone_gain_changed_cb(struct bt_conn *conn, int err) in cap_microphone_gain_changed_cb() argument
93 if (err != 0) { in cap_microphone_gain_changed_cb()
94 bt_shell_error("Microphone gain change failed (%d)", err); in cap_microphone_gain_changed_cb()
104 static void cap_broadcast_reception_start_cb(struct bt_conn *conn, int err) in cap_broadcast_reception_start_cb() argument
106 if (err != 0) { in cap_broadcast_reception_start_cb()
107 bt_shell_error("Broadcast reception start failed (%d)", err); in cap_broadcast_reception_start_cb()
114 static void cap_broadcast_reception_stop_cb(struct bt_conn *conn, int err) in cap_broadcast_reception_stop_cb() argument
116 if (err != 0) { in cap_broadcast_reception_stop_cb()
117 bt_shell_error("Broadcast reception stop failed (%d) for conn %p", err, in cap_broadcast_reception_stop_cb()
125 static void cap_distribute_broadcast_code_cb(struct bt_conn *conn, int err) in cap_distribute_broadcast_code_cb() argument
127 if (err != 0) { in cap_distribute_broadcast_code_cb()
128 bt_shell_error("Distribute broadcast code failed (%d) for conn %p", err, in cap_distribute_broadcast_code_cb()
161 int err; in cmd_cap_commander_cancel() local
163 err = bt_cap_commander_cancel(); in cmd_cap_commander_cancel()
164 if (err != 0) { in cmd_cap_commander_cancel()
165 shell_print(sh, "Failed to cancel CAP commander procedure: %d", err); in cmd_cap_commander_cancel()
175 int err; in cmd_cap_commander_discover() local
187 err = bt_cap_commander_discover(default_conn); in cmd_cap_commander_discover()
188 if (err != 0) { in cmd_cap_commander_discover()
189 shell_error(sh, "Fail: %d", err); in cmd_cap_commander_discover()
192 return err; in cmd_cap_commander_discover()
218 int err = 0; in cmd_cap_commander_change_volume() local
225 volume = shell_strtoul(argv[1], 10, &err); in cmd_cap_commander_change_volume()
226 if (err != 0) { in cmd_cap_commander_change_volume()
260 err = bt_cap_commander_change_volume(¶m); in cmd_cap_commander_change_volume()
261 if (err != 0) { in cmd_cap_commander_change_volume()
262 shell_print(sh, "Failed to change volume: %d", err); in cmd_cap_commander_change_volume()
278 int err = 0; in cmd_cap_commander_change_volume_mute() local
285 param.mute = shell_strtobool(argv[1], 10, &err); in cmd_cap_commander_change_volume_mute()
286 if (err != 0) { in cmd_cap_commander_change_volume_mute()
310 err = bt_cap_commander_change_volume_mute_state(¶m); in cmd_cap_commander_change_volume_mute()
311 if (err != 0) { in cmd_cap_commander_change_volume_mute()
312 shell_print(sh, "Failed to change volume mute: %d", err); in cmd_cap_commander_change_volume_mute()
331 int err = 0; in cmd_cap_commander_change_volume_offset() local
362 volume_offset = shell_strtol(arg, 10, &err); in cmd_cap_commander_change_volume_offset()
363 if (err != 0) { in cmd_cap_commander_change_volume_offset()
382 err = bt_cap_commander_change_volume_offset(¶m); in cmd_cap_commander_change_volume_offset()
383 if (err != 0) { in cmd_cap_commander_change_volume_offset()
384 shell_print(sh, "Failed to change volume offset: %d", err); in cmd_cap_commander_change_volume_offset()
404 int err = 0; in cmd_cap_commander_change_microphone_mute() local
411 param.mute = shell_strtobool(argv[1], 10, &err); in cmd_cap_commander_change_microphone_mute()
412 if (err != 0) { in cmd_cap_commander_change_microphone_mute()
437 err = bt_cap_commander_change_microphone_mute_state(¶m); in cmd_cap_commander_change_microphone_mute()
438 if (err != 0) { in cmd_cap_commander_change_microphone_mute()
439 shell_print(sh, "Failed to change microphone mute: %d", err); in cmd_cap_commander_change_microphone_mute()
460 int err = 0; in cmd_cap_commander_change_microphone_gain() local
491 gain = shell_strtol(arg, 10, &err); in cmd_cap_commander_change_microphone_gain()
492 if (err != 0) { in cmd_cap_commander_change_microphone_gain()
511 err = bt_cap_commander_change_microphone_gain_setting(¶m); in cmd_cap_commander_change_microphone_gain()
512 if (err != 0) { in cmd_cap_commander_change_microphone_gain()
513 shell_print(sh, "Failed to change microphone gain: %d", err); in cmd_cap_commander_change_microphone_gain()
544 int err = 0; in cmd_cap_commander_broadcast_reception_start() local
565 err = bt_addr_le_from_str(argv[1], argv[2], &member_param->addr); in cmd_cap_commander_broadcast_reception_start()
566 if (err) { in cmd_cap_commander_broadcast_reception_start()
567 shell_error(sh, "Invalid peer address (err %d)", err); in cmd_cap_commander_broadcast_reception_start()
572 adv_sid = shell_strtoul(argv[3], 0, &err); in cmd_cap_commander_broadcast_reception_start()
573 if (err != 0) { in cmd_cap_commander_broadcast_reception_start()
574 shell_error(sh, "Could not parse adv_sid: %d", err); in cmd_cap_commander_broadcast_reception_start()
587 broadcast_id = shell_strtoul(argv[4], 0, &err); in cmd_cap_commander_broadcast_reception_start()
588 if (err != 0) { in cmd_cap_commander_broadcast_reception_start()
589 shell_error(sh, "Could not parse broadcast_id: %d", err); in cmd_cap_commander_broadcast_reception_start()
605 pa_interval = shell_strtoul(argv[5], 0, &err); in cmd_cap_commander_broadcast_reception_start()
606 if (err) { in cmd_cap_commander_broadcast_reception_start()
607 shell_error(sh, "Could not parse pa_interval: %d", err); in cmd_cap_commander_broadcast_reception_start()
628 bis_sync = shell_strtoul(argv[6], 0, &err); in cmd_cap_commander_broadcast_reception_start()
629 if (err) { in cmd_cap_commander_broadcast_reception_start()
630 shell_error(sh, "Could not parse bis_sync: %d", err); in cmd_cap_commander_broadcast_reception_start()
683 err = bt_cap_commander_broadcast_reception_start(¶m); in cmd_cap_commander_broadcast_reception_start()
684 if (err != 0) { in cmd_cap_commander_broadcast_reception_start()
685 shell_print(sh, "Failed to start broadcast reception: %d", err); in cmd_cap_commander_broadcast_reception_start()
706 int err = 0; in cmd_cap_commander_broadcast_reception_stop() local
737 src_id = shell_strtoul(arg, 0, &err); in cmd_cap_commander_broadcast_reception_stop()
738 if (err != 0) { in cmd_cap_commander_broadcast_reception_stop()
739 shell_error(sh, "Could not parse src_id: %d", err); in cmd_cap_commander_broadcast_reception_stop()
759 err = bt_cap_commander_broadcast_reception_stop(¶m); in cmd_cap_commander_broadcast_reception_stop()
760 if (err != 0) { in cmd_cap_commander_broadcast_reception_stop()
761 shell_print(sh, "Failed to initiate broadcast reception stop: %d", err); in cmd_cap_commander_broadcast_reception_stop()
782 int err = 0; in cmd_cap_commander_distribute_broadcast_code() local
821 src_id = shell_strtoul(arg, 0, &err); in cmd_cap_commander_distribute_broadcast_code()
822 if (err != 0) { in cmd_cap_commander_distribute_broadcast_code()
823 shell_error(sh, "Could not parse src_id: %d", err); in cmd_cap_commander_distribute_broadcast_code()
838 err = bt_cap_commander_distribute_broadcast_code(¶m); in cmd_cap_commander_distribute_broadcast_code()
839 if (err != 0) { in cmd_cap_commander_distribute_broadcast_code()
840 shell_print(sh, "Failed to initiate distribute broadcast code: %d", err); in cmd_cap_commander_distribute_broadcast_code()