ucm: Execute sequence of component devices

A machine device's sequence can enable or disable a component device. So
when executing a machine device's sequence, the enable or disable sequence
of its component devices will also be excecuted.

Components don't define card device cdev in their sequences. So before
executing a component device sequence, UCM manager will
- store cdev defined by the sequence of its parent, the machine device;
- mark itself entering 'component domain'.

Then this cdev will be used to excute the sequence of the component
device.

When UCM manager completes executing the sequence of the component device,
it will leave 'compnent domain' and reset the saved cdev to NULL.

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:
Mengdong Lin 2016-11-28 13:34:21 +08:00 committed by Takashi Iwai
parent 14c930d0c9
commit 60b68cb47e
2 changed files with 85 additions and 1 deletions

View file

@ -212,6 +212,14 @@ struct snd_use_case_mgr {
/* change to list of ctl handles */
snd_ctl_t *ctl;
char *ctl_dev;
/* Components don't define cdev, the card device. When executing
* a sequence of a component device, ucm manager enters component
* domain and needs to provide cdev to the component. This cdev
* should be defined by the machine, parent of the component.
*/
int in_component_domain;
char *cdev;
};
#define uc_error SNDERR