Lines Matching refs:p_msg

57 typedef void (*tAVDT_MSG_BLD)(uint8_t** p, tAVDT_MSG* p_msg);
60 typedef uint8_t (*tAVDT_MSG_PRS)(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
66 static void avdt_msg_bld_none(uint8_t** p, tAVDT_MSG* p_msg);
67 static void avdt_msg_bld_single(uint8_t** p, tAVDT_MSG* p_msg);
68 static void avdt_msg_bld_setconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg);
69 static void avdt_msg_bld_reconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg);
70 static void avdt_msg_bld_multi(uint8_t** p, tAVDT_MSG* p_msg);
71 static void avdt_msg_bld_security_cmd(uint8_t** p, tAVDT_MSG* p_msg);
72 static void avdt_msg_bld_discover_rsp(uint8_t** p, tAVDT_MSG* p_msg);
73 static void avdt_msg_bld_svccap(uint8_t** p, tAVDT_MSG* p_msg);
74 static void avdt_msg_bld_security_rsp(uint8_t** p, tAVDT_MSG* p_msg);
75 static void avdt_msg_bld_all_svccap(uint8_t** p, tAVDT_MSG* p_msg);
76 static void avdt_msg_bld_delay_rpt(uint8_t** p, tAVDT_MSG* p_msg);
78 static uint8_t avdt_msg_prs_none(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
79 static uint8_t avdt_msg_prs_single(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
80 static uint8_t avdt_msg_prs_setconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p,
82 static uint8_t avdt_msg_prs_reconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p,
84 static uint8_t avdt_msg_prs_multi(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
85 static uint8_t avdt_msg_prs_security_cmd(tAVDT_MSG* p_msg, uint8_t* p,
87 static uint8_t avdt_msg_prs_discover_rsp(tAVDT_MSG* p_msg, uint8_t* p,
89 static uint8_t avdt_msg_prs_svccap(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
90 static uint8_t avdt_msg_prs_all_svccap(tAVDT_MSG* p_msg, uint8_t* p,
92 static uint8_t avdt_msg_prs_security_rsp(tAVDT_MSG* p_msg, uint8_t* p,
94 static uint8_t avdt_msg_prs_delay_rpt(tAVDT_MSG* p_msg, uint8_t* p,
331 UNUSED_ATTR tAVDT_MSG* p_msg) { in avdt_msg_bld_none() argument
346 static void avdt_msg_bld_single(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_single() argument
347 AVDT_MSG_BLD_SEID(*p, p_msg->single.seid); in avdt_msg_bld_single()
361 static void avdt_msg_bld_setconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_setconfig_cmd() argument
362 AVDT_MSG_BLD_SEID(*p, p_msg->config_cmd.hdr.seid); in avdt_msg_bld_setconfig_cmd()
363 AVDT_MSG_BLD_SEID(*p, p_msg->config_cmd.int_seid); in avdt_msg_bld_setconfig_cmd()
364 avdt_msg_bld_cfg(p, p_msg->config_cmd.p_cfg); in avdt_msg_bld_setconfig_cmd()
378 static void avdt_msg_bld_reconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_reconfig_cmd() argument
379 AVDT_MSG_BLD_SEID(*p, p_msg->reconfig_cmd.hdr.seid); in avdt_msg_bld_reconfig_cmd()
382 p_msg->reconfig_cmd.p_cfg->psc_mask = 0; in avdt_msg_bld_reconfig_cmd()
383 avdt_msg_bld_cfg(p, p_msg->reconfig_cmd.p_cfg); in avdt_msg_bld_reconfig_cmd()
397 static void avdt_msg_bld_multi(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_multi() argument
400 for (i = 0; i < p_msg->multi.num_seps; i++) { in avdt_msg_bld_multi()
401 AVDT_MSG_BLD_SEID(*p, p_msg->multi.seid_list[i]); in avdt_msg_bld_multi()
415 static void avdt_msg_bld_security_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_security_cmd() argument
416 AVDT_MSG_BLD_SEID(*p, p_msg->security_cmd.hdr.seid); in avdt_msg_bld_security_cmd()
417 memcpy(*p, p_msg->security_cmd.p_data, p_msg->security_cmd.len); in avdt_msg_bld_security_cmd()
418 *p += p_msg->security_cmd.len; in avdt_msg_bld_security_cmd()
431 static void avdt_msg_bld_delay_rpt(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_delay_rpt() argument
432 AVDT_MSG_BLD_SEID(*p, p_msg->delay_rpt_cmd.hdr.seid); in avdt_msg_bld_delay_rpt()
433 UINT16_TO_BE_STREAM(*p, p_msg->delay_rpt_cmd.delay); in avdt_msg_bld_delay_rpt()
447 static void avdt_msg_bld_discover_rsp(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_discover_rsp() argument
450 for (i = 0; i < p_msg->discover_rsp.num_seps; i++) { in avdt_msg_bld_discover_rsp()
452 AVDT_MSG_BLD_DISC(*p, p_msg->discover_rsp.p_sep_info[i].seid, in avdt_msg_bld_discover_rsp()
453 p_msg->discover_rsp.p_sep_info[i].in_use, in avdt_msg_bld_discover_rsp()
454 p_msg->discover_rsp.p_sep_info[i].media_type, in avdt_msg_bld_discover_rsp()
455 p_msg->discover_rsp.p_sep_info[i].tsep); in avdt_msg_bld_discover_rsp()
470 static void avdt_msg_bld_svccap(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_svccap() argument
471 AvdtpSepConfig cfg = *p_msg->svccap.p_cfg; in avdt_msg_bld_svccap()
490 static void avdt_msg_bld_all_svccap(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_all_svccap() argument
491 avdt_msg_bld_cfg(p, p_msg->svccap.p_cfg); in avdt_msg_bld_all_svccap()
505 static void avdt_msg_bld_security_rsp(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_security_rsp() argument
506 memcpy(*p, p_msg->security_rsp.p_data, p_msg->security_rsp.len); in avdt_msg_bld_security_rsp()
507 *p += p_msg->security_rsp.len; in avdt_msg_bld_security_rsp()
676 static uint8_t avdt_msg_prs_none(UNUSED_ATTR tAVDT_MSG* p_msg, in avdt_msg_prs_none() argument
693 static uint8_t avdt_msg_prs_single(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_single() argument
700 AVDT_MSG_PRS_SEID(p, p_msg->single.seid); in avdt_msg_prs_single()
702 if (avdt_scb_by_hdl(p_msg->single.seid) == NULL) { in avdt_msg_prs_single()
720 static uint8_t avdt_msg_prs_setconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_setconfig_cmd() argument
724 p_msg->hdr.err_param = 0; in avdt_msg_prs_setconfig_cmd()
731 AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.hdr.seid); in avdt_msg_prs_setconfig_cmd()
732 if (avdt_scb_by_hdl(p_msg->config_cmd.hdr.seid) == NULL) { in avdt_msg_prs_setconfig_cmd()
736 AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.int_seid); in avdt_msg_prs_setconfig_cmd()
737 if ((p_msg->config_cmd.int_seid < AVDT_SEID_MIN) || in avdt_msg_prs_setconfig_cmd()
738 (p_msg->config_cmd.int_seid > AVDT_SEID_MAX)) { in avdt_msg_prs_setconfig_cmd()
746 err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, in avdt_msg_prs_setconfig_cmd()
747 &p_msg->hdr.err_param, AVDT_SIG_SETCONFIG); in avdt_msg_prs_setconfig_cmd()
751 if (((p_msg->config_cmd.p_cfg->psc_mask & (~AVDT_PSC)) != 0) || in avdt_msg_prs_setconfig_cmd()
752 (p_msg->config_cmd.p_cfg->num_codec == 0)) { in avdt_msg_prs_setconfig_cmd()
772 static uint8_t avdt_msg_prs_reconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_reconfig_cmd() argument
776 p_msg->hdr.err_param = 0; in avdt_msg_prs_reconfig_cmd()
783 AVDT_MSG_PRS_SEID(p, p_msg->reconfig_cmd.hdr.seid); in avdt_msg_prs_reconfig_cmd()
784 if (avdt_scb_by_hdl(p_msg->reconfig_cmd.hdr.seid) == NULL) { in avdt_msg_prs_reconfig_cmd()
789 err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, in avdt_msg_prs_reconfig_cmd()
790 &p_msg->hdr.err_param, AVDT_SIG_RECONFIG); in avdt_msg_prs_reconfig_cmd()
795 p_msg->config_cmd.p_cfg->psc_mask, AVDT_MSG_PSC_MASK); in avdt_msg_prs_reconfig_cmd()
796 if ((p_msg->config_cmd.p_cfg->psc_mask != 0) || in avdt_msg_prs_reconfig_cmd()
797 (p_msg->config_cmd.p_cfg->num_codec == 0 && in avdt_msg_prs_reconfig_cmd()
798 p_msg->config_cmd.p_cfg->num_protect == 0)) { in avdt_msg_prs_reconfig_cmd()
818 static uint8_t avdt_msg_prs_multi(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_multi() argument
822 p_msg->hdr.err_param = 0; in avdt_msg_prs_multi()
830 AVDT_MSG_PRS_SEID(p, p_msg->multi.seid_list[i]); in avdt_msg_prs_multi()
831 if (avdt_scb_by_hdl(p_msg->multi.seid_list[i]) == NULL) { in avdt_msg_prs_multi()
833 p_msg->hdr.err_param = p_msg->multi.seid_list[i]; in avdt_msg_prs_multi()
837 p_msg->multi.num_seps = (uint8_t)i; in avdt_msg_prs_multi()
854 static uint8_t avdt_msg_prs_security_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_security_cmd() argument
863 AVDT_MSG_PRS_SEID(p, p_msg->security_cmd.hdr.seid); in avdt_msg_prs_security_cmd()
864 if (avdt_scb_by_hdl(p_msg->security_cmd.hdr.seid) == NULL) { in avdt_msg_prs_security_cmd()
867 p_msg->security_cmd.p_data = p; in avdt_msg_prs_security_cmd()
868 p_msg->security_cmd.len = len - 1; in avdt_msg_prs_security_cmd()
885 static uint8_t avdt_msg_prs_discover_rsp(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_discover_rsp() argument
893 if (p_msg->discover_rsp.num_seps > (len / 2)) { in avdt_msg_prs_discover_rsp()
894 p_msg->discover_rsp.num_seps = (len / 2); in avdt_msg_prs_discover_rsp()
898 for (i = 0; i < p_msg->discover_rsp.num_seps; i++) { in avdt_msg_prs_discover_rsp()
900 AVDT_MSG_PRS_DISC(p, p_msg->discover_rsp.p_sep_info[i].seid, in avdt_msg_prs_discover_rsp()
901 p_msg->discover_rsp.p_sep_info[i].in_use, in avdt_msg_prs_discover_rsp()
902 p_msg->discover_rsp.p_sep_info[i].media_type, in avdt_msg_prs_discover_rsp()
903 p_msg->discover_rsp.p_sep_info[i].tsep); in avdt_msg_prs_discover_rsp()
906 if ((p_msg->discover_rsp.p_sep_info[i].seid < AVDT_SEID_MIN) || in avdt_msg_prs_discover_rsp()
907 (p_msg->discover_rsp.p_sep_info[i].seid > AVDT_SEID_MAX)) { in avdt_msg_prs_discover_rsp()
927 static uint8_t avdt_msg_prs_svccap(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_svccap() argument
929 uint8_t err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, in avdt_msg_prs_svccap()
930 &p_msg->hdr.err_param, AVDT_SIG_GETCAP); in avdt_msg_prs_svccap()
931 if (p_msg->svccap.p_cfg) { in avdt_msg_prs_svccap()
932 p_msg->svccap.p_cfg->psc_mask &= AVDT_LEG_PSC; in avdt_msg_prs_svccap()
949 static uint8_t avdt_msg_prs_all_svccap(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_all_svccap() argument
951 uint8_t err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, in avdt_msg_prs_all_svccap()
952 &p_msg->hdr.err_param, AVDT_SIG_GET_ALLCAP); in avdt_msg_prs_all_svccap()
953 if (p_msg->svccap.p_cfg) { in avdt_msg_prs_all_svccap()
954 p_msg->svccap.p_cfg->psc_mask &= AVDT_MSG_PSC_MASK; in avdt_msg_prs_all_svccap()
970 static uint8_t avdt_msg_prs_security_rsp(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_security_rsp() argument
972 p_msg->security_rsp.p_data = p; in avdt_msg_prs_security_rsp()
973 p_msg->security_rsp.len = len; in avdt_msg_prs_security_rsp()
988 static uint8_t avdt_msg_prs_rej(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len, in avdt_msg_prs_rej() argument
994 p_msg->hdr.err_param = *p++; in avdt_msg_prs_rej()
997 AVDT_MSG_PRS_SEID(p, p_msg->hdr.err_param); in avdt_msg_prs_rej()
1008 p_msg->hdr.err_code = *p; in avdt_msg_prs_rej()
1025 static uint8_t avdt_msg_prs_delay_rpt(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_delay_rpt() argument
1036 AVDT_MSG_PRS_SEID(p, p_msg->delay_rpt_cmd.hdr.seid); in avdt_msg_prs_delay_rpt()
1038 if (avdt_scb_by_hdl(p_msg->delay_rpt_cmd.hdr.seid) == NULL) { in avdt_msg_prs_delay_rpt()
1041 BE_STREAM_TO_UINT16(p_msg->delay_rpt_cmd.delay, p); in avdt_msg_prs_delay_rpt()
1043 p_msg->delay_rpt_cmd.delay); in avdt_msg_prs_delay_rpt()
1059 bool avdt_msg_send(AvdtpCcb* p_ccb, BT_HDR* p_msg) { in avdt_msg_send() argument
1075 if (p_msg != NULL) { in avdt_msg_send()
1076 p_ccb->p_curr_msg = p_msg; in avdt_msg_send()