summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2024-04-05 12:09:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-30 10:44:46 +0300
commit125962549c4fb63dc8ff04e464e61d0f03b7f071 (patch)
tree342d0051317c3b957570fbeab4657b9ea4ad5c20
parentb33040a3b898e32ea6543fa5c1e4d5a2eb0f85e5 (diff)
downloadlinux-125962549c4fb63dc8ff04e464e61d0f03b7f071.tar.xz
ASoC: Intel: avs: Fix debug-slot offset calculation
[ Upstream commit c91b692781c1839fcc389b2a9120e46593c6424b ] For resources with ID other than 0 the current calculus is incorrect. Fixes: 275b583d047a ("ASoC: Intel: avs: ICL-based platforms support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240405090929.1184068-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--sound/soc/intel/avs/icl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/intel/avs/icl.c b/sound/soc/intel/avs/icl.c
index d2554c857732..284d38f3b1ca 100644
--- a/sound/soc/intel/avs/icl.c
+++ b/sound/soc/intel/avs/icl.c
@@ -66,7 +66,7 @@ struct avs_icl_memwnd2 {
struct avs_icl_memwnd2_desc slot_desc[AVS_ICL_MEMWND2_SLOTS_COUNT];
u8 rsvd[SZ_4K];
};
- u8 slot_array[AVS_ICL_MEMWND2_SLOTS_COUNT][PAGE_SIZE];
+ u8 slot_array[AVS_ICL_MEMWND2_SLOTS_COUNT][SZ_4K];
} __packed;
#define AVS_ICL_SLOT_UNUSED \
@@ -89,8 +89,7 @@ static int avs_icl_slot_offset(struct avs_dev *adev, union avs_icl_memwnd2_slot_
for (i = 0; i < AVS_ICL_MEMWND2_SLOTS_COUNT; i++)
if (desc[i].slot_id.val == slot_type.val)
- return offsetof(struct avs_icl_memwnd2, slot_array) +
- avs_skl_log_buffer_offset(adev, i);
+ return offsetof(struct avs_icl_memwnd2, slot_array) + i * SZ_4K;
return -ENXIO;
}