[alsa-devel] [BUG] src/conf/alsa.conf: Hard-coded path `/etc/asound.conf`, needs `@func sysconfdir`.

Takashi Iwai tiwai at suse.de
Mon Mar 20 13:46:55 CET 2017


On Sun, 05 Mar 2017 19:17:55 +0100,
Alain Kalker wrote:
> 
> The file `src/conf/alsa.conf` contains the hard-coded path
> `/etc/asound.conf`, which in some use cases may not be correct.
> 
> One particular use case: Termux[1], a "Linux subsystem for Android",
> plans to use ALSA plugins to communicate with the OpenSL ES
> implementation in Android. In doing so, it needs to not conflict with
> any vendor provided ALSA implentation, which could conceivably use an
> `/etc/asound.conf` of its own. At any rate, the system `/etc`
> directory is normally not writable by non-root users of Android.
> 
> I would suggest adding a `snd_func_sysconfdir` in `src/confmisc.c
> (analogous to `snd_func_datadir`) so packagers and users can place a
> global `asound.conf` file in a directory to which they have write
> access and which doesn't conflict with the systems ALSA.
> The desired path can already be specified at build time by using
> `./configure --sysconfdir=<dir>`, which conveniently defaults to
> PREFIX/etc in any case. It is available as configure variable:
> `sysconfdir='${prefix}/etc'`, and only needs to be substituted to be
> available to `src/confmisc.c`.

Maybe an easier fix would be to replace it from
src/conf/alsa.conf.in.


Takashi


More information about the Alsa-devel mailing list