alsa-lib: require thread support
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 18 Sep 2012 07:21:37 +0000 (07:21 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 20 Sep 2012 19:50:21 +0000 (21:50 +0200)
Some parts of alsa-lib correctly use threads only when available, but
some other parts, especially certain PCM plugins, unconditionally
require threads. While it would certainly be possible to fix alsa-lib
to only use threads when available, it probably doesn't make much
sense, since on an embedded system that has audio, we are probably
powerful enough to enable thread support in the C library.

Fixes:

  http://autobuild.buildroot.org/results/e14469be7f6171f4c8c0c09c8e32943819f7938b/build-end.log

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/alsa-lib/Config.in
package/bluez_utils/Config.in
package/multimedia/alsa-utils/Config.in
package/multimedia/mpd/Config.in
package/portaudio/Config.in
package/qt/Config.in

index 8123b5f3e5cfa44903afb3ef2c1ef82577d9ebf1..ca063d856050a8b2e5e4d43be41291c7a48e972c 100644 (file)
@@ -4,12 +4,20 @@ config BR2_PACKAGE_ALSA_LIB
        # https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913
        # is fixed
        select BR2_PACKAGE_ALSA_LIB_PCM
+       # Even though some parts of alsa-lib use threads only when
+       # available, some PCM plugins use them unconditionally. Since
+       # the usage of alsa-lib on no-thread systems is pretty
+       # unlikely, just require thread support globally for alsa-lib.
+       depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
          functionality to the Linux operating system.
 
          http://www.alsa-project.org/
 
+comment "alsa-lib needs threads support in toolchain"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 if BR2_PACKAGE_ALSA_LIB
 
 config BR2_PACKAGE_ALSA_LIB_PYTHON
index d63284d26b967440b8f5bcf4531536cb8adff821..9836b211ecff77d5f1d2cf7ddb1904aa7aee0be1 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_BLUEZ_UTILS
        bool "bluez-utils"
        depends on BR2_USE_WCHAR # libglib2
-       depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
+       depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib
        select BR2_PACKAGE_DBUS
        select BR2_PACKAGE_LIBGLIB2
        help
index c65e33f83dbbcfb79637993306f9830ebdef59fe..4bc12049e832628b051c91e860abc42ded3322fb 100644 (file)
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_ALSA_UTILS
        bool "alsa-utils"
        depends on BR2_LARGEFILE
+       depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
        select BR2_PACKAGE_ALSA_LIB
        help
          This package contains the command line utilities for the ALSA
@@ -8,8 +9,8 @@ config BR2_PACKAGE_ALSA_UTILS
 
          http://www.alsa-project.org/
 
-comment "alsa-utils requires a toolchain with LARGEFILE support"
-       depends on !BR2_LARGEFILE
+comment "alsa-utils requires a toolchain with LARGEFILE and threads support"
+       depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
 
 if BR2_PACKAGE_ALSA_UTILS
 menu "ALSA utils selection"
index c7c0cd71a2c50088b4b73ab88171be7151e2387c..5d0818299fd88774125c5fe0cae8107f9dce0782 100644 (file)
@@ -21,6 +21,7 @@ config BR2_PACKAGE_MPD_ALSA
        select BR2_PACKAGE_ALSA_LIB
        select BR2_PACKAGE_ALSA_LIB_PCM
        select BR2_PACKAGE_ALSA_LIB_MIXER
+       depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
        help
          Enable alsa output support.
 
index f91acc0a28a686ffb25b9ffa3c468748bc5e1a18..df884a7f70ba45f7c81385813c6c24af24fabcf1 100644 (file)
@@ -11,6 +11,7 @@ if BR2_PACKAGE_PORTAUDIO
 config BR2_PACKAGE_PORTAUDIO_ALSA
        bool "alsa support"
        select BR2_PACKAGE_ALSA_LIB
+       depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
        default y
        help
          Compile with ALSA support.
index b75f2243ff26d88414136b77ab8792b6676f0da0..b99bf4c1953690081497d22a7b2d71a29c9d1f12 100644 (file)
@@ -315,6 +315,7 @@ config BR2_PACKAGE_QT_AUDIO_BACKEND
        bool "QtMultimedia Audio backend"
        depends on BR2_PACKAGE_QT_MULTIMEDIA
        select BR2_PACKAGE_ALSA_LIB
+       depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
        help
          Build the ALSA audio backend into QtMultimedia