[Buildroot] [PATCH 1/1] package/alsa-plugins: add new package alsa-plugins version 1.2.5

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Jul 21 20:19:20 UTC 2021


Hello Charles,

On Mon, 14 Jun 2021 17:59:23 -0700
Charles Hardin <ckhardin at gmail.com> wrote:

> From: Charles Hardin <ckhardin at gmail.com>
> 
> During testing of bluez-alsa in particular, there is no compilation
> dependency - but, some configurations against boards will request
> the load of a particular plugin:
> 
>     ALSA lib dlmisc.c:337:(snd_dlobj_cache_get0) \
>       Cannot open shared library libasound_module_rate_samplerate_best.so \
>       (/usr/lib/alsa-lib/libasound_module_rate_samplerate_best.so: \
>        cannot open shared object file: No such file or directory)
> 
> Adding in the alsa-plugins package will build the appropriate dlobject
> for loading and configuration.
> 
> Signed-off-by: Charles Hardin <ckhardin at gmail.com>

Thanks for your patch. I have applied, but after doing a number of
changes, see below for the details.

First of all, alsa-plugins 1.2.5 did not build against alsa-lib 1.2.4,
as it uses a new API that only appeared in alsa-lib 1.2.5, so I'm not
sure how you could have built alsa-plugins 1.2.5. So as a preparation
patch I have bumped alsa-lib to 1.2.5.1.

>  package/Config.in                      |  1 +
>  package/alsa-plugins/Config.in         |  8 ++++++++
>  package/alsa-plugins/alsa-plugins.hash |  4 ++++
>  package/alsa-plugins/alsa-plugins.mk   | 23 +++++++++++++++++++++++
>  4 files changed, 36 insertions(+)

You forgot to add an entry in the DEVELOPERS file.

> diff --git a/package/alsa-plugins/Config.in b/package/alsa-plugins/Config.in
> new file mode 100644
> index 0000000000..44aaa7997c
> --- /dev/null
> +++ b/package/alsa-plugins/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_ALSA_PLUGINS
> +	bool "alsa-plugins"
> +	depends on BR2_PACKAGE_ALSA_LIB

	select BR2_PACKAGE_ALSA_LIB_HWDEP

was missing.

> +	select BR2_PACKAGE_LIBSAMPLERATE

This is not needed: libsamplerate is not a mandatory dependency.

> diff --git a/package/alsa-plugins/alsa-plugins.mk b/package/alsa-plugins/alsa-plugins.mk
> new file mode 100644
> index 0000000000..70d3cdb87c
> --- /dev/null
> +++ b/package/alsa-plugins/alsa-plugins.mk
> @@ -0,0 +1,23 @@
> +#############################################################
> +#
> +# alsa-plugins
> +#
> +#############################################################

The formatting of this comment was not matching our coding style: make
sure to use "make check-package" when you create a new package.

> +ALSA_PLUGINS_VERSION = 1.2.5
> +ALSA_PLUGINS_SOURCE = alsa-plugins-$(ALSA_PLUGINS_VERSION).tar.bz2
> +ALSA_PLUGINS_SITE = https://www.alsa-project.org/files/pub/plugins
> +ALSA_PLUGINS_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (samplerate)
> +ALSA_PLUGINS_LICENSE_FILES = COPYING COPYING.GPL
> +ALSA_PLUGINS_INSTALL_STAGING = NO

This was not needed as it's the default.

> +ALSA_PLUGINS_AUTORECONF = YES

Not needed, there is an already generate configure script in the
tarball.

> +ALSA_PLUGINS_DEPENDENCIES = alsa-lib libsamplerate
> +
> +ALSA_PLUGINS_CONF_OPTS += \
> +	--enable-samplerate \
> +	--disable-jack \
> +	--disable-usbstream \
> +	--disable-pulseaudio \
> +	--disable-avcodec \
> +	--with-speex=builtin

Then the major change was to make the libsamplerate dependency
optional, as such:

+ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
+ALSA_PLUGINS_CONF_OPTS += --enable-samplerate
+ALSA_PLUGINS_DEPENDENCIES += libsamplerate
+ALSA_PLUGINS_LICENSE += , GPL-2.0+ (samplerate plugin)
+ALSA_PLUGINS_LICENSE_FILES += COPYING.GPL
+else
+ALSA_PLUGINS_CONF_OPTS += --disable-samplerate
+endif

And also I adjusted the list of options to disable a few other things,
or differently.

See the final commit at
https://git.buildroot.org/buildroot/commit/?id=e85bde9cc672fc228eeb079e23ef302468ae3826

If there are build failures on alsa-plugins, you will receive an
e-mail, and it would be nice if you could investigate those build
failures and submit patches fixing them.

Thanks a lot for your contribution!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list