dai: change error to info in dai_params

Check for prepare state in dai_params. It allows for
configuring multiple host pipelines connected to one
dai pipeline e.g. mixer topology.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-02-13 16:19:21 +01:00 committed by Liam Girdwood
parent e43fa6e44e
commit 09b612e463
1 changed files with 9 additions and 2 deletions

View File

@ -394,10 +394,17 @@ static int dai_params(struct comp_dev *dev)
trace_dai_with_ids(dev, "dai_params()");
/* check if already configured */
if (dev->state == COMP_STATE_PREPARE) {
trace_dai_with_ids(dev, "dai_params() component has been"
"already configured.");
return 0;
}
/* can set params on only init state */
if (dev->state != COMP_STATE_READY) {
trace_dai_error_with_ids(dev, "dai_params() error: Component is"
"not in init state.");
trace_dai_error_with_ids(dev, "dai_params() error: Component"
" is not in init state.");
return -EINVAL;
}