All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/alsa-plugins: add new package alsa-plugins version 1.2.5
@ 2021-06-15  0:59 Charles Hardin
  2021-07-21 20:19 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Hardin @ 2021-06-15  0:59 UTC (permalink / raw)
  To: buildroot

From: Charles Hardin <ckhardin@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@gmail.com>
---
 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(+)
 create mode 100644 package/alsa-plugins/Config.in
 create mode 100644 package/alsa-plugins/alsa-plugins.hash
 create mode 100644 package/alsa-plugins/alsa-plugins.mk

diff --git a/package/Config.in b/package/Config.in
index e42f579494..26adcd53f2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1291,6 +1291,7 @@ menu "Libraries"
 
 menu "Audio/Sound"
 	source "package/alsa-lib/Config.in"
+	source "package/alsa-plugins/Config.in"
 	source "package/alure/Config.in"
 	source "package/aubio/Config.in"
 	source "package/bcg729/Config.in"
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_LIBSAMPLERATE
+	help
+	  Advanced Linux Sound Architecture Plugins
+
+	  http://www.alsa-project.org/
diff --git a/package/alsa-plugins/alsa-plugins.hash b/package/alsa-plugins/alsa-plugins.hash
new file mode 100644
index 0000000000..8ecbd19965
--- /dev/null
+++ b/package/alsa-plugins/alsa-plugins.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  42eef98433d2c8d11f1deeeb459643619215a75aa5a5bbdd06a794e4c413df20  alsa-plugins-1.2.5.tar.bz2
+sha256  32434afcc8666ba060e111d715bfdb6c2d5dd8a35fa4d3ab8ad67d8f850d2f2b  COPYING
+sha256  231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c  COPYING.GPL
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
+#
+#############################################################
+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
+ALSA_PLUGINS_AUTORECONF = YES
+ALSA_PLUGINS_DEPENDENCIES = alsa-lib libsamplerate
+
+ALSA_PLUGINS_CONF_OPTS += \
+	--enable-samplerate \
+	--disable-jack \
+	--disable-usbstream \
+	--disable-pulseaudio \
+	--disable-avcodec \
+	--with-speex=builtin
+
+$(eval $(autotools-package))
-- 
2.30.1 (Apple Git-130)

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

* Re: [Buildroot] [PATCH 1/1] package/alsa-plugins: add new package alsa-plugins version 1.2.5
  2021-06-15  0:59 [Buildroot] [PATCH 1/1] package/alsa-plugins: add new package alsa-plugins version 1.2.5 Charles Hardin
@ 2021-07-21 20:19 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-07-21 20:19 UTC (permalink / raw)
  To: Charles Hardin; +Cc: buildroot

Hello Charles,

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

> From: Charles Hardin <ckhardin@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@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
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-07-21 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15  0:59 [Buildroot] [PATCH 1/1] package/alsa-plugins: add new package alsa-plugins version 1.2.5 Charles Hardin
2021-07-21 20:19 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.