diff mbox series

[meta-multimedia,02/15] bluealsa: upgrade 4.3.1 -> 5.0.0

Message ID 20261115165955.3485789-2-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-multimedia,01/15] aom: upgrade 3.15.1 -> 3.15.3 | expand

Commit Message

Khem Raj Nov. 15, 2026, 4:59 p.m. UTC
BlueALSA 5.0.0 renames bluealsa to bluealsad and bluealsa-cli to
bluealsactl, without backward compatibility.

- Rename the cli PACKAGECONFIG to ctl (--enable-ctl) and pass
  --with-systemdbluealsadargs instead of --with-systemdbluealsaargs.
- Backport an upstream fix for building with dependency tracking
  disabled, otherwise the dbus code generator fails because src/dbus
  does not exist in the build directory.
- Package the ALSA configuration snippet and the D-Bus interface
  description which are now installed.
- LICENSE checksum changed due to the copyright year.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 ...ild-with-disable-dependency-checking.patch | 159 ++++++++++++++++++
 .../{bluealsa_4.3.1.bb => bluealsa_5.0.0.bb}  |  19 ++-
 2 files changed, 170 insertions(+), 8 deletions(-)
 create mode 100644 meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Fix-build-with-disable-dependency-checking.patch
 rename meta-multimedia/recipes-multimedia/bluealsa/{bluealsa_4.3.1.bb => bluealsa_5.0.0.bb} (80%)
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Fix-build-with-disable-dependency-checking.patch b/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Fix-build-with-disable-dependency-checking.patch
new file mode 100644
index 0000000000..c396d76384
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/bluealsa/bluealsa/0001-Fix-build-with-disable-dependency-checking.patch
@@ -0,0 +1,159 @@ 
+From 722886d22243488f9a8e0145050f05fcac3e8997 Mon Sep 17 00:00:00 2001
+From: borine <32966433+borine@users.noreply.github.com>
+Date: Sun, 4 Oct 2026 15:11:32 +0100
+Subject: [PATCH] Fix build with --disable-dependency-checking
+
+The directory src/dbus in the build tree was created only by the
+automake automatic dependency checking rules; so that if automatic
+dependency checking is disabled by configure (as is commonly done
+for one-time builds) then that directory did not exist and so the
+dbus-codegen commands all failed. This commit re-factors the
+automake files such that the src/dbus directory is now an explicit
+automake sub-directory, so that it is always created in the build
+by the configure command.
+
+Fixes #814
+
+Upstream-Status: Backport [https://github.com/arkq/bluez-alsa/commit/722886d22243488f9a8e0145050f05fcac3e8997]
+Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
+---
+ configure.ac         |  1 +
+ src/Makefile.am      | 30 ++++--------------------------
+ src/dbus/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 41 insertions(+), 26 deletions(-)
+ create mode 100644 src/dbus/Makefile.am
+
+diff --git a/configure.ac b/configure.ac
+index cd413ae..3e3ab7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -498,6 +498,7 @@ AC_CONFIG_FILES([
+ 	src/Makefile
+ 	src/asound/Makefile
+ 	src/bluealsactl/Makefile
++	src/dbus/Makefile
+ 	src/dumper/Makefile
+ 	src/shared/Makefile
+ 	utils/Makefile
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8b68826..1ae04e3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -4,26 +4,14 @@
+
+ SUBDIRS = shared
+ # Make sure that shared library is built before anything else.
+-SUBDIRS += asound bluealsactl dumper
++SUBDIRS += asound bluealsactl dbus dumper
+
+ bin_PROGRAMS = bluealsad
+ noinst_LTLIBRARIES = libbluealsad.la
+
+ dbusconfdir = @DBUS_CONF_DIR@
+-dbusifacedir = @DBUS_IFACE_DIR@
+ dbusbluealsauser = @BLUEALSAD_USER@
+ dist_dbusconf_DATA = org.bluealsa.conf
+-dist_dbusiface_DATA = dbus/org.bluealsa.xml
+-
+-BUILT_SOURCES = \
+-	dbus/org.bluealsa.h \
+-	dbus/org.bluealsa.c \
+-	dbus/org.bluez.h \
+-	dbus/org.bluez.c \
+-	dbus/org.ofono.h \
+-	dbus/org.ofono.c
+-
+-CODEGEN_DEFS =
+
+ MOSTLYCLEANFILES = \
+ 	$(dist_dbusconf_DATA) \
+@@ -50,8 +38,8 @@ libbluealsad_la_SOURCES = \
+ 	bluez.c \
+ 	codec-sbc.c \
+ 	dbus.c \
+-	dbus/org.bluealsa.xml \
+-	dbus/org.bluez.xml \
++	dbus/org.bluealsa.c \
++	dbus/org.bluez.c \
+ 	error.c \
+ 	hci.c \
+ 	io.c \
+@@ -82,7 +70,6 @@ libbluealsad_la_SOURCES += \
+ endif
+
+ if ENABLE_ASHA
+-CODEGEN_DEFS += --define=ENABLE_GATT
+ libbluealsad_la_SOURCES += \
+ 	asha-g722.c \
+ 	asha.c \
+@@ -113,7 +100,6 @@ libbluealsad_la_SOURCES += \
+ endif
+
+ if ENABLE_MIDI
+-CODEGEN_DEFS += --define=ENABLE_GATT
+ libbluealsad_la_SOURCES += \
+ 	bt-midi.c \
+ 	bt-advertising.c \
+@@ -145,7 +131,7 @@ endif
+ if ENABLE_OFONO
+ libbluealsad_la_SOURCES += \
+ 	ofono.c \
+-	dbus/org.ofono.xml
++	dbus/org.ofono.c
+ endif
+
+ if ENABLE_UPOWER
+@@ -203,11 +189,3 @@ DBUSCONF_SUBS = \
+
+ .conf.in.conf:
+ 	$(SED) -e '$(DBUSCONF_SUBS)' < $< > $@
+-
+-.xml.h:
+-	$(srcdir)/dbus/dbus-codegen.py --output $@ $(CODEGEN_DEFS) \
+-		--interface-info-header --interface-skeleton-header $<
+-
+-.xml.c:
+-	$(srcdir)/dbus/dbus-codegen.py --output $@ $(CODEGEN_DEFS) \
+-		--interface-info-body --interface-skeleton-body $<
+diff --git a/src/dbus/Makefile.am b/src/dbus/Makefile.am
+new file mode 100644
+index 0000000..ee77c9c
+--- /dev/null
++++ b/src/dbus/Makefile.am
+@@ -0,0 +1,36 @@
++# BlueALSA - Makefile.am
++# SPDX-FileCopyrightText: 2016-2026 BlueALSA developers
++# SPDX-License-Identifier: MIT
++
++dbusifacedir = @DBUS_IFACE_DIR@
++dist_dbusiface_DATA = org.bluealsa.xml
++
++CODEGEN_DEFS =
++
++if ENABLE_ASHA
++CODEGEN_DEFS += --define=ENABLE_GATT
++endif
++
++if ENABLE_MIDI
++CODEGEN_DEFS += --define=ENABLE_GATT
++endif
++
++LOCAL_TARGETS = \
++	org.bluealsa.h \
++	org.bluealsa.c \
++	org.bluez.h \
++	org.bluez.c \
++	org.ofono.h \
++	org.ofono.c
++
++MOSTLYCLEANFILES = $(LOCAL_TARGETS)
++
++all-local: $(LOCAL_TARGETS)
++
++.xml.h:
++	$(srcdir)/dbus-codegen.py --output $@ $(CODEGEN_DEFS) \
++		--interface-info-header --interface-skeleton-header $<
++
++.xml.c:
++	$(srcdir)/dbus-codegen.py --output $@ $(CODEGEN_DEFS) \
++		--interface-info-body --interface-skeleton-body $<
diff --git a/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.1.bb b/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_5.0.0.bb
similarity index 80%
rename from meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.1.bb
rename to meta-multimedia/recipes-multimedia/bluealsa/bluealsa_5.0.0.bb
index f94600e8b2..7ac758a0fa 100644
--- a/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_4.3.1.bb
+++ b/meta-multimedia/recipes-multimedia/bluealsa/bluealsa_5.0.0.bb
@@ -12,20 +12,22 @@  BUGTRACKER = "https://github.com/arkq/bluez-alsa/issues"
 SECTION = "libs"

 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=143bc4e73f39cc5e89d6e096ac0315ba"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8e621f51a0d6b9221389a66da5118183"

 DEPENDS += "alsa-lib bluez5 dbus glib-2.0-native python3-packaging-native sbc"

-SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master;tag=v${PV}"
+SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master;tag=v${PV} \
+           file://0001-Fix-build-with-disable-dependency-checking.patch \
+           "

-SRCREV = "f11569451b98a765adf9abc081632bb013f89f57"
+SRCREV = "1935d6dcb8975f2d7a51aaafe61538d157224623"


-PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "aplay ctl hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[a2dpconf] = "--enable-a2dpconf,--disable-a2dpconf"
 PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,fdk-aac"
 PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay"
-PACKAGECONFIG[cli] = "--enable-cli,--disable-cli"
+PACKAGECONFIG[ctl] = "--enable-ctl,--disable-ctl"
 PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,lcov-native"
 PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time"
@@ -40,7 +42,7 @@  PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono,ofono"
 PACKAGECONFIG[payloadcheck] = "--enable-payloadcheck,--disable-payloadcheck"
 PACKAGECONFIG[rfcomm] = "--enable-rfcomm,--disable-rfcomm"
 PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} \
-                          --with-systemdbluealsaargs='${SYSTEMD_BLUEALSA_ARGS}' --with-systemdbluealsaaplayargs='${SYSTEMD_BLUEALSA_APLAY_ARGS}',--disable-systemd,systemd"
+                          --with-systemdbluealsadargs='${SYSTEMD_BLUEALSA_ARGS}' --with-systemdbluealsaaplayargs='${SYSTEMD_BLUEALSA_APLAY_ARGS}',--disable-systemd,systemd"
 PACKAGECONFIG[test] = "--enable-test,--disable-test,libcheck libsndfile1"
 PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,,upower"

@@ -58,7 +60,8 @@  PACKAGE_BEFORE_PN = "${PN}-aplay"

 FILES:${PN}-aplay += "${bindir}/bluealsa-aplay"
 FILES:${PN}-staticdev += "${libdir}/alsa-lib/*.a"
-FILES:${PN} += "${libdir}/alsa-lib/* ${datadir}/dbus-1/system.d"
+FILES:${PN} += "${libdir}/alsa-lib/* ${datadir}/alsa ${datadir}/dbus-1/system.d"
+FILES:${PN}-dev += "${datadir}/dbus-1/interfaces"

 RRECOMMENDS:${PN} = "${PN}-aplay"

@@ -68,7 +71,7 @@  SYSTEMD_SERVICE:${PN}-aplay = "bluealsa-aplay.service"

 SYSTEMD_AUTO_ENABLE:${PN}-aplay = "disable"

-# Choose bluez-alsa arguments to be used in bluealsa systemd service
+# Choose bluealsad arguments to be used in bluealsa systemd service
 # Usually could choose profiles with it: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono
 # Enable bluez-alsa arguments by default:
 SYSTEMD_BLUEALSA_ARGS ?= "-p a2dp-source -p a2dp-sink"