In components/bt/host/bluedroid/bta/av/bta_av_act.c
I have added the following case inside the bta_av_proc_meta_cmd() function in an attempt to display "TEST" for the media TITLE in response to the 0x20 GetElementAttributes command from the controller. I also implemented a similar case for the GetPlayStatus (0x30)
Code: Select all
uint8_t vendor_attr_resp[64];
uint8_t *ptr;
case 0x20 : //getelementattributes
printf("\r\nRemote controller requested GetElementAttributes\r\n");
ptr = vendor_attr_resp;
*ptr++ = 0x00;
*ptr++ = 0x00;
*ptr++ = 0x00;
*ptr++ = 0x01; //int attrib 0x00000001 is TITLE of media attrib id
*ptr++ = 0x00;
*ptr++ = 0x6a; //UTF-8 charset
*ptr++ = 0x00;
*ptr++ = 0x04; //uint16_t len of attribute
*ptr++ = 'T';
*ptr++ = 'E';
*ptr++ = 'S';
*ptr++ = 'T';
*p_ctype = AVRC_RSP_CHANGED;
p_rc_rsp->rsp.status = AVRC_STS_NO_ERROR;
p_rc_rsp->get_elem_attrs.pdu = 0x20;
p_rc_rsp->get_elem_attrs.opcode = AVRC_OP_VENDOR;
p_rc_rsp->get_elem_attrs.num_attr = 0x01; //single attribute
p_rc_rsp->get_elem_attrs.p_attrs = vendor_attr_resp;
evt = 1; //true to send respond