diff options
author | Mengdong Lin <mengdong.lin@linux.intel.com> | 2016-10-24 21:22:19 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-10-25 09:26:24 +0200 |
commit | 3a5341e2ac8fe745b8791a04c36a21ae136024bd (patch) | |
tree | 1adc293bd9cf2d8179c6218273fd9cbbc0152e3e | |
parent | c16943868289171deabce8d695990bf75552e178 (diff) | |
download | alsa-lib-3a5341e2ac8fe745b8791a04c36a21ae136024bd.tar.gz |
topology: Add doc for including other files in the text conf file
This patch adds document about how to include other files in the text
configuration files, by alsaconf syntax <xxx> and <searchdir:xxx>.
Users may define common info in separate files (e.g. vendor tokens,
tuples) and share them for different platforms, by including them via
syntax <path/to/configuration-file>. This can save the total size of
files. Users can also specifiy additional configuraiton directories
relative to "/usr/share/alsa/" to search the included files, via syntax
<searchdir:relative-path/to/usr/share/alsa>.
The alsaconf will search and open an included file in the following order
of priority:
1. directly open the file by its name;
2. search for the file name in "/usr/share/alsa";
3. search for the file name in user specified subdirectories under
"/usr/share/alsa".
The order of the included files need not to be same as their dependencies,
because the toplogy library will load all of them before parsing their
dependencies.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/topology.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/topology.h b/include/topology.h index a0d018e4..4f606c75 100644 --- a/include/topology.h +++ b/include/topology.h @@ -624,6 +624,36 @@ extern "C" { * data "name" # optional private data * } * </pre> + * + * <h4>Include other files</h4> + * Users may include other files in a text conf file via alsaconf syntax + * <path/to/configuration-file>. This allows users to define common info + * in separate files (e.g. vendor tokens, tuples) and share them for + * different platforms, thus save the total size of config files. <br> + * Users can also specifiy additional configuraiton directories relative + * to "/usr/share/alsa/" to search the included files, via alsaconf syntax + * <searchfdir:/relative-path/to/usr/share/alsa>. <br><br> + * + * For example, file A and file B are two text conf files for platform X, + * they will be installed to /usr/share/alsa/topology/platformx. If we + * need file A to include file B, in file A we can add: <br> + * + * <searchdir:topology/platformx> <br> + * <name-of-file-B> <br><br> + * + * ALSA conf will search and open an included file in the following order + * of priority: + * 1. directly open the file by its name; + * 2. search for the file name in "/usr/share/alsa"; + * 3. search for the file name in user specified subdirectories under + * "/usr/share/alsa". + * + * The order of the included files need not to be same as their + * dependencies, since the topology library will load them all before + * parsing their dependencies. <br> + * + * The configuration directories defined by a file will only be used to search + * the files included by this file. */ /** Maximum number of channels supported in one control */ |