diff --git a/soc/intel/intel_adsp/tools/cavstool.py b/soc/intel/intel_adsp/tools/cavstool.py index 874bd1de6faa5e..b28cd2d5cbd0fd 100755 --- a/soc/intel/intel_adsp/tools/cavstool.py +++ b/soc/intel/intel_adsp/tools/cavstool.py @@ -748,6 +748,26 @@ def debug_offset(): def debug_slot_offset(num): return debug_offset() + DEBUG_SLOT_SIZE * (1 + num) +def debug_slot_offset_by_type(the_type, timeout_s=0.2): + ADSP_DW_SLOT_COUNT=15 + hertz = 100 + attempts = timeout_s * hertz + while attempts > 0: + data = win_read(debug_offset(), 0, ADSP_DW_SLOT_COUNT * 3 * 4) + for i in range(ADSP_DW_SLOT_COUNT): + start_index = i * (3 * 4) + end_index = (i + 1) * (3 * 4) + desc = data[start_index:end_index] + resource_id, type_id, vma = struct.unpack('