transport: Fix build with VCP support disabled
PATCH 1/1 transport: Fix build with VCP support disabled
$ $ ./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'
--- configure.ac | 3 +++ profiles/audio/transport.c | 8 ++++++++ 2 files changed, 11 insertions(+)
configure.ac +3 -0
@@ -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}])
profiles/audio/transport.c +8 -0
@@ -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)
Signature · 1 line
2.51.0
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
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html