public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] audio/player: Fix not being able to register players of different types
@ 2025-05-28 14:21 Luiz Augusto von Dentz
  2025-05-28 15:52 ` [BlueZ,v1] " bluez.test.bot
  2025-05-28 16:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-05-28 14:21 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When registering players both AVRCP and MCP were using the same object
path making them clash, so this fix it by adding a type to the object
path so each profile can register their player in their own domain.

Fixes: https://github.com/bluez/bluez/issues/1290
---
 profiles/audio/avrcp.c  | 2 +-
 profiles/audio/mcp.c    | 3 ++-
 profiles/audio/player.c | 5 +++--
 profiles/audio/player.h | 3 ++-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 2d7b4e1e7ddf..831f1dc8bf12 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3577,7 +3577,7 @@ static struct avrcp_player *create_ct_player(struct avrcp *session,
 
 	path = device_get_path(session->dev);
 
-	mp = media_player_controller_create(path, id);
+	mp = media_player_controller_create(path, "avrcp", id);
 	if (mp == NULL) {
 		g_free(player);
 		return NULL;
diff --git a/profiles/audio/mcp.c b/profiles/audio/mcp.c
index 0a2991f2074f..2808674cf3a7 100644
--- a/profiles/audio/mcp.c
+++ b/profiles/audio/mcp.c
@@ -342,7 +342,8 @@ static int mcp_accept(struct btd_service *service)
 
 	bt_mcp_attach(data->mcp, client);
 
-	data->mp = media_player_controller_create(device_get_path(device), 0);
+	data->mp = media_player_controller_create(device_get_path(device),
+							"mcp", 0);
 	if (data->mp == NULL) {
 		DBG("Unable to create Media Player");
 		return -EINVAL;
diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 52844c9c07a3..86e59bc8e231 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -1277,13 +1277,14 @@ void media_player_destroy(struct media_player *mp)
 }
 
 struct media_player *media_player_controller_create(const char *path,
-								uint16_t id)
+							const char *type,
+							uint16_t id)
 {
 	struct media_player *mp;
 
 	mp = g_new0(struct media_player, 1);
 	mp->device = g_strdup(path);
-	mp->path = g_strdup_printf("%s/player%u", path, id);
+	mp->path = g_strdup_printf("%s/%s/player%u", path, type, id);
 	mp->settings = g_hash_table_new_full(g_str_hash, g_str_equal,
 							g_free, g_free);
 	mp->track = g_hash_table_new_full(g_str_hash, g_str_equal,
diff --git a/profiles/audio/player.h b/profiles/audio/player.h
index 5e181591c0f4..dcd7df286ee1 100644
--- a/profiles/audio/player.h
+++ b/profiles/audio/player.h
@@ -61,7 +61,8 @@ struct media_player_callback {
 };
 
 struct media_player *media_player_controller_create(const char *path,
-								uint16_t id);
+							const char *type,
+							uint16_t id);
 const char *media_player_get_path(struct media_player *mp);
 void media_player_destroy(struct media_player *mp);
 void media_player_set_duration(struct media_player *mp, uint32_t duration);
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v1] audio/player: Fix not being able to register players of different types
  2025-05-28 14:21 [PATCH BlueZ v1] audio/player: Fix not being able to register players of different types Luiz Augusto von Dentz
@ 2025-05-28 15:52 ` bluez.test.bot
  2025-05-28 16:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-05-28 15:52 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1532 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=967039

---Test result---

Test Summary:
CheckPatch                    PENDING   0.30 seconds
GitLint                       PENDING   0.34 seconds
BuildEll                      PASS      20.22 seconds
BluezMake                     PASS      2812.85 seconds
MakeCheck                     PASS      20.19 seconds
MakeDistcheck                 FAIL      8.60 seconds
CheckValgrind                 PASS      278.49 seconds
CheckSmatch                   PASS      305.18 seconds
bluezmakeextell               PASS      128.78 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      916.34 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: MakeDistcheck - FAIL
Desc: Run Bluez Make Distcheck
Output:

make[2]: *** No rule to make target 'doc/mgmt-api.txt', needed by 'distdir-am'.  Stop.
make[1]: *** [Makefile:12179: distdir] Error 2
make: *** [Makefile:12255: dist] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v1] audio/player: Fix not being able to register players of different types
  2025-05-28 14:21 [PATCH BlueZ v1] audio/player: Fix not being able to register players of different types Luiz Augusto von Dentz
  2025-05-28 15:52 ` [BlueZ,v1] " bluez.test.bot
@ 2025-05-28 16:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-05-28 16:10 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 28 May 2025 10:21:12 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> When registering players both AVRCP and MCP were using the same object
> path making them clash, so this fix it by adding a type to the object
> path so each profile can register their player in their own domain.
> 
> Fixes: https://github.com/bluez/bluez/issues/1290
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] audio/player: Fix not being able to register players of different types
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f2cc37050402

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] 3+ messages in thread

end of thread, other threads:[~2025-05-28 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 14:21 [PATCH BlueZ v1] audio/player: Fix not being able to register players of different types Luiz Augusto von Dentz
2025-05-28 15:52 ` [BlueZ,v1] " bluez.test.bot
2025-05-28 16:10 ` [PATCH BlueZ v1] " 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