mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-11 00:40:00 +00:00
hfp: Fix Wide Band Speech bit in SDP record for both HF/AG. Missing bit prevents macOS from using mSBC
This commit is contained in:
parent
6483160777
commit
42bafa11b1
@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## Fixed
|
||||
- HFP: Fix Wide Band Speech bit in SDP record for both HF/AG. Missing bit prevents macOS from using mSBC
|
||||
|
||||
## Changes May 2018
|
||||
|
||||
### Added
|
||||
- GAP: re-encrypt outgoing connection if bonded
|
||||
- ATT Server: wait until re-encryption is complete
|
||||
|
@ -209,9 +209,11 @@ void hfp_ag_create_sdp_record(uint8_t * service, uint32_t service_record_handle,
|
||||
// "The values of the “SupportedFeatures” bitmap given in Table 5.4 shall be the same as the values
|
||||
// of the Bits 0 to 4 of the unsolicited result code +BRSF"
|
||||
//
|
||||
uint16_t sdp_features = supported_features &0x1f;
|
||||
if (supported_features & wide_band_speech){
|
||||
sdp_features |= 1 << 5; // Wide band speech bit
|
||||
// Wide band speech (bit 5) requires Codec negotiation
|
||||
//
|
||||
uint16_t sdp_features = supported_features & 0x1f;
|
||||
if (wide_band_speech && (supported_features & (1 << HFP_AGSF_CODEC_NEGOTIATION))){
|
||||
sdp_features |= 1 << 5;
|
||||
}
|
||||
de_add_number(service, DE_UINT, DE_SIZE_16, 0x0311); // Hands-Free Profile - SupportedFeatures
|
||||
de_add_number(service, DE_UINT, DE_SIZE_16, sdp_features);
|
||||
|
@ -184,9 +184,11 @@ void hfp_hf_create_sdp_record(uint8_t * service, uint32_t service_record_handle,
|
||||
// "The values of the “SupportedFeatures” bitmap given in Table 5.4 shall be the same as the values
|
||||
// of the Bits 0 to 4 of the unsolicited result code +BRSF"
|
||||
//
|
||||
// Wide band speech (bit 5) requires Codec negotiation
|
||||
//
|
||||
uint16_t sdp_features = supported_features & 0x1f;
|
||||
if (supported_features & wide_band_speech){
|
||||
sdp_features |= 1 << 5; // Wide band speech bit
|
||||
if (wide_band_speech && (supported_features & (1 << HFP_HFSF_CODEC_NEGOTIATION))){
|
||||
sdp_features |= 1 << 5;
|
||||
}
|
||||
de_add_number(service, DE_UINT, DE_SIZE_16, 0x0311); // Hands-Free Profile - SupportedFeatures
|
||||
de_add_number(service, DE_UINT, DE_SIZE_16, sdp_features);
|
||||
|
Loading…
x
Reference in New Issue
Block a user