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

Commit 1a11bc82 authored by Cong Tang's avatar Cong Tang Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: update token mask for port id in adm callback



With hs tdm port ids extension, the total port ids exceed 256
and mask 0xFF is not enough to get hs tdm port ids in adm open
callback which cause adm open timeout issue.

Change-Id: I73f3468677433d060f9585a213dea6828d6e16e1
Signed-off-by: default avatarCong Tang <congt@codeaurora.org>
parent 5d2599a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1597,7 +1597,7 @@ static int32_t adm_callback(struct apr_client_data *data, void *priv)
	adm_callback_debug_print(data);
	adm_callback_debug_print(data);
	if (data->payload_size >= sizeof(uint32_t)) {
	if (data->payload_size >= sizeof(uint32_t)) {
		copp_idx = (data->token) & 0XFF;
		copp_idx = (data->token) & 0XFF;
		port_idx = ((data->token) >> 16) & 0xFF;
		port_idx = ((data->token) >> 16) & 0xFFFF;
		client_id = ((data->token) >> 8) & 0xFF;
		client_id = ((data->token) >> 8) & 0xFF;
		if (port_idx < 0 || port_idx >= AFE_MAX_PORTS) {
		if (port_idx < 0 || port_idx >= AFE_MAX_PORTS) {
			pr_err("%s: Invalid port idx %d token %d\n",
			pr_err("%s: Invalid port idx %d token %d\n",