From 524053266e1a7e7fe095850b464e7bcc2e1789b0 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sat, 4 Jun 2022 12:01:49 +0200 Subject: bluez-alsa: uprev to 4.0.0 Some recipe changes have been made as well as follows: - Dont install bluealsa.service from recipe, use the bluealsa.service from bluez-alsa source. In bluez-alsa 4.0.0, two more autoconf options have been added: --with-systemdbluealsaaplayargs and --with-systemdbluealsaargs that could be used to pass bluealsa and bluealsa-aplay arguments to systemd services. - Drop some useless FILES varialbes. - Add more PACKAGECONFIGs, explicitly disable the codecs that not supported by Yocto, this is to get a predictible build. - Split out bluealsa-aplay to its own package and disable bluealsa-aplay.service by default, since bluez-alas can be used in many different ways, there is no default usage for it, like sink (BT speaker). Reference: https://patchwork.yoctoproject.org/project/oe/patch/20220604093518.30749-1-liu.ming50@gmail.com Related-to: ELB-4505 Signed-off-by: Ming Liu --- recipes-connectivity/bluez-alsa/bluez-alsa_git.bb | 42 +++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb index 62ff3d6..dd04c2c 100644 --- a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb +++ b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb @@ -3,24 +3,23 @@ HOMEPAGE = "https://github.com/Arkq/bluez-alsa" SECTION = "libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=72d868d66bdd5bf51fe67734431de057" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8449a4f133a93f6254b496d4fb476e83" SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master" -SRCREV = "c9e122547b2ba65ccc16d972a66d2d56ca2f2fe5" -PV = "3.1.0+git${SRCPV}" +SRCREV = "dd05a1baa261b94da9ba977b5e3392c8b4dc7a5e" +PV = "4.0.0+git${SRCPV}" S = "${WORKDIR}/git" -DEPENDS += "alsa-lib bluez5 glib-2.0 sbc" +DEPENDS += "alsa-lib bluez5 dbus glib-2.0 sbc" PACKAGECONFIG ??= "aplay cli hcitop ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" PACKAGECONFIG[a2dpconf] = "--enable-a2dpconf,--disable-a2dpconf" -PACKAGECONFIG[aac] = "--enable-aac,--disable-aac" +PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,fdk-aac" PACKAGECONFIG[aplay] = "--enable-aplay,--disable-aplay" -PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx" PACKAGECONFIG[cli] = "--enable-cli,--disable-cli" -PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,,lcov" +PACKAGECONFIG[coverage] = "--with-coverage,--without-coverage,lcov-native" PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" PACKAGECONFIG[debug-time] = "--enable-debug-time,--disable-debug-time" PACKAGECONFIG[faststream] = "--enable-faststream,--disable-faststream" @@ -31,11 +30,20 @@ PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123,mpg123" 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},--disable-systemd,systemd dbus" +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} \ + --with-systemdbluealsaargs='${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" inherit autotools pkgconfig systemd +EXTRA_OECONF = " \ + --disable-aptx \ + --disable-lc3plus \ + --disable-ldac \ + --disable-manpages \ +" + PACKAGE_BEFORE_PN = "${PN}-aplay" RRECOMMENDS_${PN} = "${PN}-aplay" @@ -48,15 +56,11 @@ SYSTEMD_SERVICE_${PN}-aplay = "bluealsa-aplay.service" SYSTEMD_AUTO_ENABLE_${PN}-aplay = "disable" -# Choose bluez-alsa profiles to be used at runtime -# Supported profiles: a2dp-source a2dp-sink hfp-hf hfp-ag hsp-hs hsp-ag hfp-ofono -# Enable output profiles by default -BLUEZ_ALSA_OPTS ?= "-p a2dp-source -p a2dp-sink -p hfp-ag -p hsp-ag" - -do_install_append () { - # OE specific, it's bluetooth.service being used instead of bluez.service - sed -i -e 's#After=bluez.service#After=bluetooth.service#' ${D}${systemd_system_unitdir}/bluealsa.service +# Choose bluez-alsa 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" - # Set profiles - sed -i -e 's#ExecStart=.*$#ExecStart=${bindir}/bluealsa ${BLUEZ_ALSA_OPTS}#' ${D}${systemd_system_unitdir}/bluealsa.service -} +# Choose bluealsa-aplay arguments to be used in bluealsa-aplay systemd service +# Defaults to be empty: +SYSTEMD_BLUEALSA_APLAY_ARGS ?= "" -- cgit v1.2.3