Commit de983347 authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

ASoC: Intel: sst: Remove unused STREAM_DECODE and STREAM_RESET states

STREAM_DECODE is completely unused, status == STREAM_RESET was checked
for, but never set, remove both.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8cf732bb
...@@ -65,9 +65,7 @@ enum sst_stream_states { ...@@ -65,9 +65,7 @@ enum sst_stream_states {
STREAM_UN_INIT = 0, /* Freed/Not used stream */ STREAM_UN_INIT = 0, /* Freed/Not used stream */
STREAM_RUNNING = 1, /* Running */ STREAM_RUNNING = 1, /* Running */
STREAM_PAUSED = 2, /* Paused stream */ STREAM_PAUSED = 2, /* Paused stream */
STREAM_DECODE = 3, /* stream is in decoding only state */ STREAM_INIT = 3, /* stream init, waiting for data */
STREAM_INIT = 4, /* stream init, waiting for data */
STREAM_RESET = 5, /* force reset on recovery */
}; };
enum sst_ram_type { enum sst_ram_type {
......
...@@ -238,16 +238,7 @@ static int sst_cdev_close(struct device *dev, unsigned int str_id) ...@@ -238,16 +238,7 @@ static int sst_cdev_close(struct device *dev, unsigned int str_id)
return -EINVAL; return -EINVAL;
} }
if (stream->status == STREAM_RESET) {
dev_dbg(dev, "stream in reset state...\n");
stream->status = STREAM_UN_INIT;
retval = 0;
goto put;
}
retval = sst_free_stream(ctx, str_id); retval = sst_free_stream(ctx, str_id);
put:
stream->compr_cb_param = NULL; stream->compr_cb_param = NULL;
stream->compr_cb = NULL; stream->compr_cb = NULL;
...@@ -256,7 +247,6 @@ static int sst_cdev_close(struct device *dev, unsigned int str_id) ...@@ -256,7 +247,6 @@ static int sst_cdev_close(struct device *dev, unsigned int str_id)
dev_dbg(dev, "End\n"); dev_dbg(dev, "End\n");
return retval; return retval;
} }
static int sst_cdev_ack(struct device *dev, unsigned int str_id, static int sst_cdev_ack(struct device *dev, unsigned int str_id,
...@@ -486,16 +476,7 @@ static int sst_close_pcm_stream(struct device *dev, unsigned int str_id) ...@@ -486,16 +476,7 @@ static int sst_close_pcm_stream(struct device *dev, unsigned int str_id)
return -EINVAL; return -EINVAL;
} }
if (stream->status == STREAM_RESET) {
/* silently fail here as we have cleaned the stream earlier */
dev_dbg(ctx->dev, "stream in reset state...\n");
retval = 0;
goto put;
}
retval = free_stream_context(ctx, str_id); retval = free_stream_context(ctx, str_id);
put:
stream->pcm_substream = NULL; stream->pcm_substream = NULL;
stream->status = STREAM_UN_INIT; stream->status = STREAM_UN_INIT;
stream->period_elapsed = NULL; stream->period_elapsed = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment