asoc: msm-lsm-client: Initialize started flag in open

Initialize started flag in open instead of prepare since reset
happens in close. This will also help stop already active LSM
sessions even if prepare was called in between.

Change-Id: Iad47f9459ceddefd582840313901d95d338e1147
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
This commit is contained in:
Chaithanya Krishna Bacharaju 2019-04-19 18:47:16 +05:30 • committed by Gerrit - the friendly Code Review server
commit 9b0637b6bc

View file

@ -2483,6 +2483,7 @@ static int msm_lsm_open(struct snd_pcm_substream *substream)
return -ENOMEM;
}
prtd->lsm_client->opened = false;
prtd->lsm_client->started = false;
prtd->lsm_client->session_state = IDLE;
prtd->lsm_client->poll_enable = true;
prtd->lsm_client->perf_mode = 0;
@ -2610,7 +2611,6 @@ static int msm_lsm_prepare(struct snd_pcm_substream *substream)
}
prtd->lsm_client->session_state = RUNNING;
prtd->lsm_client->started = false;
runtime->private_data = prtd;
return ret;
}