On Tue, 2016-11-15 at 16:02 +0800, mengdong.lin@linux.intel.com wrote:
From: Mengdong Lin mengdong.lin@linux.intel.com
A machine device's verb file (e.g.HiFi) can include configuration files of component devices via alsaconf syntax searchdir:xxx and <file_name>. Then the 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
@@ -306,6 +381,30 @@ static int parse_sequence(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, continue; }
if (strcmp(cmd, "enadev") == 0) {
/* need to enable a component device */
curr->type = SEQUENCE_ELEMENT_TYPE_CMPT_SEQ;
err = parse_component_seq(uc_mgr, n, 1,
&curr->data.cmpt_seq);
if (err < 0) {
uc_error("error: enadev requires a valid device!");
return err;
}
continue;
}
if (strcmp(cmd, "disdev") == 0) {
Do we need to document enadev and disdev anywhere ?
Liam