Forráskód Böngészése

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 <[email protected]>
Chaithanya Krishna Bacharaju 6 éve
szülő
commit
9b0637b6bc
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      asoc/msm-lsm-client.c

+ 1 - 1
asoc/msm-lsm-client.c

@@ -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;
 }