Lines Matching refs:p_dev

92 #define CHECK_RC_CONNECTED(p_dev)                                          \  argument
94 if ((p_dev) == NULL || !(p_dev)->rc_connected) { \
100 #define CHECK_BR_CONNECTED(p_dev) \ argument
102 if ((p_dev) == NULL || !(p_dev)->br_connected) { \
257 static void send_metamsg_rsp(btif_rc_device_cb_t* p_dev, int index,
260 static void register_volumechange(uint8_t label, btif_rc_device_cb_t* p_dev);
267 btif_rc_device_cb_t* p_dev);
274 btif_rc_device_cb_t* p_dev);
275 static void rc_ctrl_procedure_complete(btif_rc_device_cb_t* p_dev);
277 btif_rc_device_cb_t* p_dev);
302 static bt_status_t get_play_status_cmd(btif_rc_device_cb_t* p_dev);
304 uint8_t* attrs, uint8_t num_attrs, btif_rc_device_cb_t* p_dev);
306 uint8_t* vals, uint8_t num_vals, btif_rc_device_cb_t* p_dev);
309 btif_rc_device_cb_t* p_dev);
312 btif_rc_device_cb_t* p_dev);
315 btif_rc_device_cb_t* p_dev);
319 btif_rc_device_cb_t* p_dev);
321 btif_rc_device_cb_t* p_dev);
323 btif_rc_device_cb_t* p_dev);
325 uint8_t attrib_id, btif_rc_device_cb_t* p_dev);
328 btif_rc_device_cb_t* p_dev);
341 btif_rc_device_cb_t* p_dev);
346 btif_rc_device_cb_t* p_dev);
456 const uint32_t* get_requested_attributes_list(btif_rc_device_cb_t* p_dev) { in get_requested_attributes_list() argument
457 return (p_dev->rc_features & BTA_AV_FEAT_COVER_ARTWORK in get_requested_attributes_list()
462 uint8_t get_requested_attributes_list_size(btif_rc_device_cb_t* p_dev) { in get_requested_attributes_list_size() argument
463 return (p_dev->rc_features & BTA_AV_FEAT_COVER_ARTWORK in get_requested_attributes_list_size()
469 btif_rc_device_cb_t* p_dev) { in fill_pdu_queue() argument
470 p_dev->rc_pdu_info[index].ctype = ctype; in fill_pdu_queue()
471 p_dev->rc_pdu_info[index].label = label; in fill_pdu_queue()
472 p_dev->rc_pdu_info[index].is_rsp_pending = pending; in fill_pdu_queue()
493 void handle_rc_ctrl_features(btif_rc_device_cb_t* p_dev) { in handle_rc_ctrl_features() argument
494 if (!(p_dev->rc_features & BTA_AV_FEAT_RCTG) && in handle_rc_ctrl_features()
495 (!(p_dev->rc_features & BTA_AV_FEAT_RCCT) || in handle_rc_ctrl_features()
496 !(p_dev->rc_features & BTA_AV_FEAT_ADV_CTRL))) { in handle_rc_ctrl_features()
502 if ((p_dev->rc_features & BTA_AV_FEAT_ADV_CTRL) && in handle_rc_ctrl_features()
503 (p_dev->rc_features & BTA_AV_FEAT_RCCT)) { in handle_rc_ctrl_features()
507 if (p_dev->rc_features & BTA_AV_FEAT_METADATA) { in handle_rc_ctrl_features()
511 if ((p_dev->rc_features & BTA_AV_FEAT_VENDOR) && in handle_rc_ctrl_features()
512 (p_dev->rc_features_processed != true)) { in handle_rc_ctrl_features()
517 p_dev->rc_features_processed = true; in handle_rc_ctrl_features()
519 getcapabilities_cmd(AVRC_CAP_COMPANY_ID, p_dev); in handle_rc_ctrl_features()
524 if (p_dev->rc_features & BTA_AV_FEAT_BROWSE) { in handle_rc_ctrl_features()
529 if (p_dev->rc_features & BTA_AV_FEAT_COVER_ARTWORK) { in handle_rc_ctrl_features()
535 p_dev->rc_addr, rc_features)); in handle_rc_ctrl_features()
538 void handle_rc_ctrl_psm(btif_rc_device_cb_t* p_dev) { in handle_rc_ctrl_psm() argument
539 uint16_t cover_art_psm = p_dev->rc_cover_art_psm; in handle_rc_ctrl_psm()
544 p_dev->rc_addr, cover_art_psm)); in handle_rc_ctrl_psm()
547 void handle_rc_features(btif_rc_device_cb_t* p_dev) { in handle_rc_features() argument
561 p_dev->rc_addr.ToString().c_str()); in handle_rc_features()
563 if (interop_match_addr(INTEROP_DISABLE_ABSOLUTE_VOLUME, &p_dev->rc_addr) || in handle_rc_features()
565 (avdtp_source_active_peer_addr != p_dev->rc_addr && in handle_rc_features()
566 avdtp_sink_active_peer_addr != p_dev->rc_addr)) { in handle_rc_features()
567 p_dev->rc_features &= ~BTA_AV_FEAT_ADV_CTRL; in handle_rc_features()
570 if (p_dev->rc_features & BTA_AV_FEAT_BROWSE) { in handle_rc_features()
575 if ((p_dev->rc_features & BTA_AV_FEAT_ADV_CTRL) && in handle_rc_features()
576 (p_dev->rc_features & BTA_AV_FEAT_RCTG)) { in handle_rc_features()
582 if (p_dev->rc_features & BTA_AV_FEAT_METADATA) { in handle_rc_features()
587 HAL_CBACK(bt_rc_callbacks, remote_features_cb, p_dev->rc_addr, rc_features); in handle_rc_features()
592 __func__, p_dev->rc_vol_label); in handle_rc_features()
594 if (p_dev->rc_features & BTA_AV_FEAT_ADV_CTRL && in handle_rc_features()
595 p_dev->rc_features & BTA_AV_FEAT_RCTG) { in handle_rc_features()
598 if (MAX_LABEL == p_dev->rc_vol_label) { in handle_rc_features()
601 p_transaction = get_transaction_by_lbl(p_dev->rc_vol_label); in handle_rc_features()
605 __func__, p_dev->rc_vol_label); in handle_rc_features()
611 p_dev->rc_vol_label = p_transaction->lbl; in handle_rc_features()
612 register_volumechange(p_dev->rc_vol_label, p_dev); in handle_rc_features()
629 btif_rc_device_cb_t* p_dev = in handle_rc_browse_connect() local
632 if (!p_dev) { in handle_rc_browse_connect()
641 p_dev->br_connected = true; in handle_rc_browse_connect()
644 true, p_dev->rc_addr)); in handle_rc_browse_connect()
659 btif_rc_device_cb_t* p_dev = alloc_device(); in handle_rc_connect() local
660 if (p_dev == NULL) { in handle_rc_connect()
668 p_dev->rc_connected = false; in handle_rc_connect()
672 if (p_dev->rc_connected) { in handle_rc_connect()
676 __func__, p_dev->rc_handle, p_rc_open->rc_handle); in handle_rc_connect()
677 if (p_dev->rc_handle != p_rc_open->rc_handle && in handle_rc_connect()
678 p_dev->rc_addr != p_rc_open->peer_addr) { in handle_rc_connect()
684 p_dev->rc_addr = p_rc_open->peer_addr; in handle_rc_connect()
685 p_dev->rc_features = p_rc_open->peer_features; in handle_rc_connect()
687 __func__, p_rc_open->peer_features, p_dev->rc_features); in handle_rc_connect()
688 p_dev->rc_cover_art_psm = p_rc_open->cover_art_psm; in handle_rc_connect()
690 __func__, p_dev->rc_cover_art_psm); in handle_rc_connect()
691 p_dev->rc_vol_label = MAX_LABEL; in handle_rc_connect()
692 p_dev->rc_volume = MAX_VOLUME; in handle_rc_connect()
694 p_dev->rc_connected = true; in handle_rc_connect()
695 p_dev->rc_handle = p_rc_open->rc_handle; in handle_rc_connect()
696 p_dev->rc_state = BTRC_CONNECTION_STATE_CONNECTED; in handle_rc_connect()
699 if (p_dev->rc_features != 0 && bt_rc_callbacks != NULL) { in handle_rc_connect()
700 handle_rc_features(p_dev); in handle_rc_connect()
703 p_dev->rc_playing_uid = RC_INVALID_TRACK_ID; in handle_rc_connect()
707 false, p_dev->rc_addr)); in handle_rc_connect()
710 handle_rc_ctrl_features(p_dev); in handle_rc_connect()
713 handle_rc_ctrl_psm(p_dev); in handle_rc_connect()
725 btif_rc_device_cb_t* p_dev = NULL; in handle_rc_disconnect() local
728 p_dev = btif_rc_get_device_by_handle(p_rc_close->rc_handle); in handle_rc_disconnect()
729 if (p_dev == NULL) { in handle_rc_disconnect()
734 if (p_rc_close->rc_handle != p_dev->rc_handle && in handle_rc_disconnect()
735 p_dev->rc_addr != p_rc_close->peer_addr) { in handle_rc_disconnect()
743 false, p_dev->rc_addr)); in handle_rc_disconnect()
746 memset(&p_dev->rc_app_settings, 0, sizeof(btif_rc_player_app_settings_t)); in handle_rc_disconnect()
747 p_dev->rc_features_processed = false; in handle_rc_disconnect()
748 p_dev->rc_procedure_complete = false; in handle_rc_disconnect()
750 if (p_dev->rc_supported_event_list != NULL) { in handle_rc_disconnect()
751 list_clear(p_dev->rc_supported_event_list); in handle_rc_disconnect()
752 p_dev->rc_supported_event_list = NULL; in handle_rc_disconnect()
756 if (p_dev->rc_state == BTRC_CONNECTION_STATE_CONNECTED) { in handle_rc_disconnect()
757 p_dev->rc_handle = 0; in handle_rc_disconnect()
758 p_dev->rc_connected = false; in handle_rc_disconnect()
759 p_dev->rc_state = BTRC_CONNECTION_STATE_DISCONNECTED; in handle_rc_disconnect()
761 memset(p_dev->rc_notif, 0, sizeof(p_dev->rc_notif)); in handle_rc_disconnect()
763 p_dev->rc_features = 0; in handle_rc_disconnect()
764 p_dev->rc_cover_art_psm = 0; in handle_rc_disconnect()
765 p_dev->rc_vol_label = MAX_LABEL; in handle_rc_disconnect()
766 p_dev->rc_volume = MAX_VOLUME; in handle_rc_disconnect()
768 p_dev->rc_addr = RawAddress::kEmpty; in handle_rc_disconnect()
775 p_dev->rc_addr = RawAddress::kEmpty; in handle_rc_disconnect()
793 btif_rc_device_cb_t* p_dev = in handle_rc_passthrough_cmd() local
795 if (p_dev == NULL) { in handle_rc_passthrough_cmd()
811 p_dev->rc_pending_play = true; in handle_rc_passthrough_cmd()
817 if ((p_remote_cmd->rc_id == AVRC_ID_PAUSE) && (p_dev->rc_pending_play)) { in handle_rc_passthrough_cmd()
820 p_dev->rc_pending_play = false; in handle_rc_passthrough_cmd()
834 p_dev->rc_features, p_remote_cmd->rc_id, pressed); in handle_rc_passthrough_cmd()
836 p_dev->rc_addr); in handle_rc_passthrough_cmd()
848 btif_rc_device_cb_t* p_dev = NULL; in handle_rc_passthrough_rsp() local
850 p_dev = btif_rc_get_device_by_handle(p_remote_rsp->rc_handle); in handle_rc_passthrough_rsp()
851 if (p_dev == NULL) { in handle_rc_passthrough_rsp()
858 if (!(p_dev->rc_features & BTA_AV_FEAT_RCTG)) { in handle_rc_passthrough_rsp()
872 base::Bind(bt_rc_ctrl_callbacks->passthrough_rsp_cb, p_dev->rc_addr, in handle_rc_passthrough_rsp()
886 btif_rc_device_cb_t* p_dev = NULL; in handle_rc_vendorunique_rsp() local
890 p_dev = btif_rc_get_device_by_handle(p_remote_rsp->rc_handle); in handle_rc_vendorunique_rsp()
891 if (p_dev == NULL) { in handle_rc_vendorunique_rsp()
897 if (p_dev->rc_features & BTA_AV_FEAT_RCTG) { in handle_rc_vendorunique_rsp()
938 btif_rc_device_cb_t* p_dev = NULL; in handle_rc_metamsg_cmd() local
953 p_dev = btif_rc_get_device_by_handle(pmeta_msg->rc_handle); in handle_rc_metamsg_cmd()
954 if (p_dev == NULL) { in handle_rc_metamsg_cmd()
976 handle_rc_metamsg_rsp(pmeta_msg, p_dev); in handle_rc_metamsg_cmd()
1011 p_dev->rc_notif[event_id - 1].bNotify = true; in handle_rc_metamsg_cmd()
1012 p_dev->rc_notif[event_id - 1].label = pmeta_msg->label; in handle_rc_metamsg_cmd()
1022 pmeta_msg->code, pmeta_msg->label, p_dev); in handle_rc_metamsg_cmd()
1035 btif_rc_device_cb_t* p_dev = NULL; in btif_rc_handler() local
1084 p_dev = btif_rc_get_device_by_handle(p_data->rc_feat.rc_handle); in btif_rc_handler()
1085 if (p_dev == NULL) { in btif_rc_handler()
1091 p_dev->rc_features = p_data->rc_feat.peer_features; in btif_rc_handler()
1093 handle_rc_features(p_dev); in btif_rc_handler()
1096 if ((p_dev->rc_connected) && (bt_rc_ctrl_callbacks != NULL)) { in btif_rc_handler()
1097 handle_rc_ctrl_features(p_dev); in btif_rc_handler()
1104 p_dev = btif_rc_get_device_by_handle(p_data->rc_cover_art_psm.rc_handle); in btif_rc_handler()
1105 if (p_dev == NULL) { in btif_rc_handler()
1111 p_dev->rc_cover_art_psm = p_data->rc_cover_art_psm.cover_art_psm; in btif_rc_handler()
1112 if ((p_dev->rc_connected) && (bt_rc_ctrl_callbacks != NULL)) { in btif_rc_handler()
1113 handle_rc_ctrl_psm(p_dev); in btif_rc_handler()
1171 btif_rc_device_cb_t* p_dev = get_connected_device(idx); in btif_rc_is_connected_peer() local
1172 if (p_dev != NULL && (p_dev->rc_connected == TRUE) && in btif_rc_is_connected_peer()
1173 peer_addr == p_dev->rc_addr) { in btif_rc_is_connected_peer()
1188 btif_rc_device_cb_t* p_dev = NULL; in btif_rc_get_connected_peer_handle() local
1189 p_dev = btif_rc_get_device_by_bda(peer_addr); in btif_rc_get_connected_peer_handle()
1191 if (p_dev == NULL) { in btif_rc_get_connected_peer_handle()
1195 return p_dev->rc_handle; in btif_rc_get_connected_peer_handle()
1210 btif_rc_device_cb_t* p_dev = NULL; in btif_rc_check_handle_pending_play() local
1211 p_dev = btif_rc_get_device_by_bda(peer_addr); in btif_rc_check_handle_pending_play()
1213 if (p_dev == NULL) { in btif_rc_check_handle_pending_play()
1219 if (p_dev->rc_pending_play) { in btif_rc_check_handle_pending_play()
1225 remote_cmd.rc_handle = p_dev->rc_handle; in btif_rc_check_handle_pending_play()
1244 p_dev->rc_pending_play = false; in btif_rc_check_handle_pending_play()
1310 static void send_metamsg_rsp(btif_rc_device_cb_t* p_dev, int index, in send_metamsg_rsp() argument
1315 if (p_dev == NULL) { in send_metamsg_rsp()
1328 __func__, p_dev->rc_handle, index, label, code, in send_metamsg_rsp()
1331 if (index >= 0 && !p_dev->rc_pdu_info[index].is_rsp_pending) { in send_metamsg_rsp()
1345 (p_dev->rc_connected) && (p_dev->rc_notif[event_id - 1].bNotify); in send_metamsg_rsp()
1348 p_dev->rc_notif[event_id - 1].bNotify = false; in send_metamsg_rsp()
1350 __func__, p_dev->rc_handle, event_id, bNotify); in send_metamsg_rsp()
1356 p_dev->rc_handle, pmetamsg_resp, &p_msg))) { in send_metamsg_rsp()
1359 __func__, p_dev->rc_handle, event_id); in send_metamsg_rsp()
1361 BTA_AvMetaRsp(p_dev->rc_handle, p_dev->rc_notif[event_id - 1].label, in send_metamsg_rsp()
1382 status = AVRC_BldResponse(p_dev->rc_handle, pmetamsg_resp, &p_msg); in send_metamsg_rsp()
1385 BTA_AvMetaRsp(p_dev->rc_handle, label, ctype, p_msg); in send_metamsg_rsp()
1393 p_dev->rc_pdu_info[index].ctype = 0; in send_metamsg_rsp()
1394 p_dev->rc_pdu_info[index].label = 0; in send_metamsg_rsp()
1395 p_dev->rc_pdu_info[index].is_rsp_pending = false; in send_metamsg_rsp()
1496 btif_rc_device_cb_t* p_dev) { in btif_rc_upstreams_evt() argument
1498 __func__, dump_rc_pdu(pavrc_cmd->pdu), p_dev->rc_handle, in btif_rc_upstreams_evt()
1503 fill_pdu_queue(IDX_GET_PLAY_STATUS_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1504 HAL_CBACK(bt_rc_callbacks, get_play_status_cb, p_dev->rc_addr); in btif_rc_upstreams_evt()
1513 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1525 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1529 fill_pdu_queue(IDX_GET_ELEMENT_ATTR_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1531 p_dev->rc_addr); in btif_rc_upstreams_evt()
1539 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1542 p_dev->rc_notif[BTRC_EVT_PLAY_POS_CHANGED - 1].bNotify = false; in btif_rc_upstreams_evt()
1547 pavrc_cmd->reg_notif.param, p_dev->rc_addr); in btif_rc_upstreams_evt()
1552 if (p_dev->rc_connected) { in btif_rc_upstreams_evt()
1558 send_metamsg_rsp(p_dev, -1, label, ctype, &avrc_rsp); in btif_rc_upstreams_evt()
1579 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1591 fill_pdu_queue(IDX_GET_FOLDER_ITEMS_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1595 p_dev->rc_addr); in btif_rc_upstreams_evt()
1599 fill_pdu_queue(IDX_SET_ADDR_PLAYER_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1601 pavrc_cmd->addr_player.player_id, p_dev->rc_addr); in btif_rc_upstreams_evt()
1605 fill_pdu_queue(IDX_SET_BROWSED_PLAYER_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1607 pavrc_cmd->br_player.player_id, p_dev->rc_addr); in btif_rc_upstreams_evt()
1614 if (p_dev->rc_connected == TRUE) { in btif_rc_upstreams_evt()
1621 send_metamsg_rsp(p_dev, -1, label, ctype, &avrc_rsp); in btif_rc_upstreams_evt()
1629 if (p_dev->rc_connected == TRUE) { in btif_rc_upstreams_evt()
1636 send_metamsg_rsp(p_dev, -1, label, ctype, &avrc_rsp); in btif_rc_upstreams_evt()
1641 fill_pdu_queue(IDX_CHG_PATH_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1643 pavrc_cmd->chg_path.folder_uid, p_dev->rc_addr); in btif_rc_upstreams_evt()
1647 fill_pdu_queue(IDX_SEARCH_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1650 pavrc_cmd->search.string.p_str, p_dev->rc_addr); in btif_rc_upstreams_evt()
1662 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1666 fill_pdu_queue(IDX_GET_ITEM_ATTR_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1671 num_attr, item_attrs, p_dev->rc_addr); in btif_rc_upstreams_evt()
1675 fill_pdu_queue(IDX_GET_TOTAL_NUM_OF_ITEMS_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1677 pavrc_cmd->get_num_of_items.scope, p_dev->rc_addr); in btif_rc_upstreams_evt()
1681 fill_pdu_queue(IDX_ADD_TO_NOW_PLAYING_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1684 pavrc_cmd->add_to_play.uid_counter, p_dev->rc_addr); in btif_rc_upstreams_evt()
1688 fill_pdu_queue(IDX_PLAY_ITEM_RSP, ctype, label, true, p_dev); in btif_rc_upstreams_evt()
1691 p_dev->rc_addr); in btif_rc_upstreams_evt()
1695 send_reject_response(p_dev->rc_handle, label, pavrc_cmd->pdu, in btif_rc_upstreams_evt()
1714 btif_rc_device_cb_t* p_dev) { in btif_rc_ctrl_upstreams_rsp_cmd() argument
1716 dump_rc_pdu(pavrc_cmd->pdu), p_dev->rc_handle); in btif_rc_ctrl_upstreams_rsp_cmd()
1721 base::Bind(bt_rc_ctrl_callbacks->setabsvol_cmd_cb, p_dev->rc_addr, in btif_rc_ctrl_upstreams_rsp_cmd()
1729 p_dev->rc_addr, label)); in btif_rc_ctrl_upstreams_rsp_cmd()
1747 btif_rc_device_cb_t* p_dev) { in btif_rc_upstreams_rsp_evt() argument
1749 dump_rc_pdu(pavrc_resp->pdu), p_dev->rc_handle, ctype, in btif_rc_upstreams_rsp_evt()
1755 p_dev->rc_volume = pavrc_resp->reg_notif.param.volume; in btif_rc_upstreams_rsp_evt()
1757 pavrc_resp->reg_notif.param.volume, ctype, p_dev->rc_addr); in btif_rc_upstreams_rsp_evt()
1766 p_dev->rc_volume = pavrc_resp->volume.volume; in btif_rc_upstreams_rsp_evt()
1768 ctype, p_dev->rc_addr); in btif_rc_upstreams_rsp_evt()
1836 static void rc_ctrl_procedure_complete(btif_rc_device_cb_t* p_dev) { in rc_ctrl_procedure_complete() argument
1837 if (p_dev == NULL) { in rc_ctrl_procedure_complete()
1842 if (p_dev->rc_procedure_complete) { in rc_ctrl_procedure_complete()
1845 p_dev->rc_procedure_complete = true; in rc_ctrl_procedure_complete()
1846 const uint32_t* attr_list = get_requested_attributes_list(p_dev); in rc_ctrl_procedure_complete()
1847 const uint8_t attr_list_size = get_requested_attributes_list_size(p_dev); in rc_ctrl_procedure_complete()
1848 get_metadata_attribute_cmd(attr_list_size, attr_list, p_dev); in rc_ctrl_procedure_complete()
1866 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_play_status_rsp() local
1869 CHECK_RC_CONNECTED(p_dev); in get_play_status_rsp()
1884 send_metamsg_rsp(p_dev, IDX_GET_PLAY_STATUS_RSP, in get_play_status_rsp()
1885 p_dev->rc_pdu_info[IDX_GET_PLAY_STATUS_RSP].label, in get_play_status_rsp()
1886 p_dev->rc_pdu_info[IDX_GET_PLAY_STATUS_RSP].ctype, in get_play_status_rsp()
1908 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_element_attr_rsp() local
1911 CHECK_RC_CONNECTED(p_dev); in get_element_attr_rsp()
1944 send_metamsg_rsp(p_dev, IDX_GET_ELEMENT_ATTR_RSP, in get_element_attr_rsp()
1945 p_dev->rc_pdu_info[IDX_GET_ELEMENT_ATTR_RSP].label, in get_element_attr_rsp()
1946 p_dev->rc_pdu_info[IDX_GET_ELEMENT_ATTR_RSP].ctype, in get_element_attr_rsp()
2066 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_folder_items_list_rsp() local
2071 CHECK_RC_CONNECTED(p_dev); in get_folder_items_list_rsp()
2074 if (!p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].is_rsp_pending) { in get_folder_items_list_rsp()
2168 status = AVRC_BldResponse(p_dev->rc_handle, &avrc_rsp, &p_msg); in get_folder_items_list_rsp()
2185 code = p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].ctype; in get_folder_items_list_rsp()
2187 BTA_AvMetaRsp(p_dev->rc_handle, in get_folder_items_list_rsp()
2188 p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].label, ctype, in get_folder_items_list_rsp()
2195 p_dev->rc_handle, p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].label, in get_folder_items_list_rsp()
2200 p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].ctype = 0; in get_folder_items_list_rsp()
2201 p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].label = 0; in get_folder_items_list_rsp()
2202 p_dev->rc_pdu_info[IDX_GET_FOLDER_ITEMS_RSP].is_rsp_pending = false; in get_folder_items_list_rsp()
2222 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in set_addressed_player_rsp() local
2225 CHECK_RC_CONNECTED(p_dev); in set_addressed_player_rsp()
2232 send_metamsg_rsp(p_dev, IDX_SET_ADDR_PLAYER_RSP, in set_addressed_player_rsp()
2233 p_dev->rc_pdu_info[IDX_SET_ADDR_PLAYER_RSP].label, in set_addressed_player_rsp()
2234 p_dev->rc_pdu_info[IDX_SET_ADDR_PLAYER_RSP].ctype, in set_addressed_player_rsp()
2270 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in set_browsed_player_rsp() local
2272 CHECK_RC_CONNECTED(p_dev); in set_browsed_player_rsp()
2285 if (!p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].is_rsp_pending) { in set_browsed_player_rsp()
2311 status = AVRC_BldResponse(p_dev->rc_handle, &avrc_rsp, &p_msg); in set_browsed_player_rsp()
2326 status = AVRC_BldResponse(p_dev->rc_handle, &avrc_rsp, &p_msg); in set_browsed_player_rsp()
2341 code = p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].ctype; in set_browsed_player_rsp()
2343 BTA_AvMetaRsp(p_dev->rc_handle, in set_browsed_player_rsp()
2344 p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].label, ctype, in set_browsed_player_rsp()
2351 p_dev->rc_handle, p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].label, in set_browsed_player_rsp()
2356 p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].ctype = 0; in set_browsed_player_rsp()
2357 p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].label = 0; in set_browsed_player_rsp()
2358 p_dev->rc_pdu_info[IDX_SET_BROWSED_PLAYER_RSP].is_rsp_pending = false; in set_browsed_player_rsp()
2379 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in change_path_rsp() local
2382 CHECK_RC_CONNECTED(p_dev); in change_path_rsp()
2390 send_metamsg_rsp(p_dev, IDX_CHG_PATH_RSP, in change_path_rsp()
2391 p_dev->rc_pdu_info[IDX_CHG_PATH_RSP].label, in change_path_rsp()
2392 p_dev->rc_pdu_info[IDX_CHG_PATH_RSP].ctype, &avrc_rsp); in change_path_rsp()
2412 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in search_rsp() local
2415 CHECK_RC_CONNECTED(p_dev); in search_rsp()
2424 send_metamsg_rsp(p_dev, IDX_SEARCH_RSP, in search_rsp()
2425 p_dev->rc_pdu_info[IDX_SEARCH_RSP].label, in search_rsp()
2426 p_dev->rc_pdu_info[IDX_SEARCH_RSP].ctype, &avrc_rsp); in search_rsp()
2447 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_item_attr_rsp() local
2450 CHECK_RC_CONNECTED(p_dev); in get_item_attr_rsp()
2465 send_metamsg_rsp(p_dev, IDX_GET_ITEM_ATTR_RSP, in get_item_attr_rsp()
2466 p_dev->rc_pdu_info[IDX_GET_ITEM_ATTR_RSP].label, in get_item_attr_rsp()
2467 p_dev->rc_pdu_info[IDX_GET_ITEM_ATTR_RSP].ctype, &avrc_rsp); in get_item_attr_rsp()
2487 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in add_to_now_playing_rsp() local
2490 CHECK_RC_CONNECTED(p_dev); in add_to_now_playing_rsp()
2497 send_metamsg_rsp(p_dev, IDX_ADD_TO_NOW_PLAYING_RSP, in add_to_now_playing_rsp()
2498 p_dev->rc_pdu_info[IDX_ADD_TO_NOW_PLAYING_RSP].label, in add_to_now_playing_rsp()
2499 p_dev->rc_pdu_info[IDX_ADD_TO_NOW_PLAYING_RSP].ctype, in add_to_now_playing_rsp()
2519 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in play_item_rsp() local
2522 CHECK_RC_CONNECTED(p_dev); in play_item_rsp()
2529 send_metamsg_rsp(p_dev, IDX_PLAY_ITEM_RSP, in play_item_rsp()
2530 p_dev->rc_pdu_info[IDX_PLAY_ITEM_RSP].label, in play_item_rsp()
2531 p_dev->rc_pdu_info[IDX_PLAY_ITEM_RSP].ctype, &avrc_rsp); in play_item_rsp()
2553 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_total_num_of_items_rsp() local
2556 CHECK_RC_CONNECTED(p_dev); in get_total_num_of_items_rsp()
2566 send_metamsg_rsp(p_dev, IDX_GET_TOTAL_NUM_OF_ITEMS_RSP, in get_total_num_of_items_rsp()
2567 p_dev->rc_pdu_info[IDX_GET_TOTAL_NUM_OF_ITEMS_RSP].label, in get_total_num_of_items_rsp()
2568 p_dev->rc_pdu_info[IDX_GET_TOTAL_NUM_OF_ITEMS_RSP].ctype, in get_total_num_of_items_rsp()
2664 static void register_volumechange(uint8_t lbl, btif_rc_device_cb_t* p_dev) { in register_volumechange() argument
2682 BTA_AvMetaCmd(p_dev->rc_handle, p_transaction->lbl, AVRC_CMD_NOTIF, in register_volumechange()
2705 btif_rc_device_cb_t* p_dev) { in handle_rc_metamsg_rsp() argument
2727 p_dev->rc_vol_label == pmeta_msg->label) { in handle_rc_metamsg_rsp()
2728 p_dev->rc_vol_label = MAX_LABEL; in handle_rc_metamsg_rsp()
2729 release_transaction(p_dev->rc_vol_label); in handle_rc_metamsg_rsp()
2738 p_dev->rc_vol_label != pmeta_msg->label) { in handle_rc_metamsg_rsp()
2752 p_dev->rc_features &= ~BTA_AV_FEAT_ADV_CTRL; in handle_rc_metamsg_rsp()
2753 handle_rc_features(p_dev); in handle_rc_metamsg_rsp()
2769 register_volumechange(p_dev->rc_vol_label, p_dev); in handle_rc_metamsg_rsp()
2778 pmeta_msg->code, pmeta_msg->label, p_dev); in handle_rc_metamsg_rsp()
2818 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(cntxt->rc_addr); in iterate_supported_event_list_for_timeout() local
2822 list_remove(p_dev->rc_supported_event_list, p_event); in iterate_supported_event_list_for_timeout()
2839 btif_rc_device_cb_t* p_dev) { in rc_notification_interim_timout() argument
2844 cntxt.rc_addr = p_dev->rc_addr; in rc_notification_interim_timout()
2846 list_foreach(p_dev->rc_supported_event_list, in rc_notification_interim_timout()
2851 node = list_begin(p_dev->rc_supported_event_list); in rc_notification_interim_timout()
2857 register_for_event_notification(p_event, p_dev); in rc_notification_interim_timout()
2880 btif_rc_device_cb_t* p_dev = NULL; in btif_rc_status_cmd_timeout_handler() local
2884 p_dev = btif_rc_get_device_by_bda(p_context->rc_addr); in btif_rc_status_cmd_timeout_handler()
2885 if (p_dev == NULL) { in btif_rc_status_cmd_timeout_handler()
2889 meta_msg.rc_handle = p_dev->rc_handle; in btif_rc_status_cmd_timeout_handler()
2893 rc_notification_interim_timout(p_context->rc_status_cmd.label, p_dev); in btif_rc_status_cmd_timeout_handler()
2969 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(p_context->rc_addr); in btif_rc_control_cmd_timeout_handler() local
2970 if (p_dev == NULL) { in btif_rc_control_cmd_timeout_handler()
2976 meta_msg.rc_handle = p_dev->rc_handle; in btif_rc_control_cmd_timeout_handler()
3015 btif_rc_device_cb_t* p_dev) { in register_for_event_notification() argument
3028 interval_in_seconds, p_dev); in register_for_event_notification()
3041 p_context->rc_addr = p_dev->rc_addr; in register_for_event_notification()
3050 btif_rc_device_cb_t* p_dev) { in start_status_command_timer() argument
3054 p_context->rc_addr = p_dev->rc_addr; in start_status_command_timer()
3063 btif_rc_device_cb_t* p_dev) { in start_control_command_timer() argument
3067 p_context->rc_addr = p_dev->rc_addr; in start_control_command_timer()
3077 btif_rc_device_cb_t* p_dev) { in build_and_send_vendor_cmd() argument
3088 BTA_AvVendorCmd(p_dev->rc_handle, p_transaction->lbl, cmd_code, data_start, in build_and_send_vendor_cmd()
3092 start_status_command_timer(avrc_cmd->pdu, p_transaction, p_dev); in build_and_send_vendor_cmd()
3094 start_control_command_timer(avrc_cmd->pdu, p_transaction, p_dev); in build_and_send_vendor_cmd()
3118 btif_rc_device_cb_t* p_dev) { in build_and_send_browsing_cmd() argument
3138 BTA_AvMetaCmd(p_dev->rc_handle, p_transaction->lbl, AVRC_CMD_CTRL, p_msg); in build_and_send_browsing_cmd()
3155 btif_rc_device_cb_t* p_dev = in handle_get_capability_response() local
3169 p_dev->rc_supported_event_list = list_new(osi_free); in handle_get_capability_response()
3184 list_append(p_dev->rc_supported_event_list, p_event); in handle_get_capability_response()
3192 if (list_is_empty(p_dev->rc_supported_event_list)) { in handle_get_capability_response()
3197 (btif_rc_supported_event_t*)list_front(p_dev->rc_supported_event_list); in handle_get_capability_response()
3199 register_for_event_notification(p_event, p_dev); in handle_get_capability_response()
3202 getcapabilities_cmd(AVRC_CAP_EVENTS_SUPPORTED, p_dev); in handle_get_capability_response()
3242 btif_rc_device_cb_t* p_dev = in handle_notification_response() local
3245 if (p_dev == NULL) { in handle_notification_response()
3250 const uint32_t* attr_list = get_requested_attributes_list(p_dev); in handle_notification_response()
3251 const uint8_t attr_list_size = get_requested_attributes_list_size(p_dev); in handle_notification_response()
3260 get_play_status_cmd(p_dev); in handle_notification_response()
3264 p_dev->rc_addr, in handle_notification_response()
3273 BE_STREAM_TO_UINT64(p_dev->rc_playing_uid, p_data); in handle_notification_response()
3274 get_play_status_cmd(p_dev); in handle_notification_response()
3276 p_dev); in handle_notification_response()
3287 p_dev->rc_addr)); in handle_notification_response()
3295 p_dev->rc_addr)); in handle_notification_response()
3302 p_dev->rc_addr, p_rsp->param.addr_player.player_id)); in handle_notification_response()
3306 …jni_thread(FROM_HERE, base::Bind(bt_rc_ctrl_callbacks->play_position_changed_cb, p_dev->rc_addr, 0, in handle_notification_response()
3323 list_foreach(p_dev->rc_supported_event_list, in handle_notification_response()
3327 node = list_begin(p_dev->rc_supported_event_list); in handle_notification_response()
3332 register_for_event_notification(p_event, p_dev); in handle_notification_response()
3339 if (p_event == NULL && !p_dev->rc_app_settings.query_started) { in handle_notification_response()
3343 p_dev->rc_app_settings.query_started = true; in handle_notification_response()
3344 if (p_dev->rc_features & BTA_AV_FEAT_APP_SETTING) { in handle_notification_response()
3345 list_player_app_setting_attrib_cmd(p_dev); in handle_notification_response()
3349 rc_ctrl_procedure_complete(p_dev); in handle_notification_response()
3359 node = list_begin(p_dev->rc_supported_event_list); in handle_notification_response()
3365 register_for_event_notification(p_event, p_dev); in handle_notification_response()
3379 p_dev->rc_addr, in handle_notification_response()
3388 get_metadata_attribute_cmd(attr_list_size, attr_list, p_dev); in handle_notification_response()
3405 p_dev->rc_addr, app_settings)); in handle_notification_response()
3448 btif_rc_device_cb_t* p_dev = in handle_app_attr_response() local
3451 if (p_dev == NULL || p_rsp->status != AVRC_STS_NO_ERROR) { in handle_app_attr_response()
3454 rc_ctrl_procedure_complete(p_dev); in handle_app_attr_response()
3457 p_dev->rc_app_settings.num_attrs = 0; in handle_app_attr_response()
3458 p_dev->rc_app_settings.num_ext_attrs = 0; in handle_app_attr_response()
3464 st_index = p_dev->rc_app_settings.num_ext_attrs; in handle_app_attr_response()
3465 p_dev->rc_app_settings.ext_attrs[st_index].attr_id = p_rsp->attrs[xx]; in handle_app_attr_response()
3466 p_dev->rc_app_settings.num_ext_attrs++; in handle_app_attr_response()
3468 st_index = p_dev->rc_app_settings.num_attrs; in handle_app_attr_response()
3469 p_dev->rc_app_settings.attrs[st_index].attr_id = p_rsp->attrs[xx]; in handle_app_attr_response()
3470 p_dev->rc_app_settings.num_attrs++; in handle_app_attr_response()
3473 p_dev->rc_app_settings.attr_index = 0; in handle_app_attr_response()
3474 p_dev->rc_app_settings.ext_attr_index = 0; in handle_app_attr_response()
3475 p_dev->rc_app_settings.ext_val_index = 0; in handle_app_attr_response()
3477 list_player_app_setting_value_cmd(p_dev->rc_app_settings.attrs[0].attr_id, in handle_app_attr_response()
3478 p_dev); in handle_app_attr_response()
3501 btif_rc_device_cb_t* p_dev = in handle_app_val_response() local
3505 if (p_dev == NULL || p_rsp->status != AVRC_STS_NO_ERROR) { in handle_app_val_response()
3511 p_app_settings = &p_dev->rc_app_settings; in handle_app_val_response()
3523 p_app_settings->attrs[p_app_settings->attr_index].attr_id, p_dev); in handle_app_val_response()
3528 p_app_settings->ext_attrs[attr_index].attr_id, p_dev); in handle_app_val_response()
3533 get_player_app_setting_cmd(p_app_settings->num_attrs, attrs, p_dev); in handle_app_val_response()
3537 p_dev->rc_addr, p_app_settings->num_attrs, in handle_app_val_response()
3552 p_dev); in handle_app_val_response()
3560 p_dev); in handle_app_val_response()
3578 btif_rc_device_cb_t* p_dev = NULL; in handle_app_cur_val_response() local
3586 p_dev = btif_rc_get_device_by_handle(pmeta_msg->rc_handle); in handle_app_cur_val_response()
3587 if (p_dev == NULL) { in handle_app_cur_val_response()
3609 p_dev->rc_addr, app_settings)); in handle_app_cur_val_response()
3614 rc_ctrl_procedure_complete(p_dev); in handle_app_cur_val_response()
3634 btif_rc_device_cb_t* p_dev = in handle_app_attr_txt_response() local
3637 if (p_dev == NULL) { in handle_app_attr_txt_response()
3642 p_app_settings = &p_dev->rc_app_settings; in handle_app_attr_txt_response()
3660 if (p_dev) { in handle_app_attr_txt_response()
3668 p_dev->rc_addr, p_app_settings->num_attrs, in handle_app_attr_txt_response()
3670 get_player_app_setting_cmd(xx, attrs, p_dev); in handle_app_attr_txt_response()
3690 get_player_app_setting_value_text_cmd(vals, xx, p_dev); in handle_app_attr_txt_response()
3709 btif_rc_device_cb_t* p_dev = in handle_app_attr_val_txt_response() local
3712 if (p_dev == NULL) { in handle_app_attr_val_txt_response()
3717 p_app_settings = &p_dev->rc_app_settings; in handle_app_attr_val_txt_response()
3747 p_dev->rc_addr, p_app_settings->num_attrs, in handle_app_attr_val_txt_response()
3750 get_player_app_setting_cmd(xx, attrs, p_dev); in handle_app_attr_val_txt_response()
3774 get_player_app_setting_value_text_cmd(vals, xx, p_dev); in handle_app_attr_val_txt_response()
3787 p_dev->rc_addr, p_app_settings->num_attrs, in handle_app_attr_val_txt_response()
3790 get_player_app_setting_cmd(xx + x, attrs, p_dev); in handle_app_attr_val_txt_response()
3834 btif_rc_device_cb_t* p_dev = in handle_set_app_attr_val_response() local
3837 if (p_dev == NULL) { in handle_set_app_attr_val_response()
3851 p_dev->rc_addr, accepted)); in handle_set_app_attr_val_response()
3865 btif_rc_device_cb_t* p_dev = in handle_get_metadata_attr_response() local
3873 if (p_dev == NULL) { in handle_get_metadata_attr_response()
3890 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_metadata_attr_response()
3896 const uint32_t* attr_list = get_requested_attributes_list(p_dev); in handle_get_metadata_attr_response()
3897 const uint8_t attr_list_size = get_requested_attributes_list_size(p_dev); in handle_get_metadata_attr_response()
3898 get_metadata_attribute_cmd(attr_list_size, attr_list, p_dev); in handle_get_metadata_attr_response()
3917 btif_rc_device_cb_t* p_dev = in handle_get_playstatus_response() local
3920 if (p_dev == NULL) { in handle_get_playstatus_response()
3929 base::Bind(bt_rc_ctrl_callbacks->play_status_changed_cb, p_dev->rc_addr, in handle_get_playstatus_response()
3934 p_dev->rc_addr, p_rsp->song_len, p_rsp->song_pos)); in handle_get_playstatus_response()
3953 btif_rc_device_cb_t* p_dev = in handle_set_addressed_player_response() local
3956 if (p_dev == NULL) { in handle_set_addressed_player_response()
3965 p_dev->rc_addr, p_rsp->status)); in handle_set_addressed_player_response()
3983 btif_rc_device_cb_t* p_dev = in handle_get_folder_items_response() local
4026 base::Bind(bt_rc_ctrl_callbacks->get_folder_items_cb, p_dev->rc_addr, in handle_get_folder_items_response()
4033 (p_dev->rc_features & BTA_AV_FEAT_APP_SETTING)) { in handle_get_folder_items_response()
4034 list_player_app_setting_attrib_cmd(p_dev); in handle_get_folder_items_response()
4048 base::Bind(bt_rc_ctrl_callbacks->get_folder_items_cb, p_dev->rc_addr, in handle_get_folder_items_response()
4263 btif_rc_device_cb_t* p_dev = in handle_change_path_response() local
4269 p_dev->rc_addr, p_rsp->num_items)); in handle_change_path_response()
4287 btif_rc_device_cb_t* p_dev = in handle_set_browsed_player_response() local
4293 base::Bind(bt_rc_ctrl_callbacks->set_browsed_player_cb, p_dev->rc_addr, in handle_set_browsed_player_response()
4442 btif_rc_device_cb_t* p_dev = NULL; in handle_avk_rc_metamsg_cmd() local
4460 p_dev = btif_rc_get_device_by_handle(pmeta_msg->rc_handle); in handle_avk_rc_metamsg_cmd()
4461 if (p_dev == NULL) { in handle_avk_rc_metamsg_cmd()
4476 p_dev); in handle_avk_rc_metamsg_cmd()
4546 btif_rc_device_cb_t* p_dev) { in getcapabilities_cmd() argument
4548 CHECK_RC_CONNECTED(p_dev); in getcapabilities_cmd()
4556 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in getcapabilities_cmd()
4569 btif_rc_device_cb_t* p_dev) { in list_player_app_setting_attrib_cmd() argument
4571 CHECK_RC_CONNECTED(p_dev); in list_player_app_setting_attrib_cmd()
4578 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in list_player_app_setting_attrib_cmd()
4591 uint8_t attrib_id, btif_rc_device_cb_t* p_dev) { in list_player_app_setting_value_cmd() argument
4593 CHECK_RC_CONNECTED(p_dev); in list_player_app_setting_value_cmd()
4601 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in list_player_app_setting_value_cmd()
4615 btif_rc_device_cb_t* p_dev) { in get_player_app_setting_cmd() argument
4617 CHECK_RC_CONNECTED(p_dev); in get_player_app_setting_cmd()
4629 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in get_player_app_setting_cmd()
4644 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_current_metadata_cmd() local
4645 if (p_dev == NULL) { in get_current_metadata_cmd()
4649 const uint32_t* attr_list = get_requested_attributes_list(p_dev); in get_current_metadata_cmd()
4650 const uint8_t attr_list_size = get_requested_attributes_list_size(p_dev); in get_current_metadata_cmd()
4651 return get_metadata_attribute_cmd(attr_list_size, attr_list, p_dev); in get_current_metadata_cmd()
4666 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_playback_state_cmd() local
4667 return get_play_status_cmd(p_dev); in get_playback_state_cmd()
4709 btif_rc_device_cb_t* p_dev) { in get_item_attribute_cmd() argument
4717 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in get_item_attribute_cmd()
4778 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in change_folder_path_cmd() local
4779 CHECK_RC_CONNECTED(p_dev); in change_folder_path_cmd()
4780 CHECK_BR_CONNECTED(p_dev); in change_folder_path_cmd()
4793 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in change_folder_path_cmd()
4811 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in set_browsed_player_cmd() local
4812 CHECK_RC_CONNECTED(p_dev); in set_browsed_player_cmd()
4813 CHECK_BR_CONNECTED(p_dev); in set_browsed_player_cmd()
4821 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in set_browsed_player_cmd()
4840 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in set_addressed_player_cmd() local
4841 CHECK_RC_CONNECTED(p_dev); in set_addressed_player_cmd()
4842 CHECK_BR_CONNECTED(p_dev); in set_addressed_player_cmd()
4850 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in set_addressed_player_cmd()
4873 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in get_folder_items_cmd() local
4875 CHECK_RC_CONNECTED(p_dev); in get_folder_items_cmd()
4876 CHECK_BR_CONNECTED(p_dev); in get_folder_items_cmd()
4890 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in get_folder_items_cmd()
4907 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in change_player_app_setting() local
4908 CHECK_RC_CONNECTED(p_dev); in change_player_app_setting()
4922 bt_status_t st = build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_CTRL, p_dev); in change_player_app_setting()
4939 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in play_item_cmd() local
4940 CHECK_RC_CONNECTED(p_dev); in play_item_cmd()
4941 CHECK_BR_CONNECTED(p_dev); in play_item_cmd()
4951 return build_and_send_browsing_cmd(&avrc_cmd, p_dev); in play_item_cmd()
4965 uint8_t* attrs, uint8_t num_attrs, btif_rc_device_cb_t* p_dev) { in get_player_app_setting_attr_text_cmd() argument
4967 CHECK_RC_CONNECTED(p_dev); in get_player_app_setting_attr_text_cmd()
4978 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in get_player_app_setting_attr_text_cmd()
4991 uint8_t* vals, uint8_t num_vals, btif_rc_device_cb_t* p_dev) { in get_player_app_setting_value_text_cmd() argument
4993 CHECK_RC_CONNECTED(p_dev); in get_player_app_setting_value_text_cmd()
5004 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in get_player_app_setting_value_text_cmd()
5018 btif_rc_device_cb_t* p_dev) { in register_notification_cmd() argument
5021 CHECK_RC_CONNECTED(p_dev); in register_notification_cmd()
5037 BTA_AvVendorCmd(p_dev->rc_handle, label, AVRC_CMD_NOTIF, data_start, in register_notification_cmd()
5063 btif_rc_device_cb_t* p_dev) { in get_metadata_attribute_cmd() argument
5068 if (p_dev->br_connected) { in get_metadata_attribute_cmd()
5069 return get_item_attribute_cmd(p_dev->rc_playing_uid, in get_metadata_attribute_cmd()
5071 p_attr_ids, p_dev); in get_metadata_attribute_cmd()
5075 return get_element_attribute_cmd(num_attribute, p_attr_ids, p_dev); in get_metadata_attribute_cmd()
5089 btif_rc_device_cb_t* p_dev) { in get_element_attribute_cmd() argument
5092 CHECK_RC_CONNECTED(p_dev); in get_element_attribute_cmd()
5102 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in get_element_attribute_cmd()
5114 static bt_status_t get_play_status_cmd(btif_rc_device_cb_t* p_dev) { in get_play_status_cmd() argument
5116 CHECK_RC_CONNECTED(p_dev); in get_play_status_cmd()
5123 return build_and_send_vendor_cmd(&avrc_cmd, AVRC_CMD_STATUS, p_dev); in get_play_status_cmd()
5140 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in set_volume_rsp() local
5142 CHECK_RC_CONNECTED(p_dev); in set_volume_rsp()
5150 status = AVRC_BldResponse(p_dev->rc_handle, &avrc_rsp, &p_msg); in set_volume_rsp()
5154 p_dev->rc_vol_label); in set_volume_rsp()
5156 BTA_AvVendorRsp(p_dev->rc_handle, label, AVRC_RSP_ACCEPT, data_start, in set_volume_rsp()
5185 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in volume_change_notification_rsp() local
5187 CHECK_RC_CONNECTED(p_dev); in volume_change_notification_rsp()
5195 status = AVRC_BldResponse(p_dev->rc_handle, &avrc_rsp, &p_msg); in volume_change_notification_rsp()
5200 BTA_AvVendorRsp(p_dev->rc_handle, label, in volume_change_notification_rsp()
5231 btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr); in send_groupnavigation_cmd() local
5233 CHECK_RC_CONNECTED(p_dev); in send_groupnavigation_cmd()
5235 if (p_dev->rc_features & BTA_AV_FEAT_RCTG) { in send_groupnavigation_cmd()
5243 BTA_AvRemoteVendorUniqueCmd(p_dev->rc_handle, p_transaction->lbl, in send_groupnavigation_cmd()
5272 btif_rc_device_cb_t* p_dev = NULL; in send_passthrough_cmd() local
5274 p_dev = btif_rc_get_device_by_bda(bd_addr); in send_passthrough_cmd()
5276 CHECK_RC_CONNECTED(p_dev); in send_passthrough_cmd()
5281 if (p_dev->rc_features & BTA_AV_FEAT_RCTG) { in send_passthrough_cmd()
5284 BTA_AvRemoteCmd(p_dev->rc_handle, p_transaction->lbl, in send_passthrough_cmd()