Lines Matching refs:stream_endpoint

63 static uint8_t (*avdtp_sink_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint
64 …avdtp_source_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
88 avdtp_packet_handler_for_stream_endpoint(const avdtp_stream_endpoint_t *stream_endpoint) { in avdtp_packet_handler_for_stream_endpoint() argument
89 … return (stream_endpoint->sep.type == AVDTP_SOURCE) ? avdtp_source_callback : avdtp_sink_callback; in avdtp_packet_handler_for_stream_endpoint()
142 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_stream_endpoint_for_seid() local
143 if (stream_endpoint->sep.seid == seid){ in avdtp_get_stream_endpoint_for_seid()
144 return stream_endpoint; in avdtp_get_stream_endpoint_for_seid()
154 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_source_stream_endpoint_for_media_codec_and_type() local
155 if (stream_endpoint->sep.type != sep_type) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
156 if (stream_endpoint->sep.media_type != AVDTP_AUDIO) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
157 if (stream_endpoint->sep.capabilities.media_codec.media_codec_type != codec_type) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
158 if (stream_endpoint->sep.in_use) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
159 return stream_endpoint; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
173 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_source_stream_endpoint_for_media_codec_other() local
174 if (stream_endpoint->sep.type != AVDTP_SOURCE) continue; in avdtp_get_source_stream_endpoint_for_media_codec_other()
175 if (stream_endpoint->sep.media_type != AVDTP_AUDIO) continue; in avdtp_get_source_stream_endpoint_for_media_codec_other()
176 if (stream_endpoint->sep.in_use) continue; in avdtp_get_source_stream_endpoint_for_media_codec_other()
177 …if (stream_endpoint->sep.capabilities.media_codec.media_codec_type != AVDTP_CODEC_NON_A2DP) contin… in avdtp_get_source_stream_endpoint_for_media_codec_other()
178 if (stream_endpoint->sep.capabilities.media_codec.media_codec_information_len < 6) continue; in avdtp_get_source_stream_endpoint_for_media_codec_other()
179 …if (little_endian_read_32(stream_endpoint->sep.capabilities.media_codec.media_codec_information, 0… in avdtp_get_source_stream_endpoint_for_media_codec_other()
180 …if (little_endian_read_16(stream_endpoint->sep.capabilities.media_codec.media_codec_information, 4… in avdtp_get_source_stream_endpoint_for_media_codec_other()
181 return stream_endpoint; in avdtp_get_source_stream_endpoint_for_media_codec_other()
202 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_stream_endpoint_for_l2cap_cid() local
203 if (stream_endpoint->l2cap_media_cid == l2cap_cid){ in avdtp_get_stream_endpoint_for_l2cap_cid()
204 return stream_endpoint; in avdtp_get_stream_endpoint_for_l2cap_cid()
206 if (stream_endpoint->l2cap_reporting_cid == l2cap_cid){ in avdtp_get_stream_endpoint_for_l2cap_cid()
207 return stream_endpoint; in avdtp_get_stream_endpoint_for_l2cap_cid()
209 if (stream_endpoint->l2cap_recovery_cid == l2cap_cid){ in avdtp_get_stream_endpoint_for_l2cap_cid()
210 return stream_endpoint; in avdtp_get_stream_endpoint_for_l2cap_cid()
220 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_stream_endpoint_for_signaling_cid() local
221 if (stream_endpoint->connection){ in avdtp_get_stream_endpoint_for_signaling_cid()
222 if (stream_endpoint->connection->l2cap_signaling_cid == l2cap_cid){ in avdtp_get_stream_endpoint_for_signaling_cid()
223 return stream_endpoint; in avdtp_get_stream_endpoint_for_signaling_cid()
399 void avdtp_register_media_transport_category(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_register_media_transport_category() argument
400 if (!stream_endpoint){ in avdtp_register_media_transport_category()
404 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_MEDIA_TRAN… in avdtp_register_media_transport_category()
405 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_media_transport_category()
408 void avdtp_register_reporting_category(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_register_reporting_category() argument
409 if (!stream_endpoint){ in avdtp_register_reporting_category()
413 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_REPORTING,… in avdtp_register_reporting_category()
414 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_reporting_category()
417 void avdtp_register_delay_reporting_category(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_register_delay_reporting_category() argument
418 if (!stream_endpoint){ in avdtp_register_delay_reporting_category()
422 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_DELAY_REPO… in avdtp_register_delay_reporting_category()
423 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_delay_reporting_category()
426 void avdtp_register_recovery_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t maximum_re… in avdtp_register_recovery_category() argument
427 if (!stream_endpoint){ in avdtp_register_recovery_category()
431 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_RECOVERY, … in avdtp_register_recovery_category()
432 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_recovery_category()
433 stream_endpoint->sep.capabilities.recovery.recovery_type = 0x01; // 0x01 = RFC2733 in avdtp_register_recovery_category()
434stream_endpoint->sep.capabilities.recovery.maximum_recovery_window_size = maximum_recovery_window_… in avdtp_register_recovery_category()
435stream_endpoint->sep.capabilities.recovery.maximum_number_media_packets = maximum_number_media_pac… in avdtp_register_recovery_category()
438 void avdtp_register_content_protection_category(avdtp_stream_endpoint_t * stream_endpoint, uint16_t… in avdtp_register_content_protection_category() argument
439 if (!stream_endpoint){ in avdtp_register_content_protection_category()
443 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_CONTENT_PR… in avdtp_register_content_protection_category()
444 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_content_protection_category()
445 stream_endpoint->sep.capabilities.content_protection.cp_type = cp_type; in avdtp_register_content_protection_category()
446 (void)memcpy(stream_endpoint->sep.capabilities.content_protection.cp_type_value, in avdtp_register_content_protection_category()
449stream_endpoint->sep.capabilities.content_protection.cp_type_value_len = btstack_min(cp_type_value… in avdtp_register_content_protection_category()
452 void avdtp_register_header_compression_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t … in avdtp_register_header_compression_category() argument
453 if (!stream_endpoint){ in avdtp_register_header_compression_category()
457 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_HEADER_COM… in avdtp_register_header_compression_category()
458 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_header_compression_category()
459 stream_endpoint->sep.capabilities.header_compression.back_ch = back_ch; in avdtp_register_header_compression_category()
460 stream_endpoint->sep.capabilities.header_compression.media = media; in avdtp_register_header_compression_category()
461 stream_endpoint->sep.capabilities.header_compression.recovery = recovery; in avdtp_register_header_compression_category()
464 void avdtp_register_media_codec_category(avdtp_stream_endpoint_t * stream_endpoint, avdtp_media_typ… in avdtp_register_media_codec_category() argument
465 if (!stream_endpoint){ in avdtp_register_media_codec_category()
469 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_MEDIA_CODE… in avdtp_register_media_codec_category()
470 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_media_codec_category()
471 stream_endpoint->sep.capabilities.media_codec.media_type = media_type; in avdtp_register_media_codec_category()
472 stream_endpoint->sep.capabilities.media_codec.media_codec_type = media_codec_type; in avdtp_register_media_codec_category()
474stream_endpoint->sep.capabilities.media_codec.media_codec_information = (uint8_t*) media_codec_inf… in avdtp_register_media_codec_category()
475stream_endpoint->sep.capabilities.media_codec.media_codec_information_len = media_codec_info_len; in avdtp_register_media_codec_category()
478 void avdtp_register_multiplexing_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t fragme… in avdtp_register_multiplexing_category() argument
479 if (!stream_endpoint){ in avdtp_register_multiplexing_category()
483 …uint16_t bitmap = store_bit16(stream_endpoint->sep.registered_service_categories, AVDTP_MULTIPLEXI… in avdtp_register_multiplexing_category()
484 stream_endpoint->sep.registered_service_categories = bitmap; in avdtp_register_multiplexing_category()
485 stream_endpoint->sep.capabilities.multiplexing_mode.fragmentation = fragmentation; in avdtp_register_multiplexing_category()
492 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_… in avdtp_sink_register_media_config_validator() argument
496 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_… in avdtp_source_register_media_config_validator() argument
500 uint8_t avdtp_validate_media_configuration(const avdtp_stream_endpoint_t *stream_endpoint, uint16_t… in avdtp_validate_media_configuration() argument
502 …uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_t * event, uint16… in avdtp_validate_media_configuration()
503 if (stream_endpoint->sep.type == AVDTP_SOURCE){ in avdtp_validate_media_configuration()
513 …uint16_t size = avdtp_setup_media_codec_config_event(event, sizeof(event), stream_endpoint, avdtp_… in avdtp_validate_media_configuration()
514 return (*callback)(stream_endpoint, event, size); in avdtp_validate_media_configuration()
543 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_l2cap_cid(l2cap_cid); in avdtp_handle_can_send_now() local
544 if (stream_endpoint != NULL) { in avdtp_handle_can_send_now()
545 …call avdtp_initiator_stream_config_subsm_handle_can_send_now_stream_endpoint %p", stream_endpoint); in avdtp_handle_can_send_now()
546 if (stream_endpoint->request_can_send_now) { in avdtp_handle_can_send_now()
547 stream_endpoint->request_can_send_now = false; in avdtp_handle_can_send_now()
548 avdtp_initiator_stream_config_subsm_handle_can_send_now_stream_endpoint(stream_endpoint); in avdtp_handle_can_send_now()
550 if (stream_endpoint->request_can_send_now){ in avdtp_handle_can_send_now()
559 avdtp_stream_endpoint_t * stream_endpoint = btstack_memory_avdtp_stream_endpoint_get(); in avdtp_create_stream_endpoint() local
560 if (!stream_endpoint){ in avdtp_create_stream_endpoint()
564 stream_endpoint->sep.seid = avdtp_get_next_local_seid(); in avdtp_create_stream_endpoint()
565 stream_endpoint->sep.media_type = media_type; in avdtp_create_stream_endpoint()
566 stream_endpoint->sep.type = sep_type; in avdtp_create_stream_endpoint()
567 … btstack_linked_list_add(avdtp_get_stream_endpoints(), (btstack_linked_item_t *) stream_endpoint); in avdtp_create_stream_endpoint()
568 return stream_endpoint; in avdtp_create_stream_endpoint()
571 void avdtp_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_finalize_stream_endpoint() argument
572 …tstack_linked_list_remove(avdtp_get_stream_endpoints(), (btstack_linked_item_t* ) stream_endpoint); in avdtp_finalize_stream_endpoint()
573 btstack_memory_avdtp_stream_endpoint_free(stream_endpoint); in avdtp_finalize_stream_endpoint()
830 static void avdtp_handle_close_media_channel(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_handle_close_media_channel() argument
831 avdtp_connection_t * connection = stream_endpoint->connection; in avdtp_handle_close_media_channel()
833 …vdtp_streaming_emit_connection_released(stream_endpoint, connection->avdtp_cid, avdtp_local_seid(s… in avdtp_handle_close_media_channel()
834 avdtp_reset_stream_endpoint(stream_endpoint); in avdtp_handle_close_media_channel()
838 static void avdtp_handle_close_recovery_channel(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_handle_close_recovery_channel() argument
839 log_info("L2CAP_EVENT_CHANNEL_CLOSED recovery cid 0x%0x", stream_endpoint->l2cap_recovery_cid); in avdtp_handle_close_recovery_channel()
840 stream_endpoint->l2cap_recovery_cid = 0; in avdtp_handle_close_recovery_channel()
843 static void avdtp_handle_close_reporting_channel(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_handle_close_reporting_channel() argument
844 … log_info("L2CAP_EVENT_CHANNEL_CLOSED reporting cid 0x%0x", stream_endpoint->l2cap_reporting_cid); in avdtp_handle_close_reporting_channel()
845 stream_endpoint->l2cap_reporting_cid = 0; in avdtp_handle_close_reporting_channel()
861 avdtp_stream_endpoint_t * stream_endpoint = NULL; in avdtp_packet_handler() local
872 stream_endpoint = avdtp_get_stream_endpoint_for_l2cap_cid(channel); in avdtp_packet_handler()
873 if (!stream_endpoint){ in avdtp_packet_handler()
879 if (stream_endpoint->connection){ in avdtp_packet_handler()
880 if (channel == stream_endpoint->connection->l2cap_signaling_cid){ in avdtp_packet_handler()
881 … handle_l2cap_data_packet_for_signaling_connection(stream_endpoint->connection, packet, size); in avdtp_packet_handler()
886 if (channel == stream_endpoint->l2cap_media_cid){ in avdtp_packet_handler()
888 (*avdtp_sink_handle_media_data)(avdtp_local_seid(stream_endpoint), packet, size); in avdtp_packet_handler()
892 if (channel == stream_endpoint->l2cap_reporting_cid){ in avdtp_packet_handler()
894 } else if (channel == stream_endpoint->l2cap_recovery_cid){ in avdtp_packet_handler()
941stream_endpoint = avdtp_get_stream_endpoint_for_seid(connection->acceptor_local_seid); in avdtp_packet_handler()
942 … if ((stream_endpoint == NULL) || (stream_endpoint->l2cap_media_cid != 0) ) { in avdtp_packet_handler()
1006stream_endpoint = avdtp_get_stream_endpoint_for_signaling_cid(connection->l2cap_signaling_cid); in avdtp_packet_handler()
1007 if (!stream_endpoint){ in avdtp_packet_handler()
1012 …, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdt… in avdtp_packet_handler()
1013 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_IDLE; in avdtp_packet_handler()
1014 … avdtp_streaming_emit_connection_established(stream_endpoint, status); in avdtp_packet_handler()
1017 switch (stream_endpoint->state){ in avdtp_packet_handler()
1019 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED; in avdtp_packet_handler()
1020stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet); in avdtp_packet_handler()
1021stream_endpoint->media_con_handle = l2cap_event_channel_opened_get_handle(packet); in avdtp_packet_handler()
1023 …, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_seid(stream_endpoint), avdt… in avdtp_packet_handler()
1024 … avdtp_streaming_emit_connection_established(stream_endpoint, ERROR_CODE_SUCCESS); in avdtp_packet_handler()
1027 …, stream_endpoint->state, connection->avdtp_cid, stream_endpoint->l2cap_media_cid, avdtp_local_sei… in avdtp_packet_handler()
1028 … avdtp_streaming_emit_connection_established(stream_endpoint, ERROR_CODE_COMMAND_DISALLOWED); in avdtp_packet_handler()
1041 stream_endpoint = avdtp_get_stream_endpoint_for_l2cap_cid(local_cid); in avdtp_packet_handler()
1044 …NEL_CLOSED, cid 0x%2x, connection %p, stream_endpoint %p", local_cid, connection, stream_endpoint); in avdtp_packet_handler()
1046 if (stream_endpoint){ in avdtp_packet_handler()
1047 if (stream_endpoint->l2cap_media_cid == local_cid){ in avdtp_packet_handler()
1048 avdtp_handle_close_media_channel(stream_endpoint); in avdtp_packet_handler()
1051 if (stream_endpoint->l2cap_recovery_cid == local_cid){ in avdtp_packet_handler()
1052 avdtp_handle_close_recovery_channel(stream_endpoint); in avdtp_packet_handler()
1055 if (stream_endpoint->l2cap_reporting_cid == local_cid){ in avdtp_packet_handler()
1056 avdtp_handle_close_reporting_channel(stream_endpoint); in avdtp_packet_handler()
1066stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterator_next(&it); in avdtp_packet_handler()
1067 if (stream_endpoint->connection == connection){ in avdtp_packet_handler()
1068 avdtp_handle_close_recovery_channel(stream_endpoint); in avdtp_packet_handler()
1069 avdtp_handle_close_reporting_channel(stream_endpoint); in avdtp_packet_handler()
1070 avdtp_handle_close_media_channel(stream_endpoint); in avdtp_packet_handler()
1071 avdtp_reset_stream_endpoint(stream_endpoint); in avdtp_packet_handler()
1100 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_disconenct_streamendpoints() local
1101 if (stream_endpoint->connection != connection) continue; in avdtp_disconenct_streamendpoints()
1103 switch (stream_endpoint->state){ in avdtp_disconenct_streamendpoints()
1106 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_W4_L2CAP_FOR_MEDIA_DISCONNECTED; in avdtp_disconenct_streamendpoints()
1107 l2cap_disconnect(stream_endpoint->l2cap_media_cid); in avdtp_disconenct_streamendpoints()
1151 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_handle_explicit_start_stream_confirmation() local
1152 if (!stream_endpoint) { in avdtp_handle_explicit_start_stream_confirmation()
1157 if (stream_endpoint->acceptor_config_state != AVDTP_ACCEPTOR_W4_USER_CONFIRM_START_STREAM){ in avdtp_handle_explicit_start_stream_confirmation()
1162 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_START_STREAM; in avdtp_handle_explicit_start_stream_confirmation()
1164 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_START_STREAM; in avdtp_handle_explicit_start_stream_confirmation()
1190 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_open_stream() local
1191 if (!stream_endpoint) { in avdtp_open_stream()
1196 if (stream_endpoint->remote_sep.seid != remote_seid){ in avdtp_open_stream()
1201 …if (stream_endpoint->state < AVDTP_STREAM_ENDPOINT_CONFIGURED) return ERROR_CODE_COMMAND_DISALLOWE… in avdtp_open_stream()
1206 stream_endpoint->initiator_config_state = AVDTP_INITIATOR_W2_OPEN_STREAM; in avdtp_open_stream()
1207 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_W2_REQUEST_OPEN_STREAM; in avdtp_open_stream()
1218 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_start_stream() local
1219 if (!stream_endpoint) { in avdtp_start_stream()
1224 if (stream_endpoint->l2cap_media_cid == 0){ in avdtp_start_stream()
1229 if (!is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_start_stream()
1234 if (!is_avdtp_remote_seid_registered(stream_endpoint) || stream_endpoint->start_stream == 1){ in avdtp_start_stream()
1238 if (stream_endpoint->start_stream == 1) { in avdtp_start_stream()
1242 stream_endpoint->start_stream = 1; in avdtp_start_stream()
1244 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; in avdtp_start_stream()
1255 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_stop_stream() local
1256 if (!stream_endpoint) { in avdtp_stop_stream()
1261 if (stream_endpoint->l2cap_media_cid == 0){ in avdtp_stop_stream()
1266 if (!is_avdtp_remote_seid_registered(stream_endpoint) || stream_endpoint->close_stream){ in avdtp_stop_stream()
1270 if (stream_endpoint->close_stream == 1) { in avdtp_stop_stream()
1274 stream_endpoint->close_stream = 1; in avdtp_stop_stream()
1276 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; in avdtp_stop_stream()
1287 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_abort_stream() local
1288 if (!stream_endpoint) { in avdtp_abort_stream()
1293 if (stream_endpoint->l2cap_media_cid == 0){ in avdtp_abort_stream()
1298 if (!is_avdtp_remote_seid_registered(stream_endpoint) || stream_endpoint->abort_stream){ in avdtp_abort_stream()
1302 if (stream_endpoint->abort_stream == 1) { in avdtp_abort_stream()
1306 stream_endpoint->abort_stream = 1; in avdtp_abort_stream()
1308 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; in avdtp_abort_stream()
1318 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_suspend_stream() local
1319 if (!stream_endpoint) { in avdtp_suspend_stream()
1324 if (stream_endpoint->l2cap_media_cid == 0){ in avdtp_suspend_stream()
1329 if (!is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_suspend_stream()
1333 if (stream_endpoint->state != AVDTP_STREAM_ENDPOINT_STREAMING){ in avdtp_suspend_stream()
1337 if (stream_endpoint->suspend_stream == 1) { in avdtp_suspend_stream()
1341 stream_endpoint->suspend_stream = 1; in avdtp_suspend_stream()
1343 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; in avdtp_suspend_stream()
1451 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_set_configuration() local
1452 if (!stream_endpoint) { in avdtp_set_configuration()
1456 if (stream_endpoint->state >= AVDTP_STREAM_ENDPOINT_CONFIGURED){ in avdtp_set_configuration()
1457 log_error("Stream endpoint seid %d in wrong state %d", local_seid, stream_endpoint->state); in avdtp_set_configuration()
1461 connection->active_stream_endpoint = (void*) stream_endpoint; in avdtp_set_configuration()
1467 stream_endpoint->remote_configuration_bitmap = configured_services_bitmap; in avdtp_set_configuration()
1468 stream_endpoint->remote_configuration = configuration; in avdtp_set_configuration()
1469 stream_endpoint->initiator_config_state = AVDTP_INITIATOR_W2_SET_CONFIGURATION; in avdtp_set_configuration()
1471 …log_debug("SE %p, initiator_config_state: 0x%02x", stream_endpoint, stream_endpoint->initiator_con… in avdtp_set_configuration()
1487 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in avdtp_reconfigure() local
1488 if (!stream_endpoint) { in avdtp_reconfigure()
1493 if (!is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_reconfigure()
1501 stream_endpoint->remote_configuration_bitmap = configured_services_bitmap; in avdtp_reconfigure()
1502 stream_endpoint->remote_configuration = configuration; in avdtp_reconfigure()
1503 stream_endpoint->initiator_config_state = AVDTP_INITIATOR_W2_RECONFIGURE_STREAM_WITH_SEID; in avdtp_reconfigure()
1507 void avdtp_set_preferred_sampling_frequency(avdtp_stream_endpoint_t * stream_endpoint, uint32_t … in avdtp_set_preferred_sampling_frequency() argument
1508 stream_endpoint->preferred_sampling_frequency = sampling_frequency; in avdtp_set_preferred_sampling_frequency()
1511 void avdtp_set_preferred_channel_mode(avdtp_stream_endpoint_t * stream_endpoint, uint8_t channel… in avdtp_set_preferred_channel_mode() argument
1512 stream_endpoint->preferred_channel_mode = channel_mode; in avdtp_set_preferred_channel_mode()
1516 avdtp_channel_mode_t avdtp_choose_sbc_channel_mode(avdtp_stream_endpoint_t * stream_endpoint, uint8… in avdtp_choose_sbc_channel_mode() argument
1517 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_channel_mode()
1521 if (stream_endpoint->preferred_channel_mode == AVDTP_SBC_JOINT_STEREO){ in avdtp_choose_sbc_channel_mode()
1524 if (stream_endpoint->preferred_channel_mode == AVDTP_SBC_STEREO){ in avdtp_choose_sbc_channel_mode()
1527 if (stream_endpoint->preferred_channel_mode == AVDTP_SBC_DUAL_CHANNEL){ in avdtp_choose_sbc_channel_mode()
1530 if (stream_endpoint->preferred_channel_mode == AVDTP_SBC_MONO){ in avdtp_choose_sbc_channel_mode()
1547 …ethod_t avdtp_choose_sbc_allocation_method(avdtp_stream_endpoint_t * stream_endpoint, uint8_t remo… in avdtp_choose_sbc_allocation_method() argument
1548 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_allocation_method()
1560 uint8_t avdtp_stream_endpoint_seid(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_stream_endpoint_seid() argument
1561 if (!stream_endpoint) return 0; in avdtp_stream_endpoint_seid()
1562 return stream_endpoint->sep.seid; in avdtp_stream_endpoint_seid()
1565 avdtp_sbc_subbands_t avdtp_choose_sbc_subbands(avdtp_stream_endpoint_t * stream_endpoint, uint8_t r… in avdtp_choose_sbc_subbands() argument
1566 if (!stream_endpoint) return 0; in avdtp_choose_sbc_subbands()
1567 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_subbands()
1579 avdtp_sbc_block_length_t avdtp_choose_sbc_block_length(avdtp_stream_endpoint_t * stream_endpoint, u… in avdtp_choose_sbc_block_length() argument
1580 if (!stream_endpoint) return 0; in avdtp_choose_sbc_block_length()
1581 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_block_length()
1613 uint16_t avdtp_choose_sbc_sampling_frequency(avdtp_stream_endpoint_t * stream_endpoint, uint8_t rem… in avdtp_choose_sbc_sampling_frequency() argument
1614 if (!stream_endpoint) return 0; in avdtp_choose_sbc_sampling_frequency()
1615 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_sampling_frequency()
1619 …if ((stream_endpoint->preferred_sampling_frequency == 48000) && (supported_sampling_frequency_bitm… in avdtp_choose_sbc_sampling_frequency()
1620 return stream_endpoint->preferred_sampling_frequency; in avdtp_choose_sbc_sampling_frequency()
1622 …if ((stream_endpoint->preferred_sampling_frequency == 44100) && (supported_sampling_frequency_bitm… in avdtp_choose_sbc_sampling_frequency()
1623 return stream_endpoint->preferred_sampling_frequency; in avdtp_choose_sbc_sampling_frequency()
1625 …if ((stream_endpoint->preferred_sampling_frequency == 32000) && (supported_sampling_frequency_bitm… in avdtp_choose_sbc_sampling_frequency()
1626 return stream_endpoint->preferred_sampling_frequency; in avdtp_choose_sbc_sampling_frequency()
1628 …if ((stream_endpoint->preferred_sampling_frequency == 16000) && (supported_sampling_frequency_bitm… in avdtp_choose_sbc_sampling_frequency()
1629 return stream_endpoint->preferred_sampling_frequency; in avdtp_choose_sbc_sampling_frequency()
1641 uint8_t avdtp_choose_sbc_max_bitpool_value(avdtp_stream_endpoint_t * stream_endpoint, uint8_t remot… in avdtp_choose_sbc_max_bitpool_value() argument
1642 if (!stream_endpoint) return 0; in avdtp_choose_sbc_max_bitpool_value()
1643 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_max_bitpool_value()
1647 uint8_t avdtp_choose_sbc_min_bitpool_value(avdtp_stream_endpoint_t * stream_endpoint, uint8_t remot… in avdtp_choose_sbc_min_bitpool_value() argument
1648 if (!stream_endpoint) return 0; in avdtp_choose_sbc_min_bitpool_value()
1649 uint8_t * media_codec = stream_endpoint->sep.capabilities.media_codec.media_codec_information; in avdtp_choose_sbc_min_bitpool_value()
1653 uint8_t is_avdtp_remote_seid_registered(avdtp_stream_endpoint_t * stream_endpoint){ in is_avdtp_remote_seid_registered() argument
1654 if (!stream_endpoint) return 0; in is_avdtp_remote_seid_registered()
1655 if (stream_endpoint->remote_sep.seid == 0) return 0; in is_avdtp_remote_seid_registered()
1656 if (stream_endpoint->remote_sep.seid > 0x3E) return 0; in is_avdtp_remote_seid_registered()