1 /* 2 * Copyright 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _BTA_AG_SWB_H_ 18 #define _BTA_AG_SWB_H_ 19 20 #include "bta/ag/bta_ag_int.h" 21 #include "device/include/esco_parameters.h" 22 #include "include/hardware/bt_hf.h" 23 24 /* Events originated from HF side */ 25 #define BTA_AG_AT_QAC_EVT 253 26 #define BTA_AG_AT_QCS_EVT 254 27 #define BTA_AG_LOCAL_RES_QAC 0x108 28 #define BTA_AG_LOCAL_RES_QCS 0x109 29 30 #define SWB_CODECS_SUPPORTED "0,4,6,7" 31 #define SWB_CODECS_UNSUPPORTED "0xFFFF" 32 #define SWB_CODECS_NUMBER 4 33 34 bool is_hfp_aptx_voice_enabled(); 35 36 void bta_ag_swb_handle_vs_at_events(tBTA_AG_SCB* p_scb, uint16_t cmd, 37 int16_t int_arg, tBTA_AG_VAL* val); 38 tBTA_AG_PEER_CODEC bta_ag_parse_qac(char* p_s); 39 40 bool get_swb_codec_status(bluetooth::headset::bthf_swb_codec_t swb_codec, 41 RawAddress* bd_addr); 42 43 bt_status_t enable_aptx_swb_codec(bool enable, RawAddress* bd_addr); 44 45 #endif //_BTA_AG_SWB_H_ 46