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

Commit bc668d3b authored by Aviral Gupta's avatar Aviral Gupta
Browse files

ASoC: compress: fix the target not going to TCXO shutdown



The error code propagated from the flush cmd in the trigger stop
is causing the error in the state of the soc compress framework.
This hinders in closing the BE connected to the FE.
If the AFE is not closed it prevents the target to go into TCXO
shutdown.
Fixed by removing the error handling of the flush command in the
trigger stop, since failure in flush doesn't signify the
failure in the stop command.

CRs-Fixed: 687111
Change-Id: I8f6e2bfbd0e59516ede2359dda4cedf027948a72
Signed-off-by: default avatarAviral Gupta <aviralg@codeaurora.org>
parent 66dc4fbd
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -1219,21 +1219,10 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
		if (!prtd->gapless_state.gapless_transition) {
			pr_debug("issue CMD_FLUSH stream_id %d\n", stream_id);
			spin_unlock_irqrestore(&prtd->lock, flags);
			rc = q6asm_stream_cmd(
			q6asm_stream_cmd(
				prtd->audio_client, CMD_FLUSH, stream_id);
			if (rc < 0) {
				pr_err("%s: flush cmd failed rc=%d\n",
							__func__, rc);
				return rc;
			}
			rc = wait_event_timeout(prtd->flush_wait,
			wait_event_timeout(prtd->flush_wait,
					prtd->cmd_ack, 1 * HZ);
			if (!rc) {
				rc = -ETIMEDOUT;
				pr_err("Flush cmd timeout\n");
			} else {
				rc = 0; /* prtd->cmd_status == OK? 0 : -EPERM*/
			}
			spin_lock_irqsave(&prtd->lock, flags);
		} else {
			prtd->first_buffer = 0;