mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-01 03:32:47 +00:00
avrcp: remove unused fields
This commit is contained in:
parent
393f572405
commit
f3bb6622e4
@ -571,9 +571,6 @@ typedef struct {
|
||||
uint16_t attribute_value_len;
|
||||
uint16_t attribute_value_offset;
|
||||
|
||||
uint8_t num_attributes;
|
||||
uint8_t num_parsed_attributes;
|
||||
|
||||
// controller only
|
||||
// limit number of pending commands to transaction id window size
|
||||
uint8_t controller_last_confirmed_transaction_id;
|
||||
|
@ -445,8 +445,6 @@ static void avrcp_controller_emit_operation_status(btstack_packet_handler_t call
|
||||
|
||||
static void avrcp_parser_reset(avrcp_connection_t * connection){
|
||||
connection->list_offset = 0;
|
||||
connection->num_attributes = 0;
|
||||
connection->num_parsed_attributes = 0;
|
||||
connection->parser_attribute_header_pos = 0;
|
||||
connection->num_received_fragments = 0;
|
||||
connection->parser_state = AVRCP_PARSER_GET_ATTRIBUTE_HEADER;
|
||||
@ -1115,7 +1113,8 @@ static void avrcp_handle_l2cap_data_packet_for_signaling_connection(avrcp_connec
|
||||
case AVRCP_SINGLE_PACKET:
|
||||
avrcp_parser_reset(connection);
|
||||
connection->list_size = param_length;
|
||||
connection->num_attributes = packet[pos++];
|
||||
// num_attributes
|
||||
pos++;
|
||||
|
||||
avrcp_controller_parse_and_emit_element_attrs(packet+pos, size-pos, connection, ctype);
|
||||
if (vendor_dependent_packet_type == AVRCP_START_PACKET){
|
||||
@ -1549,7 +1548,7 @@ uint8_t avrcp_controller_get_element_attributes(uint16_t avrcp_cid, uint8_t num_
|
||||
// every attribute is 4 bytes long
|
||||
big_endian_store_32(connection->data, pos, attributes[i]);
|
||||
pos += 4;
|
||||
connection->data[num_attributes_index]++;
|
||||
connection->data[num_attributes_index]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1625,7 +1624,7 @@ uint8_t avrcp_controller_query_shuffle_and_repeat_modes(uint16_t avrcp_cid){
|
||||
connection->data_len = 5;
|
||||
connection->data[0] = 4; // NumPlayerApplicationSettingAttributeID
|
||||
// PlayerApplicationSettingAttributeID1 AVRCP Spec, Appendix F, 133
|
||||
connection->data[1] = 0x01; // equalizer (1-OFF, 2-ON)
|
||||
connection->data[1] = 0x01; // equalizer (1-OFF, 2-ON)
|
||||
connection->data[2] = 0x02; // repeat (1-off, 2-single track, 3-all tracks, 4-group repeat)
|
||||
connection->data[3] = 0x03; // shuffle (1-off, 2-all tracks, 3-group shuffle)
|
||||
connection->data[4] = 0x04; // scan (1-off, 2-all tracks, 3-group scan)
|
||||
|
@ -359,7 +359,7 @@ static void avrcp_send_response_with_avctp_fragmentation(avrcp_connection_t * co
|
||||
return;
|
||||
|
||||
case AVRCP_PDU_ID_GET_ELEMENT_ATTRIBUTES:
|
||||
packet[pos++] = connection->num_attributes;
|
||||
packet[pos++] = count_set_bits_uint32(connection->target_now_playing_info_attr_bitmap);
|
||||
max_payload_size--;
|
||||
|
||||
bytes_stored = avrcp_store_avctp_now_playing_info_fragment(connection, max_payload_size, packet + pos);
|
||||
@ -1124,7 +1124,6 @@ static void avrcp_handle_l2cap_data_packet_for_signaling_connection(avrcp_connec
|
||||
int i;
|
||||
connection->next_attr_id = AVRCP_MEDIA_ATTR_TITLE;
|
||||
connection->target_now_playing_info_attr_bitmap = 0;
|
||||
connection->num_attributes = 0;
|
||||
if ((pos + attribute_count * 4) > size) return;
|
||||
for (i=0; i < attribute_count; i++){
|
||||
uint32_t attr_id = big_endian_read_32(packet, pos);
|
||||
@ -1133,7 +1132,6 @@ static void avrcp_handle_l2cap_data_packet_for_signaling_connection(avrcp_connec
|
||||
}
|
||||
}
|
||||
log_info("target_now_playing_info_attr_bitmap 0x%02x", connection->target_now_playing_info_attr_bitmap);
|
||||
connection->num_attributes = count_set_bits_uint32(connection->target_now_playing_info_attr_bitmap);
|
||||
connection->target_now_playing_info_response = true;
|
||||
avrcp_request_can_send_now(connection, connection->l2cap_signaling_cid);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user