diff options
author | Pauli Virtanen <pav@iki.fi> | 2023-04-22 17:05:57 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-04-25 13:58:44 -0700 |
commit | 2f88c59391b8717055557f6634f92d76d9fd0001 (patch) | |
tree | c588f69ee7fe000e7b371779a92e7637a4ceaed8 | |
parent | 5910b78528010b654a82367bb2e95f70dd7877ce (diff) | |
download | bluez-2f88c59391b8717055557f6634f92d76d9fd0001.tar.gz |
bap: add Location parameter to SelectProperties
Add relevant PACS Location field as a parameter to SelectProperties.
SelectProperties may set Audio_Channel_Allocation, which shall be chosen
from the bits set in Sink/Source Audio Locations (BAP v1.0.1 Sec. 4.4.1,
Sec 4.4.2). Hence, audio server needs to know the supported values,
which it previously could not.
-rw-r--r-- | profiles/audio/media.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 540e91bc6..52c4bd80a 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -901,6 +901,7 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, DBusMessage *msg; DBusMessageIter iter, dict; const char *key = "Capabilities"; + uint32_t loc; bt_bap_pac_get_codec(rpac, NULL, &caps, &metadata); if (!caps) @@ -932,6 +933,11 @@ static int pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, DBUS_TYPE_BYTE, &caps->iov_base, caps->iov_len); + loc = bt_bap_pac_get_locations(rpac); + if (loc) + g_dbus_dict_append_entry(&dict, "Location", DBUS_TYPE_UINT32, + &loc); + if (metadata) { key = "Metadata"; g_dbus_dict_append_basic_array(&dict, DBUS_TYPE_STRING, &key, |