tinycompress: plugin: Set codec params in SETUP state
Allow codec params to be set in COMPRESS_PLUG_SETUP state as well.
CRs-Fixed: 3023915
Change-Id: Ic1f93628c9fa325653cbd65a0cc827310276f81d
diff --git a/compress_plugin.c b/compress_plugin.c
index eac0f38..0e536cc 100644
--- a/compress_plugin.c
+++ b/compress_plugin.c
@@ -86,7 +86,8 @@
if (plugin->state == COMPRESS_PLUG_STATE_RUNNING)
return plugin->ops->set_params(plugin, params);
- else if (plugin->state != COMPRESS_PLUG_STATE_OPEN)
+ else if (plugin->state != COMPRESS_PLUG_STATE_OPEN &&
+ plugin->state != COMPRESS_PLUG_STATE_SETUP)
return -EBADFD;
if (params->buffer.fragment_size == 0 ||