a2dp.c (ab2445a0204a8deaee8d62e6d3fba1e51a226576) | a2dp.c (fb301407dee40ec059453b02138159c682e42c4f) |
---|---|
1/* 2 * Copyright (C) 2022 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 487 unchanged lines hidden (view full) --- 496 connection = avdtp_get_connection_for_avdtp_cid(cid); 497 btstack_assert(connection != NULL); 498 config_process = a2dp_config_process_for_role(role, connection); 499 500 status = avdtp_subevent_signaling_connection_established_get_status(packet); 501 if (status != ERROR_CODE_SUCCESS){ 502 // notify about connection error only if we're initiator 503 if (config_process->outgoing_active){ | 1/* 2 * Copyright (C) 2022 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 487 unchanged lines hidden (view full) --- 496 connection = avdtp_get_connection_for_avdtp_cid(cid); 497 btstack_assert(connection != NULL); 498 config_process = a2dp_config_process_for_role(role, connection); 499 500 status = avdtp_subevent_signaling_connection_established_get_status(packet); 501 if (status != ERROR_CODE_SUCCESS){ 502 // notify about connection error only if we're initiator 503 if (config_process->outgoing_active){ |
504 log_info("A2DP source signaling connection failed status 0x%02x", status); | 504 log_info("A2DP signaling connection failed status 0x%02x", status); |
505 config_process->outgoing_active = false; 506 a2dp_replace_subevent_id_and_emit_for_role(role, packet, size, A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED); | 505 config_process->outgoing_active = false; 506 a2dp_replace_subevent_id_and_emit_for_role(role, packet, size, A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED); |
507 // also emit streaming connection failed 508 a2dp_emit_streaming_connection_failed_for_role(role, connection, status); |
|
507 } 508 break; 509 } | 509 } 510 break; 511 } |
510 log_info("A2DP source signaling connection established avdtp_cid 0x%02x", cid); | 512 log_info("A2DP signaling connection established avdtp_cid 0x%02x", cid); |
511 config_process->state = A2DP_CONNECTED; 512 513 // notify app 514 a2dp_replace_subevent_id_and_emit_for_role(role, packet, size, A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED); 515 516 // Windows 10 as Source starts SEP discovery after 1500 ms, but only if it did not get a Discover command 517 // If BTstack is configured for both roles, we need to avoid sending Discover command in Source Role for outgoing Sink connections 518 --- 520 unchanged lines hidden --- | 513 config_process->state = A2DP_CONNECTED; 514 515 // notify app 516 a2dp_replace_subevent_id_and_emit_for_role(role, packet, size, A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED); 517 518 // Windows 10 as Source starts SEP discovery after 1500 ms, but only if it did not get a Discover command 519 // If BTstack is configured for both roles, we need to avoid sending Discover command in Source Role for outgoing Sink connections 520 --- 520 unchanged lines hidden --- |