Skip to contentSkip to conversation

topology: Allow a data section to contain multiple tuples objects

PATCH RESEND Applied [email protected] 2 participants 2 messages Apr 27, 2017

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 topology: Allow a data section to contain multiple tuples objects

From: Mengdong Lin <[email protected]>

It's easy to use a vendor tuples object to define a C structure instance as vendor specific parameter for kernel drivers. And sometimes the kernel drivers may want a group of structures. So this patch will allow user to define multiple vendor tuples objects in a data section, to avoid defining multiple data sections and each data section only has 1 vendor tuples object.

There is no ABI change in this patch.

---
 include/topology.h  | 14 ++++++++++
 src/topology/data.c | 78 ++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 74 insertions(+), 18 deletions(-)
include/topology.h +14 -0
index 1bebe1e..ccb3a00 100644
@@ -214,6 +214,20 @@ extern "C" {
  * The keyword tuples is to define vendor specific tuples. Please refer to
  * section Vendor Tokens and Vendor tuples.
  *
+ * It's easy to use a vendor tuples object to define a C structure instance.
+ * And a data section can include multiple vendor tuples objects:
+ *
+ * <pre>
+ * SectionData."data element name" {
+ *	index "1"	#Index number
+ *	tuples [
+ *		"id of the 1st vendor tuples section"
+ *		"id of the 2nd vendor tuples section"
+ *		...
+ *	]
+ * };
+ * </pre>
+ *
  * <h5>How to define an element with private data</h5>
  * An element can refer to a single data section or multiple data
  * sections.
src/topology/data.c +60 -18

131 lines not on this page · raw message

Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 9 lines · On Thu, 27 Apr 2017 08:46:00 +0200, [email protected] wrote:

From: Mengdong Lin <[email protected]>

It's easy to use a vendor tuples object to define a C structure instance as vendor specific parameter for kernel drivers. And sometimes the kernel drivers may want a group of structures. So this patch will allow user to define multiple vendor tuples objects in a data section, to avoid defining multiple data sections and each data section only has 1 vendor tuples object.

Quoted 4 lines

There is no ABI change in this patch.

Applied, thanks.

Takashi