mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
ucm: Parse sequence of component devices
A machine device's sequence can enable or disable a component device by keyword 'enadev' and 'disdev' followed the name of the component device. UCM sequence parser will find the component device and mark if its enable or disable sequence is needed by the parent, the machine device. New element type and struct are defined for the sequence of a component device. Component devices will be removed from the machine device list 'device_list' of a verb, since we don't want to expose them to audio servers with original API to list devices for backward compatibility. A new list 'cmpt_device_list' is used for the component devices of a verb. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6bf8447b91
commit
14c930d0c9
3 changed files with 118 additions and 1 deletions
|
|
@ -49,6 +49,7 @@
|
|||
#define SEQUENCE_ELEMENT_TYPE_EXEC 4
|
||||
#define SEQUENCE_ELEMENT_TYPE_CSET_BIN_FILE 5
|
||||
#define SEQUENCE_ELEMENT_TYPE_CSET_TLV 6
|
||||
#define SEQUENCE_ELEMENT_TYPE_CMPT_SEQ 7
|
||||
|
||||
struct ucm_value {
|
||||
struct list_head list;
|
||||
|
|
@ -56,6 +57,12 @@ struct ucm_value {
|
|||
char *data;
|
||||
};
|
||||
|
||||
/* sequence of a component device */
|
||||
struct component_sequence {
|
||||
struct use_case_device *device; /* component device */
|
||||
int enable; /* flag to choose enable or disable list of the device */
|
||||
};
|
||||
|
||||
struct sequence_element {
|
||||
struct list_head list;
|
||||
unsigned int type;
|
||||
|
|
@ -64,6 +71,7 @@ struct sequence_element {
|
|||
char *cdev;
|
||||
char *cset;
|
||||
char *exec;
|
||||
struct component_sequence cmpt_seq; /* component sequence */
|
||||
} data;
|
||||
};
|
||||
|
||||
|
|
@ -167,6 +175,9 @@ struct use_case_verb {
|
|||
/* hardware devices that can be used with this use case */
|
||||
struct list_head device_list;
|
||||
|
||||
/* component device list */
|
||||
struct list_head cmpt_device_list;
|
||||
|
||||
/* modifiers that can be used with this use case */
|
||||
struct list_head modifier_list;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue