From: Takashi Iwai Subject: Re: [BUG] src/conf/alsa.conf: Hard-coded path `/etc/asound.conf`, needs `@func sysconfdir`. Date: Mon, 20 Mar 2017 13:46:55 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B10AE266D9D for ; Mon, 20 Mar 2017 13:46:56 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Alain Kalker Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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=`, 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