mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: Expose WBS in HFP AG SDP record
Updates the available values for SDP records and BRSF for both Hands-Free profile version 1.7.
This commit is contained in:
parent
51cfb98ea6
commit
44d8a0a4c1
2 changed files with 34 additions and 1 deletions
|
|
@ -924,7 +924,7 @@ static int register_profile(struct spa_bt_backend *backend, const char *profile,
|
|||
DBusMessage *m;
|
||||
DBusMessageIter it[4];
|
||||
dbus_bool_t autoconnect;
|
||||
dbus_uint16_t version, chan;
|
||||
dbus_uint16_t version, chan, features;
|
||||
char *str;
|
||||
DBusPendingCall *call;
|
||||
|
||||
|
|
@ -975,6 +975,17 @@ static int register_profile(struct spa_bt_backend *backend, const char *profile,
|
|||
dbus_message_iter_close_container(&it[2], &it[3]);
|
||||
dbus_message_iter_close_container(&it[1], &it[2]);
|
||||
} else if (strcmp(uuid, SPA_BT_UUID_HFP_AG) == 0) {
|
||||
str = "Features";
|
||||
features = SPA_BT_HFP_SDP_AG_FEATURE_NONE;
|
||||
if (backend->msbc_support_enabled_in_config == true)
|
||||
features |= SPA_BT_HFP_SDP_AG_FEATURE_WIDEBAND_SPEECH;
|
||||
dbus_message_iter_open_container(&it[1], DBUS_TYPE_DICT_ENTRY, NULL, &it[2]);
|
||||
dbus_message_iter_append_basic(&it[2], DBUS_TYPE_STRING, &str);
|
||||
dbus_message_iter_open_container(&it[2], DBUS_TYPE_VARIANT, "q", &it[3]);
|
||||
dbus_message_iter_append_basic(&it[3], DBUS_TYPE_UINT16, &features);
|
||||
dbus_message_iter_close_container(&it[2], &it[3]);
|
||||
dbus_message_iter_close_container(&it[1], &it[2]);
|
||||
|
||||
/* HFP version 1.7 */
|
||||
str = "Version";
|
||||
version = 0x0107;
|
||||
|
|
|
|||
|
|
@ -196,6 +196,17 @@ enum spa_bt_hfp_ag_feature {
|
|||
SPA_BT_HFP_AG_FEATURE_EXTENDED_RES_CODE = (1 << 8),
|
||||
SPA_BT_HFP_AG_FEATURE_CODEC_NEGOTIATION = (1 << 9),
|
||||
SPA_BT_HFP_AG_FEATURE_HF_INDICATORS = (1 << 10),
|
||||
SPA_BT_HFP_AG_FEATURE_ESCO_S4 = (1 << 11),
|
||||
};
|
||||
|
||||
enum spa_bt_hfp_sdp_ag_features {
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_NONE = (0),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_3WAY = (1 << 0),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_ECNR = (1 << 1),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_VOICE_RECOG = (1 << 2),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_IN_BAND_RING_TONE = (1 << 3),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_ATTACH_VOICE_TAG = (1 << 4),
|
||||
SPA_BT_HFP_SDP_AG_FEATURE_WIDEBAND_SPEECH = (1 << 5),
|
||||
};
|
||||
|
||||
enum spa_bt_hfp_hf_feature {
|
||||
|
|
@ -209,6 +220,17 @@ enum spa_bt_hfp_hf_feature {
|
|||
SPA_BT_HFP_HF_FEATURE_ENHANCED_CALL_CONTROL = (1 << 6),
|
||||
SPA_BT_HFP_HF_FEATURE_CODEC_NEGOTIATION = (1 << 7),
|
||||
SPA_BT_HFP_HF_FEATURE_HF_INDICATORS = (1 << 8),
|
||||
SPA_BT_HFP_HF_FEATURE_ESCO_S4 = (1 << 9),
|
||||
};
|
||||
|
||||
enum spa_bt_hfp_sdp_hf_features {
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_NONE = (0),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_ECNR = (1 << 0),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_3WAY = (1 << 1),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_CLIP = (1 << 2),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_VOICE_RECOGNITION = (1 << 3),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_REMOTE_VOLUME_CONTROL = (1 << 4),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_WIDEBAND_SPEECH = (1 << 5),
|
||||
};
|
||||
|
||||
static inline const char *spa_bt_profile_name (enum spa_bt_profile profile) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue