mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 21:35:16 +00:00
hci: calculate sco_packet_length based on number of concurrent sco connections - fixes #129
This commit is contained in:
parent
b64a5f121f
commit
cf119f3b14
@ -4676,8 +4676,12 @@ uint16_t hci_get_sco_voice_setting(void){
|
||||
*/
|
||||
int hci_get_sco_packet_length(void){
|
||||
// see Core Spec for H2 USB Transfer.
|
||||
if (hci_stack->sco_voice_setting & 0x0020) return 51;
|
||||
return 27;
|
||||
|
||||
// CVSD requires twice as much bytes
|
||||
int multiplier = hci_stack->sco_voice_setting & 0x0020 ? 2 : 1;
|
||||
|
||||
// 3 byte SCO header + 24 bytes per connection
|
||||
return 3 + 24 * hci_number_sco_connections() * multiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user