Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package
@ 2023-06-20 17:38 Charles Hardin
  2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Charles Hardin @ 2023-06-20 17:38 UTC (permalink / raw)
  To: buildroot; +Cc: Charles Hardin

The alsa-utils will remove and create the /usr/share/alsa dir
as a whole and since the alsa plugins needs to add config into
this same directory it should come after those install steps.

Also, the bluez alsa needs the plugins installed to find them
during the configuration phases - so, interlock the plugins
when configured.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
---
 package/alsa-plugins/alsa-plugins.mk | 4 ++++
 package/bluez-alsa/bluez-alsa.mk     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/package/alsa-plugins/alsa-plugins.mk b/package/alsa-plugins/alsa-plugins.mk
index 5728ebfe37..d23a81c5ee 100644
--- a/package/alsa-plugins/alsa-plugins.mk
+++ b/package/alsa-plugins/alsa-plugins.mk
@@ -20,6 +20,10 @@ ALSA_PLUGINS_CONF_OPTS = \
 	--disable-maemo-resource-manager \
 	--with-speex=no
 
+ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
+ALSA_PLUGINS_DEPENDENCIES += alsa-utils
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
 ALSA_PLUGINS_CONF_OPTS += --enable-samplerate
 ALSA_PLUGINS_DEPENDENCIES += libsamplerate
diff --git a/package/bluez-alsa/bluez-alsa.mk b/package/bluez-alsa/bluez-alsa.mk
index 83dfce6177..649810b0ad 100644
--- a/package/bluez-alsa/bluez-alsa.mk
+++ b/package/bluez-alsa/bluez-alsa.mk
@@ -20,6 +20,10 @@ BLUEZ_ALSA_CONF_OPTS = \
 	--with-alsaplugindir=/usr/lib/alsa-lib \
 	--with-alsaconfdir=/etc/alsa/conf.d
 
+ifeq ($(BR2_PACKAGE_ALSA_PLUGINS),y)
+BLUEZ_ALSA_DEPENDENCIES += alsa-plugins
+endif
+
 ifeq ($(BR2_PACKAGE_FDK_AAC),y)
 BLUEZ_ALSA_DEPENDENCIES += fdk-aac
 BLUEZ_ALSA_CONF_OPTS += --enable-aac
