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

Commit 8304a4a4 authored by Ashish Jain's avatar Ashish Jain Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: bg_glink: Use separate mutex lock for response and command thread



Response callback should not use the same lock as the one used to
do a glink_tx transaction, as it might delay the rx_done event to
the client if glink_tx transaction is stuck. Hence have specific
mutext lock for response callback and command transactions.

Change-Id: Ie8cf60f77aa4ad595cb16ebffcb4dcf00a0843a8
Signed-off-by: default avatarAshish Jain <ashishj@codeaurora.org>
parent fc7eae29
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -120,10 +120,10 @@ static void bg_cdc_glink_notify_rx(void *handle, const void *priv,

	pr_debug("%s: Rx packet received\n", __func__);

	mutex_lock(&ch_info->w_lock);
	mutex_lock(&ch_info->r_lock);
	if (ch_info->func)
		ch_info->func((void *)ptr, size);
	mutex_unlock(&ch_info->w_lock);
	mutex_unlock(&ch_info->r_lock);
	glink_rx_done(ch_info->handle, ptr, true);
}