* [PATCH v1 1/5] media: Populate location to qos structure
@ 2023-10-20 14:25 Kiran K
2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K
Allow clients to register Location for endpoint.
---
profiles/audio/media.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 1d98ac5a1a70..d0520d3216c9 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1609,6 +1609,10 @@ static int parse_properties(DBusMessageIter *props, const char **uuid,
if (var != DBUS_TYPE_UINT16)
return -EINVAL;
dbus_message_iter_get_basic(&value, &qos->ppd_max);
+ } else if (strcasecmp(key, "Location") == 0) {
+ if (var != DBUS_TYPE_UINT32)
+ return -EINVAL;
+ dbus_message_iter_get_basic(&value, &qos->location);
}
dbus_message_iter_next(props);
@@ -2799,6 +2803,13 @@ static void app_register_endpoint(void *data, void *user_data)
dbus_message_iter_get_basic(&iter, &qos.ppd_min);
}
+ if (g_dbus_proxy_get_property(proxy, "Location", &iter)) {
+ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
+ goto fail;
+
+ dbus_message_iter_get_basic(&iter, &qos.location);
+ }
+
endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid,
delay_reporting, codec,
vendor.cid, vendor.vid, &qos,
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/5] bap: Fix update of sink location value
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
@ 2023-10-20 14:25 ` Kiran K
2023-10-20 14:25 ` [PATCH v1 3/5] bap: Do not set default location for sink and source Kiran K
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K
pac->sink_loc needs to be updated only if there is a change.
---
src/shared/bap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 925501c48d98..2fd21b81b72d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2491,13 +2491,11 @@ static void pacs_sink_location_changed(struct bt_pacs *pacs)
static void pacs_add_sink_location(struct bt_pacs *pacs, uint32_t location)
{
- location |= pacs->sink_loc_value;
-
/* Check if location value needs updating */
if (location == pacs->sink_loc_value)
return;
- pacs->sink_loc_value = location;
+ pacs->sink_loc_value |= location;
pacs_sink_location_changed(pacs);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 3/5] bap: Do not set default location for sink and source
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
@ 2023-10-20 14:25 ` Kiran K
2023-10-20 14:25 ` [PATCH v1 4/5] bap: Fix reading source codec capabilities Kiran K
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K
let the clients register the required location for source
and sink endpoints.
---
src/shared/bap.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 2fd21b81b72d..5cb8b5aba659 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -474,9 +474,8 @@ static struct bt_pacs *pacs_new(struct gatt_db *db)
pacs = new0(struct bt_pacs, 1);
- /* Set default values */
- pacs->sink_loc_value = PACS_SNK_LOCATION;
- pacs->source_loc_value = PACS_SRC_LOCATION;
+ pacs->sink_loc_value = 0;
+ pacs->source_loc_value = 0;
pacs->sink_context_value = PACS_SNK_CTXT;
pacs->source_context_value = PACS_SRC_CTXT;
pacs->supported_sink_context_value = PACS_SUPPORTED_SNK_CTXT;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 4/5] bap: Fix reading source codec capabilities
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
2023-10-20 14:25 ` [PATCH v1 3/5] bap: Do not set default location for sink and source Kiran K
@ 2023-10-20 14:25 ` Kiran K
2023-10-20 14:25 ` [PATCH v1 5/5] media: Parse conext and supported context Kiran K
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K
Sink ASE capabilities were read instead of source.
---
src/shared/bap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 5cb8b5aba659..bd00fa210abe 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2634,7 +2634,7 @@ static void bap_add_source(struct bt_bap_pac *pac)
iov.iov_base = value;
iov.iov_len = 0;
- queue_foreach(pac->bdb->sinks, pac_foreach, &iov);
+ queue_foreach(pac->bdb->sources, pac_foreach, &iov);
pacs_add_source_location(pac->bdb->pacs, pac->qos.location);
pacs_add_source_supported_context(pac->bdb->pacs,
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 5/5] media: Parse conext and supported context
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
` (2 preceding siblings ...)
2023-10-20 14:25 ` [PATCH v1 4/5] bap: Fix reading source codec capabilities Kiran K
@ 2023-10-20 14:25 ` Kiran K
2023-10-20 15:50 ` [PATCH v1 1/5] media: Populate location to qos structure Pauli Virtanen
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kiran K @ 2023-10-20 14:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ravishankar.srivatsa, Kiran K
Allow clients to register available context and supported context for
bap endpoint.
---
profiles/audio/media.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index d0520d3216c9..69f77a80c8ea 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1613,6 +1613,15 @@ static int parse_properties(DBusMessageIter *props, const char **uuid,
if (var != DBUS_TYPE_UINT32)
return -EINVAL;
dbus_message_iter_get_basic(&value, &qos->location);
+ } else if (strcasecmp(key, "Context") == 0) {
+ if (var != DBUS_TYPE_UINT16)
+ return -EINVAL;
+ dbus_message_iter_get_basic(&value, &qos->context);
+ } else if (strcasecmp(key, "SupportedContext") == 0) {
+ if (var != DBUS_TYPE_UINT16)
+ return -EINVAL;
+ dbus_message_iter_get_basic(&value,
+ &qos->supported_context);
}
dbus_message_iter_next(props);
@@ -2810,6 +2819,20 @@ static void app_register_endpoint(void *data, void *user_data)
dbus_message_iter_get_basic(&iter, &qos.location);
}
+ if (g_dbus_proxy_get_property(proxy, "Context", &iter)) {
+ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16)
+ goto fail;
+
+ dbus_message_iter_get_basic(&iter, &qos.context);
+ }
+
+ if (g_dbus_proxy_get_property(proxy, "SupportedContext", &iter)) {
+ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT16)
+ goto fail;
+
+ dbus_message_iter_get_basic(&iter, &qos.supported_context);
+ }
+
endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid,
delay_reporting, codec,
vendor.cid, vendor.vid, &qos,
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/5] media: Populate location to qos structure
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
` (3 preceding siblings ...)
2023-10-20 14:25 ` [PATCH v1 5/5] media: Parse conext and supported context Kiran K
@ 2023-10-20 15:50 ` Pauli Virtanen
2023-10-20 16:32 ` [v1,1/5] " bluez.test.bot
2023-10-20 20:50 ` [PATCH v1 1/5] " patchwork-bot+bluetooth
6 siblings, 0 replies; 8+ messages in thread
From: Pauli Virtanen @ 2023-10-20 15:50 UTC (permalink / raw)
To: Kiran K, linux-bluetooth; +Cc: ravishankar.srivatsa
Hi,
pe, 2023-10-20 kello 19:55 +0530, Kiran K kirjoitti:
> Allow clients to register Location for endpoint.
> ---
> profiles/audio/media.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/profiles/audio/media.c b/profiles/audio/media.c
> index 1d98ac5a1a70..d0520d3216c9 100644
> --- a/profiles/audio/media.c
> +++ b/profiles/audio/media.c
> @@ -1609,6 +1609,10 @@ static int parse_properties(DBusMessageIter *props, const char **uuid,
> if (var != DBUS_TYPE_UINT16)
> return -EINVAL;
> dbus_message_iter_get_basic(&value, &qos->ppd_max);
> + } else if (strcasecmp(key, "Location") == 0) {
> + if (var != DBUS_TYPE_UINT32)
> + return -EINVAL;
> + dbus_message_iter_get_basic(&value, &qos->location);
> }
The name of the key should be "Locations", not "Location", see
doc/org.bluez.MediaEndpoint.rst
>
> dbus_message_iter_next(props);
> @@ -2799,6 +2803,13 @@ static void app_register_endpoint(void *data, void *user_data)
> dbus_message_iter_get_basic(&iter, &qos.ppd_min);
> }
>
> + if (g_dbus_proxy_get_property(proxy, "Location", &iter)) {
Similarly here.
> + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
> + goto fail;
> +
> + dbus_message_iter_get_basic(&iter, &qos.location);
> + }
> +
> endpoint = media_endpoint_create(app->adapter, app->sender, path, uuid,
> delay_reporting, codec,
> vendor.cid, vendor.vid, &qos,
--
Pauli Virtanen
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [v1,1/5] media: Populate location to qos structure
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
` (4 preceding siblings ...)
2023-10-20 15:50 ` [PATCH v1 1/5] media: Populate location to qos structure Pauli Virtanen
@ 2023-10-20 16:32 ` bluez.test.bot
2023-10-20 20:50 ` [PATCH v1 1/5] " patchwork-bot+bluetooth
6 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2023-10-20 16:32 UTC (permalink / raw)
To: linux-bluetooth, kiran.k
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=795144
---Test result---
Test Summary:
CheckPatch PASS 2.33 seconds
GitLint PASS 1.64 seconds
BuildEll PASS 28.35 seconds
BluezMake PASS 930.45 seconds
MakeCheck PASS 11.57 seconds
MakeDistcheck PASS 180.89 seconds
CheckValgrind PASS 278.11 seconds
CheckSmatch PASS 381.00 seconds
bluezmakeextell PASS 120.14 seconds
IncrementalBuild PASS 3824.44 seconds
ScanBuild PASS 1143.53 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/5] media: Populate location to qos structure
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
` (5 preceding siblings ...)
2023-10-20 16:32 ` [v1,1/5] " bluez.test.bot
@ 2023-10-20 20:50 ` patchwork-bot+bluetooth
6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+bluetooth @ 2023-10-20 20:50 UTC (permalink / raw)
To: Kiran K; +Cc: linux-bluetooth, ravishankar.srivatsa
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 20 Oct 2023 19:55:50 +0530 you wrote:
> Allow clients to register Location for endpoint.
> ---
> profiles/audio/media.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Here is the summary with links:
- [v1,1/5] media: Populate location to qos structure
(no matching commit)
- [v1,2/5] bap: Fix update of sink location value
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5f8323f2aaa3
- [v1,3/5] bap: Do not set default location for sink and source
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=932e64206069
- [v1,4/5] bap: Fix reading source codec capabilities
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a564d6a0d533
- [v1,5/5] media: Parse conext and supported context
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f02e0c8664a6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-20 20:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:25 [PATCH v1 1/5] media: Populate location to qos structure Kiran K
2023-10-20 14:25 ` [PATCH v1 2/5] bap: Fix update of sink location value Kiran K
2023-10-20 14:25 ` [PATCH v1 3/5] bap: Do not set default location for sink and source Kiran K
2023-10-20 14:25 ` [PATCH v1 4/5] bap: Fix reading source codec capabilities Kiran K
2023-10-20 14:25 ` [PATCH v1 5/5] media: Parse conext and supported context Kiran K
2023-10-20 15:50 ` [PATCH v1 1/5] media: Populate location to qos structure Pauli Virtanen
2023-10-20 16:32 ` [v1,1/5] " bluez.test.bot
2023-10-20 20:50 ` [PATCH v1 1/5] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).