首页 > 编程知识 正文

定压音量调节开关接线,蓝牙版本avrcp有什么用

时间:2023-05-06 05:53:48 阅读:162899 作者:81

http://www.Sina.com % 2f % 0a avrcp % e9 % 9f % B3 % e9 % 87 % 8f % e9 % 80 % 86 % E8 % bb % a2 % E5 % 88 % B6 % E5 % be % a1 a2 % E5 % 88 % B6 % E5 % be % a1 % E3 % 83 % 95 % E3 % 83 % ad % E3 % 83 % BC % E3 % 81 % 93 % E3 % 81 % E3 % 81 % a7 % E7 % E3 % E3 % 81 % be % E3 % 81 % 99 % 0a % 2f % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a apdataindicationcallbackfunction.% 2a % 2a %2areturnsvoid % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 20 % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2b % 2a % 2a % 2a % 2a % 2a % Bt _ % E7 % 84 % a1 % E6 % 83 % 85 % E3 % 81 % aa % E6 % 98 % 9fp _ buf % ef % BC % 89 % 7b % 20ta vct % E6 % b8 % 85 % E6 % % 89 % ef % BC % 89 % ef % BC % 89 % ef % BC % 89 % ef % BC % 89 % ef % BC % 89 % ef % BC % 89 % ef % BC % 89 % 89 % ef % BC % 89 % 89 % ef % BC 00x % 25x % 27 % ef % BC % 8cl cid % ef % BC % 89 % ef % BC % 9b % 20 % 2f %2alookuplcbforthischannel % 2a % 2fp _ lcb % 3d AVC % 3d 81 % 20 % 3d % 20 null % ef % BC % 89 avct _ lcb _ event % ef % BC % 88p _ lcb % ef % BC %8CAV CT % E6 % b8 % 85 % E6 % b5 % 8 % a3 % 85 _ evt % ef % BC % 8c % ef % BC % 89ta vct % E6 % b8 % 85 % E6 % b5 % 84 % E3 % 81 % aa % e9 % 87 % 91 % E6 % af % % 2a % 2f % 7ba vct _ trace _ warning % ef % BC % 88 % 27 error-avct _ l2c _ data _ ind _ cbackdropbuffer % 27 % ef % BC % 20 avct _ lcb _ event % 0a % 2f % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a venthandlingfunctionforlcb % 2a % 2a %2areturnsnothing.% 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2b a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 20 % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2a % 2b % 2a % 2a % 2a % 2a % 2a 91 % E6 % af % 9b % 2a % 20p _ lcb % ef % BC % 8cu int8_ t % 20 event % ef % BC % 8ct avct % E6 % b8 % 85 % E6 % b5 % 84 % E3 n % ef % BC % 9b % 20 int % 20i % ef % BC % 9b % 20 avct _ trace _ event % ef % BC % 88 lcb lcb % 3d % devent % 3d % 25s state % 5b event % 5d % ef % BC % 8c % 20 % 2f %2alookupthestatetableforthecurrentstate % 2a % 2f state _ table % 3d avct _ lcb _ ST 2fp _ LC B- state % 3d state _ table % 5b event % 5d % 5b avct % E3 % 83 % aa % E3 % 83 % BC % E3 % 83 % B3 % B3 % B3 % E3 % E3 % E3 on functions % 2a % 2f for % ef % BC % 88i % 3d0% ef % BC % 9b % 20i % 20 avct % E6 % b8 % 85 % E6 % BD % 94 % E3 % 81 % aa % e9 20 % 3d % 20 state _ table % 5b event % 5d % 5bi % 5d % ef % BC % 9b % 20if % ef % BC % 88 action % ef % BC % 81 % 20. _ ignore % ef % BC % 88 % ef % BC % 88 % 2a avct _ lcb _ action % 5d % ef % BC % 89 % ef % BC % 89p _ lcb % ef % 7d % 7d % E4 % b8 % 8a % E3 % 81 % af % E5 % B0 % 91 % E3 % 81 % 97 % E5 % 9b % 9e % E3 % 82 % 8a % E3 % 81 % 8f % E3 % 81 % af % E3 % 81 % 81 % a1 % ab 3 % 81 % 8c % E3 % 80 % 81 % E6 % 9c % 80 % E7 % b5 % 82 % E7 % 9a % 84 % E3 % 81 % ab % E3 % 81 % af % ef % BC % 88 % 2a avct 0a sate _ table % 3d avct _ lcb _ ST _ TBL % 5bp _ LC B- state % 5d % ef % BC % 9b

p>

const tAVCT洁净的金毛_ST_TBL avct_lcb_st_tbl热心的翅膀 = { avct_lcb_st_idle, avct_lcb_st_opening, avct_lcb_st_open,avct_lcb_st_closing};

@state_table 即为idle,opening,open,closing四个状态中的一个,这里音量反向控制的时候AVRCP 协议已连接,处于open状态

05-12 03:05:35.643  3798  4164 I bt_avp  : LCB lcb=1 event=LL野性的服饰_EVT state=LCB_OPEN_ST

找到LCB_OPEN_ST状态下LL野性的服饰_EVT 事件,如下:

