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

Commit 53a75e96 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: Improve handling of errors during buffering"

parents 4a15a784 4497205e
Loading
Loading
Loading
Loading
+63 −66
Original line number Diff line number Diff line
@@ -547,8 +547,10 @@ static int msm_cpe_lab_thread(void *data)
	pr_debug("%s: Lab thread start\n", __func__);
	init_completion(&lab_d->comp);

	if (PCM_RUNTIME_CHECK(substream))
		return -EINVAL;
	if (PCM_RUNTIME_CHECK(substream)) {
		rc = -EINVAL;
		goto done;
	}

	if (!cpe || !cpe->core_handle) {
		pr_err("%s: Handle to %s is invalid\n",
@@ -571,7 +573,6 @@ static int msm_cpe_lab_thread(void *data)
	lsm_ops = &cpe->lsm_ops;
	afe_ops = &cpe->afe_ops;

	if (!kthread_should_stop()) {
	rc = lsm_ops->lab_ch_setup(cpe->core_handle,
				   session,
				   WCD_CPE_PRE_ENABLE);
@@ -637,13 +638,6 @@ static int msm_cpe_lab_thread(void *data)
		goto done;
	}

	} else {
		dev_dbg(rtd->dev,
			"%s: LAB stopped before starting read\n",
			 __func__);
		goto done;
	}

	while (!kthread_should_stop() &&
	       lab_d->thread_status != MSM_LSM_LAB_THREAD_ERROR) {

@@ -703,7 +697,10 @@ static int msm_cpe_lab_thread(void *data)
	}

done:
	pr_debug("%s: Exiting LAB thread\n", __func__);
	if (rc)
		lab_d->thread_status = MSM_LSM_LAB_THREAD_ERROR;
	pr_debug("%s: Exit lab_thread, exit_status=%d, thread_status=%d\n",
		 __func__, rc, lab_d->thread_status);
	complete(&lab_d->thread_complete);

	return 0;