Skip to content

Commit

Permalink
base_fw: convert dsp hw cycle to dsp time
Browse files Browse the repository at this point in the history
Dsp time is in format of micro second, not hw cycle.

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Jan 4, 2024
1 parent 9315ada commit e0d3a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static uint32_t basefw_set_system_time(uint32_t param_id,
global_system_time_info.host_time.val_l = ((const struct ipc4_system_time *)data)->val_l;
global_system_time_info.host_time.val_u = ((const struct ipc4_system_time *)data)->val_u;

uint64_t current_dsp_time = sof_cycle_get_64();
uint64_t current_dsp_time = k_cyc_to_us_floor64(sof_cycle_get_64());

global_system_time_info.dsp_time.val_l = (uint32_t)(current_dsp_time);
global_system_time_info.dsp_time.val_u = (uint32_t)(current_dsp_time >> 32);
Expand Down

0 comments on commit e0d3a55

Please sign in to comment.