From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
tiwai@suse.de, hardik.t.shah@intel.com,
guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com,
vinod.koul@intel.com, broonie@kernel.org, mengdong.lin@intel.com
Subject: [PATCH v4 3/3] topology: Add doc for including other files in the text conf file
Date: Mon, 24 Oct 2016 21:22:19 +0800 [thread overview]
Message-ID: <6cc1f68b2d71bacaaca9ac5b5226fca59da161bb.1477315063.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1477315063.git.mengdong.lin@linux.intel.com>
From: Mengdong Lin <mengdong.lin@linux.intel.com>
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>
diff --git a/include/topology.h b/include/topology.h
index a0d018e..4f606c7 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 */
--
2.5.0
prev parent reply other threads:[~2016-10-24 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 13:18 [PATCH v4 0/3] topology: Support widgets' stream name and file inclusion for text conf file mengdong.lin
2016-10-24 13:22 ` [PATCH v4 1/3] topology: Fix missing stream name of widgets in " mengdong.lin
2016-10-24 13:22 ` [PATCH v4 2/3] alsaconf: Search included files under user specified configuration directories mengdong.lin
2016-10-24 13:22 ` mengdong.lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6cc1f68b2d71bacaaca9ac5b5226fca59da161bb.1477315063.git.mengdong.lin@linux.intel.com \
--to=mengdong.lin@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=guneshwor.o.singh@intel.com \
--cc=hardik.t.shah@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=mengdong.lin@intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).