Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e88d7925 authored by WhaleChang's avatar WhaleChang
Browse files

Disable SWB for desktop if bluetooth.hfp.swb.supported=false

Adds a property to control whether SWB is supported over Bluetooth.

Bug: 368211009
Test: atest bluetooth_test_gd
Test: SWB is not enabled if bluetooth.hfp.swb.supported=false
Flag: EXEMPT desktop only
Change-Id: I0f1cd81d445b11934a5c566ecf55893fc349fe6f
parent 61a1afe5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -324,8 +324,13 @@ bool get_wbs_supported() {

// Check if super-wideband speech is supported on local device
bool get_swb_supported() {
#ifdef TARGET_FLOSS
  // We only support SWB via transparent mode.
  return is_coding_format_supported(ESCO_CODING_FORMAT_TRANSPNT);
#else
  return is_coding_format_supported(ESCO_CODING_FORMAT_TRANSPNT) &&
         osi_property_get_bool("bluetooth.hfp.swb.supported", true);  // TODO: add SWB for desktop
#endif
}

// Checks the supported codecs