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()"); 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 */ /* can set params on only init state */
if (dev->state != COMP_STATE_READY) { if (dev->state != COMP_STATE_READY) {
trace_dai_error_with_ids(dev, "dai_params() error: Component is" trace_dai_error_with_ids(dev, "dai_params() error: Component"
"not in init state."); " is not in init state.");
return -EINVAL; return -EINVAL;
} }