alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
366 stars 177 forks source link

Question: different install prefixes for libalsa and alsa-plugins? #175

Closed daravi closed 2 years ago

daravi commented 3 years ago

Hello,

I use Conan to manage my dependencies and wanted to add a recipe for alsa-plugins. However it seems that ALSA_CONFIG_DIR can only be set to a single path: https://github.com/conan-io/conan-center-index/pull/7098#discussion_r697920460

So I was wondering if there is any other way I could have alsa and plugins installed in separate directories? (so that they can each have their own config directory)

perexg commented 2 years ago

You may control everything using the global alsa.conf file. You may eventually add your own directory using the environment variable:

diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index e65bf2ca..1cbe0f3d 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -8,6 +8,13 @@
        {
                func load
                files [
+                       {
+                               @func getenv
+                               vars [
+                                       ALSA_EXTRA_CONFIG_DIR
+                               ]
+                               default "/var/lib/alsa-extra/conf.d"
+                       }
                        "/var/lib/alsa/conf.d"
                        "/usr/etc/alsa/conf.d"
                        "/etc/alsa/conf.d"