Lines Matching refs:stream_endpoint

101 …ection_t *connection, int offset, uint16_t packet_size, avdtp_stream_endpoint_t *stream_endpoint) {  in avdtp_acceptor_handle_configuration_command()  argument
103 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_CONFIGURATION_SUBSTATEMACHINE; in avdtp_acceptor_handle_configuration_command()
104 stream_endpoint->connection = connection; in avdtp_acceptor_handle_configuration_command()
114 if (stream_endpoint->sep.in_use != 0){ in avdtp_acceptor_handle_configuration_command()
124 …uint8_t error_code = avdtp_validate_media_configuration(stream_endpoint, connection->avdtp_cid, 0,… in avdtp_acceptor_handle_configuration_command()
135 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_handle_configuration_command()
139 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_SET_CONFIGURATION; in avdtp_acceptor_handle_configuration_command()
144 if (is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_acceptor_handle_configuration_command()
145 if (stream_endpoint->remote_sep.in_use){ in avdtp_acceptor_handle_configuration_command()
158stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_handle_configuration_command()
161 stream_endpoint->remote_sep = sep; in avdtp_acceptor_handle_configuration_command()
162 log_info("update remote seid %d", stream_endpoint->remote_sep.seid); in avdtp_acceptor_handle_configuration_command()
166 stream_endpoint->remote_sep = sep; in avdtp_acceptor_handle_configuration_command()
167 log_info("add remote seid %d", stream_endpoint->remote_sep.seid); in avdtp_acceptor_handle_configuration_command()
171 stream_endpoint->sep.in_use = 1; in avdtp_acceptor_handle_configuration_command()
175 …if (stream_endpoint->media_codec_configuration_len == sep.configuration.media_codec.media_codec_i… in avdtp_acceptor_handle_configuration_command()
176 …(void) memcpy(stream_endpoint->media_codec_configuration_info, sep.configuration.media_codec.media… in avdtp_acceptor_handle_configuration_command()
178stream_endpoint->remote_sep.configuration.media_codec.media_codec_information = stream_endpoint->m… in avdtp_acceptor_handle_configuration_command()
180 …avdtp_signaling_emit_configuration(stream_endpoint, connection->avdtp_cid, 0, &sep.configuration, … in avdtp_acceptor_handle_configuration_command()
184 avdtp_signaling_emit_accept(connection->avdtp_cid, avdtp_local_seid(stream_endpoint), in avdtp_acceptor_handle_configuration_command()
189 avdtp_stream_endpoint_t * stream_endpoint = NULL; in avdtp_acceptor_stream_config_subsm() local
221 stream_endpoint = avdtp_get_stream_endpoint_for_seid(connection->acceptor_local_seid); in avdtp_acceptor_stream_config_subsm()
222 if (!stream_endpoint){ in avdtp_acceptor_stream_config_subsm()
261 stream_endpoint = avdtp_get_stream_endpoint_for_seid(connection->acceptor_local_seid); in avdtp_acceptor_stream_config_subsm()
262 if (!stream_endpoint){ in avdtp_acceptor_stream_config_subsm()
282 btstack_assert(stream_endpoint != NULL); in avdtp_acceptor_stream_config_subsm()
291 switch (stream_endpoint->acceptor_config_state){ in avdtp_acceptor_stream_config_subsm()
296 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_DELAY_REPORT; in avdtp_acceptor_stream_config_subsm()
303stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_GET_ALL_CAPABILITIES; in avdtp_acceptor_stream_config_subsm()
307stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_GET_CAPABILITIES; in avdtp_acceptor_stream_config_subsm()
314 stream_endpoint); in avdtp_acceptor_stream_config_subsm()
323stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
331stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
339 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_RECONFIGURE; in avdtp_acceptor_stream_config_subsm()
343 …RE, local seid %d, remote seid %d", connection->acceptor_local_seid, stream_endpoint->remote_sep.s… in avdtp_acceptor_stream_config_subsm()
348stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
353 if (!is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_acceptor_stream_config_subsm()
355stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
360stream_endpoint->remote_sep.configured_service_categories = sep.configured_service_categories; in avdtp_acceptor_stream_config_subsm()
361 stream_endpoint->remote_sep.configuration = sep.configuration; in avdtp_acceptor_stream_config_subsm()
363 log_info("update active remote seid %d", stream_endpoint->remote_sep.seid); in avdtp_acceptor_stream_config_subsm()
367 …if (stream_endpoint->media_codec_configuration_len == sep.configuration.media_codec.media_codec_in… in avdtp_acceptor_stream_config_subsm()
368 …(void) memcpy(stream_endpoint->media_codec_configuration_info, sep.configuration.media_codec.media… in avdtp_acceptor_stream_config_subsm()
369stream_endpoint->sep.configuration.media_codec = stream_endpoint->remote_configuration.media_codec; in avdtp_acceptor_stream_config_subsm()
370 …avdtp_signaling_emit_configuration(stream_endpoint, connection->avdtp_cid, 1, &sep.configuration, … in avdtp_acceptor_stream_config_subsm()
378stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_GET_CONFIGURATION; in avdtp_acceptor_stream_config_subsm()
381 if (stream_endpoint->state != AVDTP_STREAM_ENDPOINT_CONFIGURED){ in avdtp_acceptor_stream_config_subsm()
383stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
389 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_OPEN_STREAM; in avdtp_acceptor_stream_config_subsm()
390 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_W4_L2CAP_FOR_MEDIA_CONNECTED; in avdtp_acceptor_stream_config_subsm()
391 connection->acceptor_local_seid = stream_endpoint->sep.seid; in avdtp_acceptor_stream_config_subsm()
394 if (stream_endpoint->state != AVDTP_STREAM_ENDPOINT_OPENED){ in avdtp_acceptor_stream_config_subsm()
395 … log_info("REJECT AVDTP_SI_START, BAD_STATE, state %d", stream_endpoint->state); in avdtp_acceptor_stream_config_subsm()
396stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
403stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W4_USER_CONFIRM_START_STREAM; in avdtp_acceptor_stream_config_subsm()
406 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_START_STREAM; in avdtp_acceptor_stream_config_subsm()
410 switch (stream_endpoint->state){ in avdtp_acceptor_stream_config_subsm()
414 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_CLOSING; in avdtp_acceptor_stream_config_subsm()
415stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_CLOSE_STREAM; in avdtp_acceptor_stream_config_subsm()
418 log_info("AVDTP_SI_CLOSE, bad state %d ", stream_endpoint->state); in avdtp_acceptor_stream_config_subsm()
419stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
426 switch (stream_endpoint->state){ in avdtp_acceptor_stream_config_subsm()
432 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_ABORTING; in avdtp_acceptor_stream_config_subsm()
433stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_ABORT_STREAM; in avdtp_acceptor_stream_config_subsm()
436 log_info("AVDTP_SI_ABORT, bad state %d ", stream_endpoint->state); in avdtp_acceptor_stream_config_subsm()
437stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
444 switch (stream_endpoint->state){ in avdtp_acceptor_stream_config_subsm()
446 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED; in avdtp_acceptor_stream_config_subsm()
450stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_SUSPEND_STREAM; in avdtp_acceptor_stream_config_subsm()
454 log_info("AVDTP_SI_SUSPEND, bad state %d", stream_endpoint->state); in avdtp_acceptor_stream_config_subsm()
455stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_stream_config_subsm()
463 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_UNKNOWN_CMD; in avdtp_acceptor_stream_config_subsm()
487 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_acceptor_send_seps_response() local
488 command[pos++] = (stream_endpoint->sep.seid << 2) | (stream_endpoint->sep.in_use<<1); in avdtp_acceptor_send_seps_response()
489 command[pos++] = (stream_endpoint->sep.media_type << 4) | (stream_endpoint->sep.type << 3); in avdtp_acceptor_send_seps_response()
557 …avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(connection->accepto… in avdtp_acceptor_stream_config_subsm_run() local
558 if (!stream_endpoint) return; in avdtp_acceptor_stream_config_subsm_run()
563 …uint16_t cid = stream_endpoint->connection ? stream_endpoint->connection->l2cap_signaling_cid : co… in avdtp_acceptor_stream_config_subsm_run()
564 …uint8_t trid = stream_endpoint->connection ? stream_endpoint->connection->acceptor_transaction_lab… in avdtp_acceptor_stream_config_subsm_run()
566 …avdtp_acceptor_stream_endpoint_state_t acceptor_config_state = stream_endpoint->acceptor_config_st… in avdtp_acceptor_stream_config_subsm_run()
567 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_STREAM_CONFIG_IDLE; in avdtp_acceptor_stream_config_subsm_run()
579 …nnection->acceptor_signaling_packet, trid, stream_endpoint->sep.registered_service_categories, str… in avdtp_acceptor_stream_config_subsm_run()
584 stream_endpoint->acceptor_config_state = acceptor_config_state; in avdtp_acceptor_stream_config_subsm_run()
598 …nnection->acceptor_signaling_packet, trid, stream_endpoint->sep.registered_service_categories, str… in avdtp_acceptor_stream_config_subsm_run()
603 stream_endpoint->acceptor_config_state = acceptor_config_state; in avdtp_acceptor_stream_config_subsm_run()
614 stream_endpoint->connection = connection; in avdtp_acceptor_stream_config_subsm_run()
615 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_CONFIGURED; in avdtp_acceptor_stream_config_subsm_run()
627 remote_sep = &stream_endpoint->remote_sep; in avdtp_acceptor_stream_config_subsm_run()
633 stream_endpoint->acceptor_config_state = acceptor_config_state; in avdtp_acceptor_stream_config_subsm_run()
650 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W4_USER_CONFIRM_START_STREAM; in avdtp_acceptor_stream_config_subsm_run()
651 …avdtp_signaling_emit_accept(connection->avdtp_cid, avdtp_local_seid(stream_endpoint), AVDTP_SI_ACC… in avdtp_acceptor_stream_config_subsm_run()
654 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED; in avdtp_acceptor_stream_config_subsm_run()
663 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_STREAMING; in avdtp_acceptor_stream_config_subsm_run()
680 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED; in avdtp_acceptor_stream_config_subsm_run()
710 avdtp_signaling_emit_accept(connection->avdtp_cid, avdtp_local_seid(stream_endpoint), in avdtp_acceptor_stream_config_subsm_run()
713 avdtp_signaling_emit_reject(connection->avdtp_cid, avdtp_local_seid(stream_endpoint), in avdtp_acceptor_stream_config_subsm_run()