-- 
2.39.2 (Apple Git-143)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins
  2023-06-20 17:38 [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Charles Hardin
@ 2023-06-20 17:38 ` Charles Hardin
  2023-06-25 20:04   ` Arnout Vandecappelle via buildroot
  2023-07-02 20:17   ` [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback Charles Hardin
  2023-06-25 19:57 ` [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Arnout Vandecappelle via buildroot
  2023-07-16  6:15 ` Peter Korsgaard
  2 siblings, 2 replies; 7+ messages in thread
From: Charles Hardin @ 2023-06-20 17:38 UTC (permalink / raw)
  To: buildroot; +Cc: Charles Hardin

During the execution of the alsa plugins on a test application,
the library would not function without samplerate being enabled
and present. So, this is a patch to just include the samplerate
since the latest versions seem to require it for the plugins to
work.

There might be another fix instead of this patch, but this got
the sound to play for the bluez alsa stack as expected.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
---
 package/alsa-plugins/Config.in       |  1 +
 package/alsa-plugins/alsa-plugins.mk | 22 ++++++----------------
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/package/alsa-plugins/Config.in b/package/alsa-plugins/Config.in
index ee0fb4c1d5..e85ff218dd 100644
--- a/package/alsa-plugins/Config.in
+++ b/package/alsa-plugins/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_ALSA_PLUGINS
 	bool "alsa-plugins"
 	depends on BR2_PACKAGE_ALSA_LIB
 	select BR2_PACKAGE_ALSA_LIB_HWDEP
+	select BR2_PACKAGE_LIBSAMPLERATE
 	help
 	  Advanced Linux Sound Architecture Plugins
 
diff --git a/package/alsa-plugins/alsa-plugins.mk b/package/alsa-plugins/alsa-plugins.mk
index d23a81c5ee..8046720297 100644
--- a/package/alsa-plugins/alsa-plugins.mk
+++ b/package/alsa-plugins/alsa-plugins.mk
@@ -7,30 +7,20 @@
 ALSA_PLUGINS_VERSION = 1.2.7.1
 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+
-ALSA_PLUGINS_LICENSE_FILES = COPYING
-ALSA_PLUGINS_DEPENDENCIES = host-pkgconf alsa-lib
+ALSA_PLUGINS_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (samplerate)
+ALSA_PLUGINS_LICENSE_FILES = COPYING COPYING.GPL
+ALSA_PLUGINS_DEPENDENCIES = host-pkgconf alsa-lib libsamplerate
 
 ALSA_PLUGINS_CONF_OPTS = \
+	--enable-samplerate \
 	--disable-jack \
 	--disable-usbstream \
 	--disable-pulseaudio \
-	--disable-libav \
-	--disable-maemo-plugin \
-	--disable-maemo-resource-manager \
-	--with-speex=no
+	--disable-avcodec \
+	--with-speex=builtin
 
 ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
 ALSA_PLUGINS_DEPENDENCIES += alsa-utils
 endif
 
-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
-
 $(eval $(autotools-package))
-- 
2.39.2 (Apple Git-143)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package
  2023-06-20 17:38 [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Charles Hardin
  2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
@ 2023-06-25 19:57 ` Arnout Vandecappelle via buildroot
  2023-07-16  6:15 ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2023-06-25 19:57 UTC (permalink / raw)
  To: Charles Hardin, buildroot



On 20/06/2023 19:38, Charles Hardin wrote:
> The alsa-utils will remove and create the /usr/share/alsa dir
> as a whole and since the alsa plugins needs to add config into
> this same directory it should come after those install steps.
> 
> Also, the bluez alsa needs the plugins installed to find them
> during the configuration phases - so, interlock the plugins
> when configured.
> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/alsa-plugins/alsa-plugins.mk | 4 ++++
>   package/bluez-alsa/bluez-alsa.mk     | 4 ++++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/package/alsa-plugins/alsa-plugins.mk b/package/alsa-plugins/alsa-plugins.mk
> index 5728ebfe37..d23a81c5ee 100644
> --- a/package/alsa-plugins/alsa-plugins.mk
> +++ b/package/alsa-plugins/alsa-plugins.mk
> @@ -20,6 +20,10 @@ ALSA_PLUGINS_CONF_OPTS = \
>   	--disable-maemo-resource-manager \
>   	--with-speex=no
>   
> +ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
> +ALSA_PLUGINS_DEPENDENCIES += alsa-utils
> +endif
> +
>   ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
>   ALSA_PLUGINS_CONF_OPTS += --enable-samplerate
>   ALSA_PLUGINS_DEPENDENCIES += libsamplerate
> diff --git a/package/bluez-alsa/bluez-alsa.mk b/package/bluez-alsa/bluez-alsa.mk
> index 83dfce6177..649810b0ad 100644
> --- a/package/bluez-alsa/bluez-alsa.mk
> +++ b/package/bluez-alsa/bluez-alsa.mk
> @@ -20,6 +20,10 @@ BLUEZ_ALSA_CONF_OPTS = \
>   	--with-alsaplugindir=/usr/lib/alsa-lib \
>   	--with-alsaconfdir=/etc/alsa/conf.d
>   
> +ifeq ($(BR2_PACKAGE_ALSA_PLUGINS),y)
> +BLUEZ_ALSA_DEPENDENCIES += alsa-plugins
> +endif
> +
>   ifeq ($(BR2_PACKAGE_FDK_AAC),y)
>   BLUEZ_ALSA_DEPENDENCIES += fdk-aac
>   BLUEZ_ALSA_CONF_OPTS += --enable-aac
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins
  2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
@ 2023-06-25 20:04   ` Arnout Vandecappelle via buildroot
  2023-07-02 20:17   ` [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback Charles Hardin
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2023-06-25 20:04 UTC (permalink / raw)
  To: Charles Hardin, buildroot



On 20/06/2023 19:38, Charles Hardin wrote:
> During the execution of the alsa plugins on a test application,
> the library would not function without samplerate being enabled
> and present. So, this is a patch to just include the samplerate
> since the latest versions seem to require it for the plugins to
> work.

  It doesn't sound unreasonable that some plugins require samplerate, but it 
seems unlikely that none of them work without libsamplerate...


> There might be another fix instead of this patch, but this got
> the sound to play for the bluez alsa stack as expected.

  If it's just for bluez, then it sounds more logical to do it in bluez-alsa?

  Regards,
  Arnout

> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>
> ---
>   package/alsa-plugins/Config.in       |  1 +
>   package/alsa-plugins/alsa-plugins.mk | 22 ++++++----------------
>   2 files changed, 7 insertions(+), 16 deletions(-)
> 
> diff --git a/package/alsa-plugins/Config.in b/package/alsa-plugins/Config.in
> index ee0fb4c1d5..e85ff218dd 100644
> --- a/package/alsa-plugins/Config.in
> +++ b/package/alsa-plugins/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_ALSA_PLUGINS
>   	bool "alsa-plugins"
>   	depends on BR2_PACKAGE_ALSA_LIB
>   	select BR2_PACKAGE_ALSA_LIB_HWDEP
> +	select BR2_PACKAGE_LIBSAMPLERATE
>   	help
>   	  Advanced Linux Sound Architecture Plugins
>   
> diff --git a/package/alsa-plugins/alsa-plugins.mk b/package/alsa-plugins/alsa-plugins.mk
> index d23a81c5ee..8046720297 100644
> --- a/package/alsa-plugins/alsa-plugins.mk
> +++ b/package/alsa-plugins/alsa-plugins.mk
> @@ -7,30 +7,20 @@
>   ALSA_PLUGINS_VERSION = 1.2.7.1
>   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+
> -ALSA_PLUGINS_LICENSE_FILES = COPYING
> -ALSA_PLUGINS_DEPENDENCIES = host-pkgconf alsa-lib
> +ALSA_PLUGINS_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (samplerate)
> +ALSA_PLUGINS_LICENSE_FILES = COPYING COPYING.GPL
> +ALSA_PLUGINS_DEPENDENCIES = host-pkgconf alsa-lib libsamplerate
>   
>   ALSA_PLUGINS_CONF_OPTS = \
> +	--enable-samplerate \
>   	--disable-jack \
>   	--disable-usbstream \
>   	--disable-pulseaudio \
> -	--disable-libav \
> -	--disable-maemo-plugin \
> -	--disable-maemo-resource-manager \
> -	--with-speex=no
> +	--disable-avcodec \
> +	--with-speex=builtin
>   
>   ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
>   ALSA_PLUGINS_DEPENDENCIES += alsa-utils
>   endif
>   
> -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
> -
>   $(eval $(autotools-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback
  2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
  2023-06-25 20:04   ` Arnout Vandecappelle via buildroot
@ 2023-07-02 20:17   ` Charles Hardin
  2023-07-03 19:17     ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 7+ messages in thread
From: Charles Hardin @ 2023-07-02 20:17 UTC (permalink / raw)
  To: buildroot; +Cc: Charles Hardin

In the case of the bluetooth audio then incoming stream will be coming
from bluetooth devices at varying sample rates like (44.1, 48, 96, 192 kHz)
and the odds of a sound device matching that samplerate exactly
is a bit slim. So in the case of a bluez audio playback the system will
need to do a samplerate conversion.

Thus when enabling bluez-alsa and the alsa plugins select libsamplerate
to support the shift from the incoming samplerates to an often fix-rated
audio device.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
---
Changes v1 -> v2:
  - moved the samplerate selection to bluez-alsa

 package/bluez-alsa/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/bluez-alsa/Config.in b/package/bluez-alsa/Config.in
index 73ae3d5333..748c4b8820 100644
--- a/package/bluez-alsa/Config.in
+++ b/package/bluez-alsa/Config.in
@@ -13,6 +13,7 @@ config BR2_PACKAGE_BLUEZ_ALSA
 	select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_SBC
+	select BR2_PACKAGE_LIBSAMPLERATE if BR2_PACKAGE_ALSA_PLUGINS
 	help
 	  Bluetooth Audio ALSA Backend.
 
-- 
2.39.2 (Apple Git-143)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback
  2023-07-02 20:17   ` [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback Charles Hardin
@ 2023-07-03 19:17     ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-03 19:17 UTC (permalink / raw)
  To: Charles Hardin; +Cc: buildroot

On Sun,  2 Jul 2023 13:17:36 -0700
Charles Hardin <ckhardin@gmail.com> wrote:

> In the case of the bluetooth audio then incoming stream will be coming
> from bluetooth devices at varying sample rates like (44.1, 48, 96, 192 kHz)
> and the odds of a sound device matching that samplerate exactly
> is a bit slim. So in the case of a bluez audio playback the system will
> need to do a samplerate conversion.
> 
> Thus when enabling bluez-alsa and the alsa plugins select libsamplerate
> to support the shift from the incoming samplerates to an often fix-rated
> audio device.
> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>
> ---
> Changes v1 -> v2:
>   - moved the samplerate selection to bluez-alsa

I've added a small comment in the Config.in file to explain this
select, and applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package
  2023-06-20 17:38 [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Charles Hardin
  2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
  2023-06-25 19:57 ` [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Arnout Vandecappelle via buildroot
@ 2023-07-16  6:15 ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2023-07-16  6:15 UTC (permalink / raw)
  To: Charles Hardin; +Cc: buildroot

>>>>> "Charles" == Charles Hardin <ckhardin@gmail.com> writes:

 > The alsa-utils will remove and create the /usr/share/alsa dir
 > as a whole and since the alsa plugins needs to add config into
 > this same directory it should come after those install steps.

 > Also, the bluez alsa needs the plugins installed to find them
 > during the configuration phases - so, interlock the plugins
 > when configured.

 > Signed-off-by: Charles Hardin <ckhardin@gmail.com>

Committed to 2023.02.x and 2023.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-07-16  6:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20 17:38 [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Charles Hardin
2023-06-20 17:38 ` [Buildroot] [PATCH 2/2] package/alsa-plugins: require libsamplerate for the plugins Charles Hardin
2023-06-25 20:04   ` Arnout Vandecappelle via buildroot
2023-07-02 20:17   ` [Buildroot] [PATCH v2 1/1] package/bluez-alsa: allow a samplerate conversion for audio playback Charles Hardin
2023-07-03 19:17     ` Thomas Petazzoni via buildroot
2023-06-25 19:57 ` [Buildroot] [PATCH 1/2] package/alsa-plugins: fix dependencies for the alsa plugin package Arnout Vandecappelle via buildroot
2023-07-16  6:15 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox