Lines Matching +full:step +full:- +full:down

1 /* btp_vcp.c - Bluetooth VCP Tester */
6 * SPDX-License-Identifier: Apache-2.0
72 tester_set_bit(rp->data, BTP_VCS_READ_SUPPORTED_COMMANDS); in vcs_supported_commands()
73 tester_set_bit(rp->data, BTP_VCS_SET_VOL); in vcs_supported_commands()
74 tester_set_bit(rp->data, BTP_VCS_VOL_UP); in vcs_supported_commands()
75 tester_set_bit(rp->data, BTP_VCS_VOL_DOWN); in vcs_supported_commands()
76 tester_set_bit(rp->data, BTP_VCS_MUTE); in vcs_supported_commands()
77 tester_set_bit(rp->data, BTP_VCS_UNMUTE); in vcs_supported_commands()
89 LOG_DBG("Set volume 0x%02x", cp->volume); in set_volume()
91 if (bt_vcp_vol_rend_set_vol(cp->volume) != 0) { in set_volume()
113 LOG_DBG("Volume Down"); in vol_down()
202 tester_set_bit(rp->data, BTP_VOCS_READ_SUPPORTED_COMMANDS); in vocs_supported_commands()
203 tester_set_bit(rp->data, BTP_VOCS_UPDATE_LOC); in vocs_supported_commands()
204 tester_set_bit(rp->data, BTP_VOCS_UPDATE_DESC); in vocs_supported_commands()
205 tester_set_bit(rp->data, BTP_VOCS_STATE_GET); in vocs_supported_commands()
206 tester_set_bit(rp->data, BTP_VOCS_LOCATION_GET); in vocs_supported_commands()
207 tester_set_bit(rp->data, BTP_VOCS_OFFSET_STATE_SET); in vocs_supported_commands()
324 cmd_len != sizeof(*cp) + cp->desc_len) { in vocs_audio_desc()
328 if (cp->desc_len >= sizeof(description)) { in vocs_audio_desc()
332 memcpy(description, cp->desc, cp->desc_len); in vocs_audio_desc()
333 description[cp->desc_len] = '\0'; in vocs_audio_desc()
347 uint32_t loc = sys_le32_to_cpu(cp->loc); in vocs_audio_loc()
375 int16_t offset = sys_le16_to_cpu(cp->offset); in vocs_state_set()
380 err = bt_vocs_state_set(included.vocs[0], cp->offset); in vocs_state_set()
508 vcp_register_param.step = 1; in set_register_params()
566 ev.vcs_handles.control_handle = sys_cpu_to_le16(chrc_handles->vcp_handles.ctrl_pt); in btp_send_vcp_found_ev()
567 ev.vcs_handles.flag_handle = sys_cpu_to_le16(chrc_handles->vcp_handles.flags); in btp_send_vcp_found_ev()
568 ev.vcs_handles.state_handle = sys_cpu_to_le16(chrc_handles->vcp_handles.state); in btp_send_vcp_found_ev()
569 ev.vocs_handles.state_handle = sys_cpu_to_le16(chrc_handles->vocs_handles.state); in btp_send_vcp_found_ev()
570 ev.vocs_handles.location_handle = sys_cpu_to_le16(chrc_handles->vocs_handles.location); in btp_send_vcp_found_ev()
571 ev.vocs_handles.control_handle = sys_cpu_to_le16(chrc_handles->vocs_handles.control); in btp_send_vcp_found_ev()
572 ev.vocs_handles.desc_handle = sys_cpu_to_le16(chrc_handles->vocs_handles.desc); in btp_send_vcp_found_ev()
573 ev.aics_handles.state_handle = sys_cpu_to_le16(chrc_handles->aics_handles.state); in btp_send_vcp_found_ev()
574 ev.aics_handles.gain_handle = sys_cpu_to_le16(chrc_handles->aics_handles.gain); in btp_send_vcp_found_ev()
575 ev.aics_handles.type_handle = sys_cpu_to_le16(chrc_handles->aics_handles.type); in btp_send_vcp_found_ev()
576 ev.aics_handles.status_handle = sys_cpu_to_le16(chrc_handles->aics_handles.status); in btp_send_vcp_found_ev()
577 ev.aics_handles.control_handle = sys_cpu_to_le16(chrc_handles->aics_handles.control); in btp_send_vcp_found_ev()
578 ev.aics_handles.desc_handle = sys_cpu_to_le16(chrc_handles->aics_handles.desc); in btp_send_vcp_found_ev()
627 tester_set_bit(rp->data, BTP_VCP_READ_SUPPORTED_COMMANDS); in vcp_supported_commands()
628 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_DISCOVER); in vcp_supported_commands()
629 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_STATE_READ); in vcp_supported_commands()
630 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_FLAGS_READ); in vcp_supported_commands()
631 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_VOL_DOWN); in vcp_supported_commands()
632 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_VOL_UP); in vcp_supported_commands()
633 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_UNMUTE_VOL_DOWN); in vcp_supported_commands()
636 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_UNMUTE_VOL_UP); in vcp_supported_commands()
637 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_SET_VOL); in vcp_supported_commands()
638 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_UNMUTE); in vcp_supported_commands()
639 tester_set_bit(rp->data, BTP_VCP_VOL_CTLR_MUTE); in vcp_supported_commands()
668 bt_vocs_client_cb_register(vol_ctlr->vocs[0], &vocs_cl_cb); in vcp_vol_ctlr_discover_cb()
669 bt_aics_client_cb_register(vol_ctlr->aics[0], &aics_client_cb); in vcp_vol_ctlr_discover_cb()
672 CONTAINER_OF(vol_ctlr->vocs[0], struct bt_vocs_client, vocs); in vcp_vol_ctlr_discover_cb()
673 struct bt_aics_client *aics_cli = &vol_ctlr->aics[0]->cli; in vcp_vol_ctlr_discover_cb()
675 chrc_handles.vocs_handles.state = vocs_cli->state_handle; in vcp_vol_ctlr_discover_cb()
676 chrc_handles.vocs_handles.location = vocs_cli->location_handle; in vcp_vol_ctlr_discover_cb()
677 chrc_handles.vocs_handles.control = vocs_cli->control_handle; in vcp_vol_ctlr_discover_cb()
678 chrc_handles.vocs_handles.desc = vocs_cli->desc_handle; in vcp_vol_ctlr_discover_cb()
679 chrc_handles.aics_handles.state = aics_cli->state_handle; in vcp_vol_ctlr_discover_cb()
680 chrc_handles.aics_handles.gain = aics_cli->gain_handle; in vcp_vol_ctlr_discover_cb()
681 chrc_handles.aics_handles.type = aics_cli->type_handle; in vcp_vol_ctlr_discover_cb()
682 chrc_handles.aics_handles.status = aics_cli->status_handle; in vcp_vol_ctlr_discover_cb()
683 chrc_handles.aics_handles.control = aics_cli->control_handle; in vcp_vol_ctlr_discover_cb()
684 chrc_handles.aics_handles.desc = aics_cli->desc_handle; in vcp_vol_ctlr_discover_cb()
687 chrc_handles.vcp_handles.ctrl_pt = vol_ctlr->control_handle; in vcp_vol_ctlr_discover_cb()
688 chrc_handles.vcp_handles.flags = vol_ctlr->vol_flag_handle; in vcp_vol_ctlr_discover_cb()
689 chrc_handles.vcp_handles.state = vol_ctlr->state_handle; in vcp_vol_ctlr_discover_cb()
721 LOG_DBG("VCP CTLR Volume down callback"); in vcp_vol_ctlr_vol_down_cb()
731 LOG_DBG("VCP CTLR Volume down callback"); in vcp_vol_ctlr_vol_up_cb()
741 LOG_DBG("VCP CTLR Volume down and unmute callback"); in vcp_vol_ctlr_unmute_vol_down_cb()
751 LOG_DBG("VCP CTLR Volume down and unmute callback"); in vcp_vol_ctlr_unmute_vol_up_cb()
771 LOG_DBG("VCP CTLR Volume down and unmute callback"); in vcp_vol_ctlr_unmute_cb()
803 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in vcp_discover()
851 LOG_DBG("VCP CTLR Volume down"); in vcp_ctlr_vol_down()
880 LOG_DBG("VCP CTLR Unmute, vol down"); in vcp_ctlr_unmute_vol_down()
910 LOG_DBG("VCP CTLR Set absolute volume %d", cp->volume); in vcp_ctlr_set_vol()
912 err = bt_vcp_vol_ctlr_set_vol(vol_ctlr, cp->volume); in vcp_ctlr_set_vol()