mirror of https://github.com/thesofproject/sof.git
kpb: block KPB prepare() if reset is not done
This patch checks if reset request has been completed before KPB can be prepared again. Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
parent
f27cd973f1
commit
7c4764cfa4
|
@ -337,6 +337,13 @@ static int kpb_prepare(struct comp_dev *dev)
|
||||||
|
|
||||||
trace_kpb("kpb_prepare()");
|
trace_kpb("kpb_prepare()");
|
||||||
|
|
||||||
|
if (kpb->state == KPB_STATE_RESETTING ||
|
||||||
|
kpb->state == KPB_STATE_RESET_FINISHING) {
|
||||||
|
trace_kpb_error("kpb_prepare() error: can not prepare KPB "
|
||||||
|
"due to ongoing reset.");
|
||||||
|
return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
ret = comp_set_state(dev, COMP_TRIGGER_PREPARE);
|
ret = comp_set_state(dev, COMP_TRIGGER_PREPARE);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue