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

Commit c7157c1b authored by Sudheer Papothi's avatar Sudheer Papothi Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wcd_cpe_services: Process detection events in SEND state



when event is generated during CMI SEND state, process the
event explicitly without waiting for response to complete.
This change fixes response timed out errors for start and
stop commands.

Change-Id: I2e8d877b57c4d547688fdd7a2e71d06dfec3d4ab
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
parent 6261ed1f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -845,6 +845,7 @@ static void cpe_process_irq_int(u32 irq,
	struct cpe_send_msg *m;
	u8 size = 0;
	bool err_irq = false;
	struct cmi_hdr *hdr;

	pr_debug("%s: irq = %u\n", __func__, irq);

@@ -911,6 +912,18 @@ static void cpe_process_irq_int(u32 irq,
		break;

	case CPE_STATE_SENDING_MSG:
		hdr = CMI_GET_HEADER(t_info->tgt->outbox);
		if (CMI_GET_OPCODE(t_info->tgt->outbox) ==
		    CPE_LSM_SESSION_EVENT_DETECTION_STATUS_V2) {
			pr_debug("%s: session_id: %u, state: %d,%d, event received\n",
				 __func__, CMI_HDR_GET_SESSION_ID(hdr),
				t_info->state, t_info->substate);
			temp_node.command = CPE_CMD_PROC_INCOMING_MSG;
			temp_node.data = NULL;
			t_info->cpe_process_command(&temp_node);
			break;
		}

		m = (struct cpe_send_msg *)t_info->pending;

		switch (t_info->substate) {