topology2: add PCM class

Add class definition for pcm, pcm object
can be instantiated as:
    Object.PCM.pcm."N" {
	id		2
	pcm_name	"Headset"
	direction	"playback"
    }

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
This commit is contained in:
Chao Song 2021-07-07 15:03:06 +08:00 committed by Liam Girdwood
parent 6053a4ffef
commit ae80d3b8af
1 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,61 @@
#
# PCM Class definition. All attributes defined herein are namespaced
# by alsatplg to "Object.PCM.pcm.N.attribute_name".
#
# Usage: PCM object can be instantiated as:
#
# Object.PCM.pcm."N" {
# id 2
# pcm_name "Headset"
# direction "playback"
# }
#
# where N is the unique instance number for the PCM object within the same alsaconf node.
Class.PCM."pcm" {
# PCM name
DefineAttribute."name" {}
# PCM id
DefineAttribute."id" {}
DefineAttribute."direction" {
constraints {
valid_values [
playback
capture
duplex
]
}
}
DefineAttribute."compress" {}
DefineAttribute."playback_compatible_d0i3" {
# Token reference and type
token_ref "sof_tkn_stream.bool"
}
DefineAttribute."capture_compatible_d0i3" {
# Token reference and type
token_ref "sof_tkn_stream.bool"
}
attributes {
!constructor [
"name"
"id"
"direction"
]
#
# pcm objects instantiated within the same alsaconf node must have unique
# id attribute
#
unique "id"
}
# Default values for PCM attributes
compress "false"
}