mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 01:20:44 +00:00
hfp: sco connection is created by ag if codec negotiation is supported
This commit is contained in:
parent
29cddf58f6
commit
40e8d6c5eb
@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- GAP: allow to disable link supervision timeout
|
||||
- HFP HF: only emit single event for RING and AG Status updates
|
||||
- HFP AG: fix audio connection setup for in-band ringtone on incoming connection
|
||||
- HFP: fix audio connection setup by HF if codec negotiation is supported
|
||||
|
||||
### Changed
|
||||
- HCI: config I2S for BCM Controllers if `ENABLE_SCO_OVER_PCM`, reduce bit clock to 256/512 kHz
|
||||
|
@ -553,6 +553,7 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){
|
||||
|
||||
case HFP_CMD_TRIGGER_CODEC_CONNECTION_SETUP:
|
||||
hfp_connection->codecs_state = HFP_CODECS_RECEIVED_TRIGGER_CODEC_EXCHANGE;
|
||||
hfp_connection->establish_audio_connection = 1;
|
||||
hfp_ag_send_ok(hfp_connection->rfcomm_cid);
|
||||
return 1;
|
||||
|
||||
|
@ -1335,7 +1335,6 @@ void hfp_hf_establish_audio_connection(hci_con_handle_t acl_handle){
|
||||
if (hfp_connection->state >= HFP_W2_DISCONNECT_SCO) return;
|
||||
|
||||
hfp_connection->trigger_codec_exchange = 0;
|
||||
hfp_connection->establish_audio_connection = 1;
|
||||
if (!has_codec_negotiation_feature(hfp_connection)){
|
||||
log_info("no codec negotiation feature, using NBS");
|
||||
hfp_connection->codecs_state = HFP_CODECS_EXCHANGED;
|
||||
@ -1343,6 +1342,7 @@ void hfp_hf_establish_audio_connection(hci_con_handle_t acl_handle){
|
||||
hfp_connection->codec_confirmed = hfp_connection->suggested_codec;
|
||||
hfp_connection->negotiated_codec = hfp_connection->suggested_codec;
|
||||
hfp_init_link_settings(hfp_connection, hfp_hf_esco_s4_supported(hfp_connection));
|
||||
hfp_connection->establish_audio_connection = 1;
|
||||
hfp_connection->state = HFP_W4_SCO_CONNECTED;
|
||||
} else {
|
||||
switch (hfp_connection->codecs_state){
|
||||
|
Loading…
x
Reference in New Issue
Block a user