From: Mengdong Lin Date: Thu, 7 Apr 2016 07:29:15 +0000 (+0800) Subject: topology: Add doc for vendor tuples X-Git-Tag: v1.1.2~148 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2fd8d388f530b03872d8afb51b0f98c6474646c7;p=alsa-lib.git topology: Add doc for vendor tuples Describe how to define vendor tokens and tuples in the text conf file. Signed-off-by: Mengdong Lin Signed-off-by: Takashi Iwai --- diff --git a/include/topology.h b/include/topology.h index 011f6ae7..51d282f6 100644 --- a/include/topology.h +++ b/include/topology.h @@ -203,12 +203,77 @@ extern "C" { * bytes "0x12,0x34,0x56,0x78" * shorts "0x1122,0x3344,0x5566,0x7788" * words "0xaabbccdd,0x11223344,0x66aa77bb,0xefef1234" + * tuples "section id of the vendor tuples" * }; * - * The file, bytes, shorts and words keywords are all mutually exclusive as - * the private data should only be taken from one source. The private data can - * either be read from a separate file or defined in the topology file using - * the bytes, shorts or words keywords. + * The file, bytes, shorts, words and tuples keywords are all mutually + * exclusive as the private data should only be taken from one source. + * The private data can either be read from a separate file or defined in + * the topology file using the bytes, shorts, words or tuples keywords. + * The keyword tuples is to define vendor specific tuples. Please refer to + * section Vendor Tokens and Vendor tuples. + * + *
Vendor Tokens
+ * A vendor token list is defined as a new section. Each token element is + * a pair of string ID and integer value. And both the ID and value are + * vendor-specific. + * + *
+ * SectionVendorTokens."id of the vendor tokens" {
+ *	comment "optional comments"
+ *	VENDOR_TOKEN_ID1 "1"
+ *	VENDOR_TOKEN_ID2 "2"
+ *	VENDOR_TOKEN_ID3 "3"
+ *	...
+ * }
+ * 
+ * + *
Vendor Tuples
+ * Vendor tuples are defined as a new section. It contains a reference to + * a vendor token list and several tuple arrays. + * All arrays share a vendor token list, defined by the tokens keyword. + * Each tuple array is for a specific type, defined by the string following + * the tuples keyword. Supported types are: string, uuid, bool, byte, + * short and word. + * + *
+ * SectionVendorTuples."id of the vendor tuples" {
+ *	tokens "id of the vendor tokens"
+ *
+ *	tuples."string" {
+ *		VENDOR_TOKEN_ID1 "character string"
+ *		...
+ *	}
+ *
+ *	tuples."uuid" {
+ *		VENDOR_TOKEN_ID2 "16 character uuid"
+ *		...
+ *	}
+ *
+ *	tuples."bool" {
+ *		VENDOR_TOKEN_ID3 "true/false"
+ *		...
+ *	}
+ *
+ *	tuples."byte" {
+ *		VENDOR_TOKEN_ID4 "0x11"
+ *		VENDOR_TOKEN_ID5 "0x22"
+ *		...
+ *	}
+ *
+ *	tuples."short" {
+ *		VENDOR_TOKEN_ID6 "0x1122"
+ *		VENDOR_TOKEN_ID7 "0x3344"
+ *		...
+ *	}
+ *
+ *	tuples."word" {
+ *		VENDOR_TOKEN_ID8 "0x11223344"
+ *		VENDOR_TOKEN_ID9 "0x55667788"
+ *		...
+ *	}
+ * }
+ * 
* *
Mixer Controls
* A mixer control is defined as a new section that can include channel mapping, @@ -389,6 +454,10 @@ extern "C" { * fields are the same for widgets as they are for controls whilst the other * fields map on very closely to the driver widget fields. * + *
Widget Private Data
+ * Widget can have private data. For the format of the private data, please + * refer to section Control Private Data. + * *

PCM Capabilities

* Topology can also define the capabilities of FE and BE PCMs. Capabilities * can be defined with the following section :-