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

Commit e5d49742 authored by Banajit Goswami's avatar Banajit Goswami Committed by Matt Wagantall
Browse files

misc: qcom: qdsp6v2: use 32-bit variable to store token



Even when we send buffer address with more than 32-bit
to DSP, APR callback handle will return a token with only
32-bit. Hence use a 32-bit variable to store the buffer
address locally, so that comparison between these does
not fail.

Change-Id: I1ce574d57bb7ee2716d112711f6a160bdb6c3e22
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent fee26415
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ void audio_aio_async_write_ack(struct q6audio_aio *audio, uint32_t token,
			wake_up(&audio->write_wait);
		}
	} else {
		pr_err("%s[%p]:expected=%lx ret=%x\n",
		pr_err("%s[%p]:expected=%x ret=%x\n",
			__func__, audio, used_buf->token, token);
		spin_unlock_irqrestore(&audio->dsp_lock, flags);
	}
+2 −2
Original line number Diff line number Diff line
/* Copyright (C) 2008 Google, Inc.
 * Copyright (C) 2008 HTC Corporation
 * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -133,7 +133,7 @@ struct audio_aio_buffer_node {
	struct list_head list;
	struct msm_audio_aio_buf buf;
	unsigned long paddr;
	unsigned long token;
	uint32_t token;
	void            *kvaddr;
	union meta_data meta_info;
};
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -182,7 +182,7 @@ void audio_aio_async_read_ack(struct q6audio_aio *audio, uint32_t token,
	filled_buf = list_first_entry(&audio->in_queue,
					struct audio_aio_buffer_node, list);

	pr_debug("%s token: 0x[%d], filled_buf->token: 0x[%lu]",
	pr_debug("%s token: 0x[%x], filled_buf->token: 0x[%x]",
				 __func__, token, filled_buf->token);
	if (token == (filled_buf->token)) {
		list_del(&filled_buf->list);
@@ -212,7 +212,7 @@ void audio_aio_async_read_ack(struct q6audio_aio *audio, uint32_t token,
					event_payload);
		kfree(filled_buf);
	} else {
		pr_err("%s[%p]:expected=%lx ret=%x\n",
		pr_err("%s[%p]:expected=%x ret=%x\n",
			__func__, audio, filled_buf->token, token);
		spin_unlock_irqrestore(&audio->dsp_lock, flags);
	}