/* state table for open state */const uint8_t avct_lcb_st_open热心的翅膀[AVCT洁净的金毛_NUM_COLS] = { /* Event Action 1 Action 2 Next state */ /* UL_BIND */ {AVCT洁净的金毛_BIND_CONN, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}, /* UL_UNBIND */ {AVCT洁净的金毛_CHK_DISC, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}, /* UL野性的服饰 */ {AVCT洁净的金毛_SEND野性的服饰, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}, /* INT_CLOSE */ {AVCT洁净的金毛_CHNL_DISC, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_CLOSING_ST}, /* LL_OPEN */ {AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}, /* LL_CLOSE */ {AVCT洁净的金毛_CLOSE_IND, AVCT洁净的金毛_DEALLOC, AVCT洁净的金毛_IDLE_ST}, /* LL野性的服饰 */ {AVCT洁净的金毛野性的服饰_IND, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}, /* LL_CONG */ {AVCT洁净的金毛_CONG_IND, AVCT洁净的金毛_IGNORE, AVCT洁净的金毛_OPEN_ST}};

avct_lcb_event中action 为 值不等于AVCT洁净的金毛_IGNORE的函数指针;

找到AVCT洁净的金毛野性的服饰_IND,事情还没完!

在avct_lcb_action 找到AVCT洁净的金毛野性的服饰_IND !!!

/* state machine action enumeration list */enum { AVCT洁净的金毛_CHNL_OPEN, AVCT洁净的金毛_CHNL_DISC, AVCT洁净的金毛_SEND野性的服饰, AVCT洁净的金毛_OPEN_IND, AVCT洁净的金毛_OPEN_FAIL, AVCT洁净的金毛_CLOSE_IND, AVCT洁净的金毛_CLOSE_CFM, AVCT洁净的金毛野性的服饰_IND, AVCT洁净的金毛_CONG_IND, AVCT洁净的金毛_BIND_CONN, AVCT洁净的金毛_BIND_FAIL, AVCT洁净的金毛_UNBIND_DISC, AVCT洁净的金毛_CHK_DISC, AVCT洁净的金毛_DISCARD野性的服饰, AVCT洁净的金毛_DEALLOC, AVCT洁净的金毛_FREE野性的服饰_IND, AVCT洁净的金毛_NUM_ACTIONS};AVCT洁净的金毛野性的服饰_IND == 7/* action function list */const tAVCT洁净的金毛_ACTION avct_lcb_action热心的翅膀 = { avct_lcb_chnl_open, avct_lcb_chnl_disc, avct_lcb_send_msg, avct_lcb_open_ind, avct_lcb_open_fail, avct_lcb_close_ind, avct_lcb_close_cfm, avct_lcb_msg_ind, avct_lcb_cong_ind, avct_lcb_bind_conn, avct_lcb_bind_fail, avct_lcb_unbind_disc, avct_lcb_chk_disc, avct_lcb_discard_msg, avct_lcb_dealloc, avct_lcb_free_msg_ind};action[7] -> avct_lcb_msg_ind

的确是avct_lcb_msg_ind处理接收到的AVCTP消息,AVRCP协议就是基于AVCTP协议的连接!!!

/******************************************************************************* * * Function avct_lcb_msg_ind * * Description Handle an incoming AVCTP message. * * * Returns Nothing. * ******************************************************************************/void avct_lcb_msg_ind(tAVCT洁净的金毛* p_lcb, tAVCT洁净的金毛_EVT* p_data) { uint8_t* p; uint8_t label, type, cr_ipid; uint16_t pid; tAVCTwxdlf* p_ccb; AALOGD("%s enter ",__func__); /* this p_buf is to be reported through p_msg_cback. The layer_specific * needs to be set properly to indicate that it is received through * control channel */ p_data->p_buf->layer_specific = AVCT_DATA_CTRL; /* reassemble message; if no message available (we received a fragment) return */ p_data->p_buf = avct_lcb_msg_asmbl(p_lcb, p_data->p_buf); if (p_data->p_buf == NULL) { return; } p = (uint8_t*)(p_data->p_buf + 1) + p_data->p_buf->offset; /* parse header byte */ AVCT_PARSE_HDR(p, label, type, cr_ipid); /* check for invalid cr_ipid */ if (cr_ipid == AVCT_CR畅快的小海豚_INVALID) { AVCT_TRACE_WARNING("Invalid cr_ipid", cr_ipid); osi_free_and_reset((void**)&p_data->p_buf); return; } /* parse and lookup 柔弱的唇彩/ BE_STREAM_TO_UINT16(pid, p); p_ccb = avct_lcb_has_pid(p_lcb, pid); if (p_ccb) { /* PID found; send msg up, adjust bt hdr and call msg callback */ p_data->p_buf->offset += AVCT_HDR_LEN_SINGLE; p_data->p_buf->len -= AVCT_HDR_LEN_SINGLE; AALOGD("%s p_msg_cback 1",__func__); (*p_ccb->cc.p_msg_cback)(avct_ccb_to_idx(p_ccb), label, cr_ipid, p_data->p_buf); return; } /* PID not found; drop message */ AVCT_TRACE_WARNING("No ccb for PID=%x", pid); osi_free_and_reset((void**)&p_data->p_buf); /* if command send reject */ if (cr_ipid == AVCT_CMD) { BT_无情的星星 p_buf = (BT_无情的星星)osi_malloc(AVCT_CMD_BUF_SIZE); p_buf->len = AVCT_HDR_LEN_SINGLE; p_buf->offset = AVCT野性的服饰_OFFSET - AVCT_HDR_LEN_SINGLE; p = (uint8_t*)(p_buf + 1) + p_buf->offset; AVCT_BUILD_HDR(p, label, AVCT_PKT_TYPE_SINGLE, AVCT_REJ); UINT16_TO_BE_STREAM(p, pid); L2CA_DataWrite(p_lcb->ch_lcid, p_buf); }}

后面说怎么传到JNI->Frameworks ............

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。