From 7caee2bf8860efa853171d4840972c56a57f5b40 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 30 Jul 2020 22:25:49 +0800 Subject: [PATCH] improve DMA logging --- src/runtime/src/kernel/dma.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/src/kernel/dma.rs b/src/runtime/src/kernel/dma.rs index c16365b..024c4af 100644 --- a/src/runtime/src/kernel/dma.rs +++ b/src/runtime/src/kernel/dma.rs @@ -258,7 +258,7 @@ pub extern fn dma_retrieve(name: CSlice) -> DmaTrace { pub extern fn dma_playback(timestamp: i64, ptr: i32) { assert!(ptr % ALIGNMENT as i32 == 0); - debug!("DMA Playback"); + debug!("DMA playback started"); unsafe { csr::rtio_dma::base_address_write(ptr as u32); csr::rtio_dma::time_offset_write(timestamp as u64); @@ -268,6 +268,8 @@ pub extern fn dma_playback(timestamp: i64, ptr: i32) { while csr::rtio_dma::enable_read() != 0 {} csr::cri_con::selected_write(0); + debug!("DMA playback finished"); + let error = csr::rtio_dma::error_read(); if error != 0 { let timestamp = csr::rtio_dma::error_timestamp_read();