Conversation
Introduce m4/audioreach-paths.m4, defining three directories as both
configure options and make variables:
audioreachconfdir ${sysconfdir}/audioreach
audioreachdatadir ${datadir}/audioreach
audioreachdeltadir ${localstatedir}/lib/audioreach/acdb-delta
Nothing uses them yet; the following commits route the install
directories through them.
The audio stack currently installs unqualified names into the root of
/etc: card-defs.xml here, and plugin_manager.xml and usecaseKvManager.xml
from audioreach-pal. Nothing about "plugin_manager.xml" is
audio-specific, and /etc is a namespace shared with every other package
on the system. /etc/card-defs.xml also does not say what it configures,
whereas ls /etc/audioreach/ is a complete inventory of what is tunable
in the audio stack.
The paths are also hardcoded today, so this package cannot be built
correctly for any prefix but the default: --sysconfdir has no effect.
Distributions that want the historical locations can pass
--with-audioreach-confdir and --with-audioreach-datadir.
The same macro is used by audioreach-graphmgr and audioreach-pal, which
declare the locations of files this package installs. It is copied into
each project rather than shared through a package: it has no
dependencies, and centralising it would give three repos a build-time
dependency on a fourth. This repo holds the canonical copy; bump the
serial when it changes.
Copies live in m4/ and qcom/qli/m4/ because qcom/qli is an independent
AC_INIT sub-package that can be configured standalone.
Signed-off-by: Ali Erdinc Koroglu <ali.koroglu@oss.qualcomm.com>
acdb_cal.acdb and workspaceFileXml.qwsp are read-only vendor data, not
configuration: they are produced offline by QACT and are not edited on
the device. They belong under ${datadir}, not ${sysconfdir}.
/etc/acdbdata/<BOARD>/ -> /usr/share/audioreach/acdbdata/<BOARD>/
qcm6490 has two of these directories -- QCS6490_RB3Gen2 and QCM6490_IDP
-- and both are converted.
audioreach-graphmgr reads this location as -DACDB_PATH and must be
updated to match. Packaging that lists ${sysconfdir}/acdbdata needs
updating too.
Note that ACDB tuning deltas are written at runtime by ATS, so they
cannot live under a read-only /usr; audioreachdeltadir is separate for
that reason and is used by audioreach-graphmgr, not here.
Signed-off-by: Ali Erdinc Koroglu <ali.koroglu@oss.qualcomm.com>
card-defs.xml is integrator-editable configuration, unlike the ACDB blobs installed alongside it, so it uses the configuration directory rather than the data directory. /etc/card-defs.xml -> /etc/audioreach/card-defs.xml This file's location is also declared in audioreach-graphmgr (CARD_DEF_FILE) and audioreach-pal (SNDPARSER), both of which read it. pal cannot delegate the lookup: snd_card_def_get_card() takes a card number and no path. All three must move together, or audio comes up with no card definition and no obvious cause. A compatibility symlink at /etc/card-defs.xml is advisable for one release. $(sysconfdir)/alsa/conf.d in linux/reference is deliberately untouched; that namespace belongs to ALSA. Signed-off-by: Ali Erdinc Koroglu <ali.koroglu@oss.qualcomm.com>
|
I very much support this change, but what else do we need to update, across AudioReach and potentially other consumers, that was expecting to find those files in its original directories? |
|
The problem with Maybe those files should end up in @qti-sbojja What do you think about that? |
Fixes #90.
As discussed in #90, the .acdb and .qwsp files are read-only data generated by
ARC/QACT, not conffiles, so they belong under
${datadir}.card-defs.xmlisgenuinely editable and stays in
/etc, but moves into anaudioreach/subdirectory
/etc/card-defs.xmldoesn't say what it configures, whereasls /etc/audioreach/is a complete inventory of what's tunable.The paths are hardcoded today, so
--sysconfdirhas no effect. The firstcommit adds
m4/audioreach-paths.m4to make them configure options;--with-audioreach-confdirand--with-audioreach-datadirrestore the oldlayout.