Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b6ee4e0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm-cpe-lsm: Make sure LAB data channel is stopped"

parents 9cbb4c71 ce64394a
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -271,7 +271,10 @@ static int msm_cpe_lsm_lab_stop(struct snd_pcm_substream *substream)
	session = lsm_d->lsm_session;
	lab_sess = &session->lab;

	if (lab_sess->thread_status == MSM_LSM_LAB_THREAD_RUNNING) {
	if (lab_sess->thread_status != MSM_LSM_LAB_THREAD_STOP) {

		if (lab_sess->thread_status ==
		    MSM_LSM_LAB_THREAD_RUNNING) {
			dev_dbg(rtd->dev, "%s: stopping lab thread\n",
				__func__);
			rc = kthread_stop(session->lsm_lab_thread);
@@ -284,9 +287,9 @@ static int msm_cpe_lsm_lab_stop(struct snd_pcm_substream *substream)
				dev_err(rtd->dev,
					"%s: Wait for lab thread timedout\n",
					__func__);
			lab_sess->thread_status = MSM_LSM_LAB_THREAD_ERROR;
				return -ETIMEDOUT;
			}
		}

		lab_sess->thread_status = MSM_LSM_LAB_THREAD_STOP;
		rc = lsm_ops->lsm_lab_stop(cpe->core_handle, session);