hfp_hf.c (46f073f23a940c13c6db21186d8159e015b5c67b) | hfp_hf.c (3721a235468b7b00a1583fbaab9ebe94f874a0f4) |
---|---|
1/* 2 * Copyright (C) 2014 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 --- 530 unchanged lines hidden (view full) --- 539static void hfp_hf_run_for_context(hfp_connection_t * hfp_connection){ 540 541 btstack_assert(hfp_connection != NULL); 542 btstack_assert(hfp_connection->local_role == HFP_ROLE_HF); 543 544 // during SDP query, RFCOMM CID is not set 545 if (hfp_connection->rfcomm_cid == 0) return; 546 | 1/* 2 * Copyright (C) 2014 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 --- 530 unchanged lines hidden (view full) --- 539static void hfp_hf_run_for_context(hfp_connection_t * hfp_connection){ 540 541 btstack_assert(hfp_connection != NULL); 542 btstack_assert(hfp_connection->local_role == HFP_ROLE_HF); 543 544 // during SDP query, RFCOMM CID is not set 545 if (hfp_connection->rfcomm_cid == 0) return; 546 |
547 if (hfp_connection->hf_accept_sco && hci_can_send_command_packet_now()){ | 547 // assert command could be sent 548 if (hci_can_send_command_packet_now() == 0) return; |
548 | 549 |
550#ifdef ENABLE_CC256X_ASSISTED_HFP 551 // WBS Disassociate 552 if (hfp_connection->cc256x_send_wbs_disassociate){ 553 hfp_connection->cc256x_send_wbs_disassociate = false; 554 hci_send_cmd(&hci_ti_wbs_disassociate); 555 return; 556 } 557 // Write Codec Config 558 if (hfp_connection->cc256x_send_write_codec_config){ 559 hfp_connection->cc256x_send_write_codec_config = false; 560 hfp_cc256x_write_codec_config(hfp_connection); 561 return; 562 } 563 // WBS Associate 564 if (hfp_connection->cc256x_send_wbs_associate){ 565 hfp_connection->cc256x_send_wbs_associate = false; 566 hci_send_cmd(&hci_ti_wbs_associate, hfp_connection->acl_handle); 567 return; 568 } 569#endif 570 571 if (hfp_connection->hf_accept_sco){ 572 |
|
549 bool eSCO = hfp_connection->hf_accept_sco == 2; 550 hfp_connection->hf_accept_sco = 0; 551 552 // notify about codec selection if not done already 553 if (hfp_connection->negotiated_codec == 0){ 554 hfp_connection->negotiated_codec = HFP_CODEC_CVSD; 555 } 556 --- 1212 unchanged lines hidden --- | 573 bool eSCO = hfp_connection->hf_accept_sco == 2; 574 hfp_connection->hf_accept_sco = 0; 575 576 // notify about codec selection if not done already 577 if (hfp_connection->negotiated_codec == 0){ 578 hfp_connection->negotiated_codec = HFP_CODEC_CVSD; 579 } 580 --- 1212 unchanged lines hidden --- |