@@ -3424,6 +3424,15 @@ static DBusMessage *connect_device(DBusConnection *conn,
return NULL;
}
+static gboolean property_get_wideband_speech_enabled(
+ const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *user_data)
+{
+ struct btd_adapter *adapter = user_data;
+
+ return property_get_mode(adapter, MGMT_SETTING_WIDEBAND_SPEECH, iter);
+}
+
static const GDBusMethodTable adapter_methods[] = {
{ GDBUS_ASYNC_METHOD("StartDiscovery", NULL, NULL, start_discovery) },
{ GDBUS_METHOD("SetDiscoveryFilter",
@@ -3459,6 +3468,7 @@ static const GDBusPropertyTable adapter_properties[] = {
{ "UUIDs", "as", property_get_uuids },
{ "Modalias", "s", property_get_modalias, NULL,
property_exists_modalias },
+ { "WidebandSpeechEnabled", "b", property_get_wideband_speech_enabled },
{ }
};
@@ -8808,6 +8818,8 @@ static void read_info_complete(uint8_t status, uint16_t length,
set_mode(adapter, MGMT_OP_SET_LE, 0x01);
if (missing_settings & MGMT_SETTING_BREDR)
set_mode(adapter, MGMT_OP_SET_BREDR, 0x01);
+ if (missing_settings & MGMT_SETTING_WIDEBAND_SPEECH)
+ set_mode(adapter, MGMT_OP_SET_WIDEBAND_SPEECH, 0x01);
break;
case BT_MODE_BREDR:
if (!(adapter->supported_settings & MGMT_SETTING_BREDR)) {
@@ -8822,6 +8834,8 @@ static void read_info_complete(uint8_t status, uint16_t length,
set_mode(adapter, MGMT_OP_SET_BREDR, 0x01);
if (adapter->current_settings & MGMT_SETTING_LE)
set_mode(adapter, MGMT_OP_SET_LE, 0x00);
+ if (missing_settings & MGMT_SETTING_WIDEBAND_SPEECH)
+ set_mode(adapter, MGMT_OP_SET_WIDEBAND_SPEECH, 0x01);
break;
case BT_MODE_LE:
if (!(adapter->supported_settings & MGMT_SETTING_LE)) {