public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] transport: Fix build with VCP support disabled
@ 2025-09-16 23:00 Bastien Nocera
  2025-09-17  0:29 ` [BlueZ] " bluez.test.bot
  2025-09-17 13:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Bastien Nocera @ 2025-09-16 23:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arun Raghavan

$ $ ./bootstrap-configure --enable-a2dp --enable-avrcp --enable-experimental --enable-asha --disable-vcp && make
[...]
/usr/bin/ld: profiles/audio/bluetoothd-transport.o: in function `transport_bap_set_volume':
profiles/audio/transport.c:2275:(.text.transport_bap_set_volume+0x11): undefined reference to `bt_audio_vcp_set_volume'
/usr/bin/ld: profiles/audio/bluetoothd-transport.o: in function `transport_bap_get_volume':
profiles/audio/transport.c:2266:(.text.transport_bap_get_volume+0x9): undefined reference to `bt_audio_vcp_get_volume'

Reported-by: Arun Raghavan <arun@accosted.net>
Fixes: af8266af13c8 ("audio: connect VCP profile client to MediaTransport")
---
 configure.ac               | 3 +++
 profiles/audio/transport.c | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/configure.ac b/configure.ac
index 955908621b6d..9f1a96600a7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,9 @@ AM_CONDITIONAL(CCP, test "${enable_ccp}" != "no")
 AC_ARG_ENABLE(vcp, AS_HELP_STRING([--disable-vcp],
 		[disable VCP profile]), [enable_vcp=${enableval}])
 AM_CONDITIONAL(VCP, test "${enable_vcp}" != "no")
+if test "${enable_vcp}" != "no"; then
+	AC_DEFINE(HAVE_VCP, 1, [Define to 1 if you have VCP support.])
+fi
 
 AC_ARG_ENABLE(micp, AS_HELP_STRING([--disable-micp],
 		[disable MICP profile]), [enable_micp=${enableval}])
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 2fceb5121a34..bc550b743981 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -2263,16 +2263,24 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,
 
 static int transport_bap_get_volume(struct media_transport *transport)
 {
+#ifdef HAVE_VCP
 	return bt_audio_vcp_get_volume(transport->device);
+#else
+	return -ENODEV;
+#endif /* HAVE_VCP */
 }
 
 static int transport_bap_set_volume(struct media_transport *transport,
 								int volume)
 {
+#ifdef HAVE_VCP
 	if (volume < 0 || volume > 255)
 		return -EINVAL;
 
 	return bt_audio_vcp_set_volume(transport->device, volume) ? 0 : -EIO;
+#else
+	return -ENODEV;
+#endif /* HAVE_VCP */
 }
 
 static void transport_bap_destroy(void *data)
-- 
2.51.0


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

* RE: [BlueZ] transport: Fix build with VCP support disabled
  2025-09-16 23:00 [PATCH BlueZ] transport: Fix build with VCP support disabled Bastien Nocera
@ 2025-09-17  0:29 ` bluez.test.bot
  2025-09-17 13:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-09-17  0:29 UTC (permalink / raw)
  To: linux-bluetooth, hadess

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

---Test result---

Test Summary:
CheckPatch                    PENDING   0.26 seconds
GitLint                       PENDING   0.31 seconds
BuildEll                      PASS      20.09 seconds
BluezMake                     PASS      2604.18 seconds
MakeCheck                     PASS      20.57 seconds
MakeDistcheck                 PASS      187.46 seconds
CheckValgrind                 PASS      239.57 seconds
CheckSmatch                   PASS      309.80 seconds
bluezmakeextell               PASS      129.70 seconds
IncrementalBuild              PENDING   0.36 seconds
ScanBuild                     PASS      908.08 seconds

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

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

##############################
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] transport: Fix build with VCP support disabled
  2025-09-16 23:00 [PATCH BlueZ] transport: Fix build with VCP support disabled Bastien Nocera
  2025-09-17  0:29 ` [BlueZ] " bluez.test.bot
@ 2025-09-17 13:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-09-17 13:30 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-bluetooth, arun

Hello:

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

On Wed, 17 Sep 2025 01:00:14 +0200 you wrote:
> $ $ ./bootstrap-configure --enable-a2dp --enable-avrcp --enable-experimental --enable-asha --disable-vcp && make
> [...]
> /usr/bin/ld: profiles/audio/bluetoothd-transport.o: in function `transport_bap_set_volume':
> profiles/audio/transport.c:2275:(.text.transport_bap_set_volume+0x11): undefined reference to `bt_audio_vcp_set_volume'
> /usr/bin/ld: profiles/audio/bluetoothd-transport.o: in function `transport_bap_get_volume':
> profiles/audio/transport.c:2266:(.text.transport_bap_get_volume+0x9): undefined reference to `bt_audio_vcp_get_volume'
> 
> [...]

Here is the summary with links:
  - [BlueZ] transport: Fix build with VCP support disabled
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c6dcf6b71450

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-09-17 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 23:00 [PATCH BlueZ] transport: Fix build with VCP support disabled Bastien Nocera
2025-09-17  0:29 ` [BlueZ] " bluez.test.bot
2025-09-17 13:30 ` [PATCH BlueZ] " 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