• Home
  • Raw
  • Download

Lines Matching refs:p_msg

59 typedef void (*tAVDT_MSG_BLD)(uint8_t** p, tAVDT_MSG* p_msg);
62 typedef uint8_t (*tAVDT_MSG_PRS)(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
68 static void avdt_msg_bld_none(uint8_t** p, tAVDT_MSG* p_msg);
69 static void avdt_msg_bld_single(uint8_t** p, tAVDT_MSG* p_msg);
70 static void avdt_msg_bld_setconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg);
71 static void avdt_msg_bld_reconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg);
72 static void avdt_msg_bld_multi(uint8_t** p, tAVDT_MSG* p_msg);
73 static void avdt_msg_bld_security_cmd(uint8_t** p, tAVDT_MSG* p_msg);
74 static void avdt_msg_bld_discover_rsp(uint8_t** p, tAVDT_MSG* p_msg);
75 static void avdt_msg_bld_svccap(uint8_t** p, tAVDT_MSG* p_msg);
76 static void avdt_msg_bld_security_rsp(uint8_t** p, tAVDT_MSG* p_msg);
77 static void avdt_msg_bld_all_svccap(uint8_t** p, tAVDT_MSG* p_msg);
78 static void avdt_msg_bld_delay_rpt(uint8_t** p, tAVDT_MSG* p_msg);
80 static uint8_t avdt_msg_prs_none(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
81 static uint8_t avdt_msg_prs_single(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
82 static uint8_t avdt_msg_prs_setconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p,
84 static uint8_t avdt_msg_prs_reconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p,
86 static uint8_t avdt_msg_prs_multi(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
87 static uint8_t avdt_msg_prs_security_cmd(tAVDT_MSG* p_msg, uint8_t* p,
89 static uint8_t avdt_msg_prs_discover_rsp(tAVDT_MSG* p_msg, uint8_t* p,
91 static uint8_t avdt_msg_prs_svccap(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len);
92 static uint8_t avdt_msg_prs_all_svccap(tAVDT_MSG* p_msg, uint8_t* p,
94 static uint8_t avdt_msg_prs_security_rsp(tAVDT_MSG* p_msg, uint8_t* p,
96 static uint8_t avdt_msg_prs_delay_rpt(tAVDT_MSG* p_msg, uint8_t* p,
333 UNUSED_ATTR tAVDT_MSG* p_msg) { in avdt_msg_bld_none() argument
348 static void avdt_msg_bld_single(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_single() argument
349 AVDT_MSG_BLD_SEID(*p, p_msg->single.seid); in avdt_msg_bld_single()
363 static void avdt_msg_bld_setconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_setconfig_cmd() argument
364 AVDT_MSG_BLD_SEID(*p, p_msg->config_cmd.hdr.seid); in avdt_msg_bld_setconfig_cmd()
365 AVDT_MSG_BLD_SEID(*p, p_msg->config_cmd.int_seid); in avdt_msg_bld_setconfig_cmd()
366 avdt_msg_bld_cfg(p, p_msg->config_cmd.p_cfg); in avdt_msg_bld_setconfig_cmd()
380 static void avdt_msg_bld_reconfig_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_reconfig_cmd() argument
381 AVDT_MSG_BLD_SEID(*p, p_msg->reconfig_cmd.hdr.seid); in avdt_msg_bld_reconfig_cmd()
384 p_msg->reconfig_cmd.p_cfg->psc_mask = 0; in avdt_msg_bld_reconfig_cmd()
385 avdt_msg_bld_cfg(p, p_msg->reconfig_cmd.p_cfg); in avdt_msg_bld_reconfig_cmd()
399 static void avdt_msg_bld_multi(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_multi() argument
402 for (i = 0; i < p_msg->multi.num_seps; i++) { in avdt_msg_bld_multi()
403 AVDT_MSG_BLD_SEID(*p, p_msg->multi.seid_list[i]); in avdt_msg_bld_multi()
417 static void avdt_msg_bld_security_cmd(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_security_cmd() argument
418 AVDT_MSG_BLD_SEID(*p, p_msg->security_cmd.hdr.seid); in avdt_msg_bld_security_cmd()
419 memcpy(*p, p_msg->security_cmd.p_data, p_msg->security_cmd.len); in avdt_msg_bld_security_cmd()
420 *p += p_msg->security_cmd.len; in avdt_msg_bld_security_cmd()
433 static void avdt_msg_bld_delay_rpt(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_delay_rpt() argument
434 AVDT_MSG_BLD_SEID(*p, p_msg->delay_rpt_cmd.hdr.seid); in avdt_msg_bld_delay_rpt()
435 UINT16_TO_BE_STREAM(*p, p_msg->delay_rpt_cmd.delay); in avdt_msg_bld_delay_rpt()
449 static void avdt_msg_bld_discover_rsp(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_discover_rsp() argument
452 for (i = 0; i < p_msg->discover_rsp.num_seps; i++) { in avdt_msg_bld_discover_rsp()
454 AVDT_MSG_BLD_DISC(*p, p_msg->discover_rsp.p_sep_info[i].seid, in avdt_msg_bld_discover_rsp()
455 p_msg->discover_rsp.p_sep_info[i].in_use, in avdt_msg_bld_discover_rsp()
456 p_msg->discover_rsp.p_sep_info[i].media_type, in avdt_msg_bld_discover_rsp()
457 p_msg->discover_rsp.p_sep_info[i].tsep); in avdt_msg_bld_discover_rsp()
472 static void avdt_msg_bld_svccap(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_svccap() argument
473 AvdtpSepConfig cfg = *p_msg->svccap.p_cfg; in avdt_msg_bld_svccap()
492 static void avdt_msg_bld_all_svccap(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_all_svccap() argument
493 avdt_msg_bld_cfg(p, p_msg->svccap.p_cfg); in avdt_msg_bld_all_svccap()
507 static void avdt_msg_bld_security_rsp(uint8_t** p, tAVDT_MSG* p_msg) { in avdt_msg_bld_security_rsp() argument
508 memcpy(*p, p_msg->security_rsp.p_data, p_msg->security_rsp.len); in avdt_msg_bld_security_rsp()
509 *p += p_msg->security_rsp.len; in avdt_msg_bld_security_rsp()
678 static uint8_t avdt_msg_prs_none(UNUSED_ATTR tAVDT_MSG* p_msg, in avdt_msg_prs_none() argument
695 static uint8_t avdt_msg_prs_single(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_single() argument
702 AVDT_MSG_PRS_SEID(p, p_msg->single.seid); in avdt_msg_prs_single()
704 if (avdt_scb_by_hdl(p_msg->single.seid) == NULL) { in avdt_msg_prs_single()
722 static uint8_t avdt_msg_prs_setconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_setconfig_cmd() argument
726 p_msg->hdr.err_param = 0; in avdt_msg_prs_setconfig_cmd()
733 AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.hdr.seid); in avdt_msg_prs_setconfig_cmd()
734 if (avdt_scb_by_hdl(p_msg->config_cmd.hdr.seid) == NULL) { in avdt_msg_prs_setconfig_cmd()
738 AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.int_seid); in avdt_msg_prs_setconfig_cmd()
739 if ((p_msg->config_cmd.int_seid < AVDT_SEID_MIN) || in avdt_msg_prs_setconfig_cmd()
740 (p_msg->config_cmd.int_seid > AVDT_SEID_MAX)) { in avdt_msg_prs_setconfig_cmd()
748 err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, in avdt_msg_prs_setconfig_cmd()
749 &p_msg->hdr.err_param, AVDT_SIG_SETCONFIG); in avdt_msg_prs_setconfig_cmd()
753 if (((p_msg->config_cmd.p_cfg->psc_mask & (~AVDT_PSC)) != 0) || in avdt_msg_prs_setconfig_cmd()
754 (p_msg->config_cmd.p_cfg->num_codec == 0)) { in avdt_msg_prs_setconfig_cmd()
774 static uint8_t avdt_msg_prs_reconfig_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_reconfig_cmd() argument
778 p_msg->hdr.err_param = 0; in avdt_msg_prs_reconfig_cmd()
785 AVDT_MSG_PRS_SEID(p, p_msg->reconfig_cmd.hdr.seid); in avdt_msg_prs_reconfig_cmd()
786 if (avdt_scb_by_hdl(p_msg->reconfig_cmd.hdr.seid) == NULL) { in avdt_msg_prs_reconfig_cmd()
791 err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, in avdt_msg_prs_reconfig_cmd()
792 &p_msg->hdr.err_param, AVDT_SIG_RECONFIG); in avdt_msg_prs_reconfig_cmd()
797 p_msg->config_cmd.p_cfg->psc_mask, AVDT_MSG_PSC_MASK); in avdt_msg_prs_reconfig_cmd()
798 if ((p_msg->config_cmd.p_cfg->psc_mask != 0) || in avdt_msg_prs_reconfig_cmd()
799 (p_msg->config_cmd.p_cfg->num_codec == 0 && in avdt_msg_prs_reconfig_cmd()
800 p_msg->config_cmd.p_cfg->num_protect == 0)) { in avdt_msg_prs_reconfig_cmd()
820 static uint8_t avdt_msg_prs_multi(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_multi() argument
824 p_msg->hdr.err_param = 0; in avdt_msg_prs_multi()
832 AVDT_MSG_PRS_SEID(p, p_msg->multi.seid_list[i]); in avdt_msg_prs_multi()
833 if (avdt_scb_by_hdl(p_msg->multi.seid_list[i]) == NULL) { in avdt_msg_prs_multi()
835 p_msg->hdr.err_param = p_msg->multi.seid_list[i]; in avdt_msg_prs_multi()
839 p_msg->multi.num_seps = (uint8_t)i; in avdt_msg_prs_multi()
856 static uint8_t avdt_msg_prs_security_cmd(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_security_cmd() argument
865 AVDT_MSG_PRS_SEID(p, p_msg->security_cmd.hdr.seid); in avdt_msg_prs_security_cmd()
866 if (avdt_scb_by_hdl(p_msg->security_cmd.hdr.seid) == NULL) { in avdt_msg_prs_security_cmd()
869 p_msg->security_cmd.p_data = p; in avdt_msg_prs_security_cmd()
870 p_msg->security_cmd.len = len - 1; in avdt_msg_prs_security_cmd()
887 static uint8_t avdt_msg_prs_discover_rsp(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_discover_rsp() argument
895 if (p_msg->discover_rsp.num_seps > (len / 2)) { in avdt_msg_prs_discover_rsp()
896 p_msg->discover_rsp.num_seps = (len / 2); in avdt_msg_prs_discover_rsp()
900 for (i = 0; i < p_msg->discover_rsp.num_seps; i++) { in avdt_msg_prs_discover_rsp()
902 AVDT_MSG_PRS_DISC(p, p_msg->discover_rsp.p_sep_info[i].seid, in avdt_msg_prs_discover_rsp()
903 p_msg->discover_rsp.p_sep_info[i].in_use, in avdt_msg_prs_discover_rsp()
904 p_msg->discover_rsp.p_sep_info[i].media_type, in avdt_msg_prs_discover_rsp()
905 p_msg->discover_rsp.p_sep_info[i].tsep); in avdt_msg_prs_discover_rsp()
908 if ((p_msg->discover_rsp.p_sep_info[i].seid < AVDT_SEID_MIN) || in avdt_msg_prs_discover_rsp()
909 (p_msg->discover_rsp.p_sep_info[i].seid > AVDT_SEID_MAX)) { in avdt_msg_prs_discover_rsp()
929 static uint8_t avdt_msg_prs_svccap(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len) { in avdt_msg_prs_svccap() argument
931 uint8_t err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, in avdt_msg_prs_svccap()
932 &p_msg->hdr.err_param, AVDT_SIG_GETCAP); in avdt_msg_prs_svccap()
933 if (p_msg->svccap.p_cfg) { in avdt_msg_prs_svccap()
934 p_msg->svccap.p_cfg->psc_mask &= AVDT_LEG_PSC; in avdt_msg_prs_svccap()
951 static uint8_t avdt_msg_prs_all_svccap(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_all_svccap() argument
953 uint8_t err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, in avdt_msg_prs_all_svccap()
954 &p_msg->hdr.err_param, AVDT_SIG_GET_ALLCAP); in avdt_msg_prs_all_svccap()
955 if (p_msg->svccap.p_cfg) { in avdt_msg_prs_all_svccap()
956 p_msg->svccap.p_cfg->psc_mask &= AVDT_MSG_PSC_MASK; in avdt_msg_prs_all_svccap()
972 static uint8_t avdt_msg_prs_security_rsp(tAVDT_MSG* p_msg, uint8_t* p, in avdt_msg_prs_security_rsp() argument
974 p_msg->security_rsp.p_data = p; in avdt_msg_prs_security_rsp()
975 p_msg->security_rsp.len = len; in avdt_msg_prs_security_rsp()
990 static uint8_t avdt_msg_prs_rej(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len, in avdt_msg_prs_rej() argument
996 p_msg->hdr.err_param = *p++; in avdt_msg_prs_rej()
999 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()