kpb: extend internal states

This commit adds more detailed states into KPB

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
Marcin Rajwa 2019-07-25 22:10:25 +02:00 committed by Janusz Jankowski
parent 6027b3e5f7
commit 9f746c01c0
2 changed files with 13 additions and 4 deletions

View File

@ -139,12 +139,15 @@ static struct comp_dev *kpb_new(struct sof_ipc_comp *comp)
return NULL;
}
dev->state = COMP_STATE_READY;
kpb->history_buffer = NULL;
/* Zero number of clients */
/* Init basic component data */
kpb->history_buffer = NULL;
kpb->kpb_no_of_clients = 0;
/* Kpb has been created successfully */
dev->state = COMP_STATE_READY;
kpb->state = KPB_STATE_CREATED;
return dev;
}

View File

@ -38,9 +38,15 @@ struct comp_buffer;
KPB_NR_OF_CHANNELS))
enum kpb_state {
KPB_STATE_BUFFERING = 0,
KPB_STATE_DISABLED = 0,
KPB_STATE_RESET_FINISHING,
KPB_STATE_CREATED,
KPB_STATE_PREPARING,
KPB_STATE_RUN,
KPB_STATE_BUFFERING,
KPB_STATE_DRAINING,
KPB_STATE_HOST_COPY,
KPB_STATE_RESETTING,
};
enum kpb_event {