Skip to content

Commit c1ed9ec

Browse files
committed
telemetry: Use DAI index as an instance ID
CPU ID is meant to be used as a measurement identifier only for IO measurements related to IPC/IDC whereas for measuring DAIs IO, a DMA index /DAI index shall be used instead. This commit contains this small correction as well as cosmetic changes related to the DAI IO measurement. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
1 parent 2aec30f commit c1ed9ec

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/audio/dai-zephyr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ dai_dma_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t bytes,
425425
}
426426
#ifdef CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS
427427
/* Increment performance counters */
428-
io_perf_monitor_update_data(dd->io_perf_bytes_count, bytes);
428+
io_perf_monitor_update_data(dd->io_perf_dai_byte_count, bytes);
429429
#endif
430430

431431
return dma_status;
@@ -558,12 +558,12 @@ __cold int dai_common_new(struct dai_data *dd, struct comp_dev *dev,
558558
/* ignore perf meas init on case of other dai types */
559559
if (perf_type != IO_PERF_INVALID_ID) {
560560
struct io_perf_data_item init_data = {perf_type,
561-
cpu_get_id(),
561+
dai_cfg->dai_index,
562562
perf_dir,
563563
IO_PERF_POWERED_UP_ENABLED,
564564
IO_PERF_D0IX_POWER_MODE,
565565
0, 0, 0 };
566-
io_perf_monitor_init_data(&dd->io_perf_bytes_count, &init_data);
566+
io_perf_monitor_init_data(&dd->io_perf_dai_byte_count, &init_data);
567567
}
568568
#endif
569569

@@ -617,7 +617,7 @@ __cold void dai_common_free(struct dai_data *dd)
617617
assert_can_be_cold();
618618

619619
#ifdef CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS
620-
io_perf_monitor_release_slot(dd->io_perf_bytes_count);
620+
io_perf_monitor_release_slot(dd->io_perf_dai_byte_count);
621621
#endif
622622

623623
if (dd->group)

src/include/sof/lib/dai-zephyr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ struct dai_data {
164164
#endif
165165
#ifdef CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS
166166
/* io performance measurement */
167-
struct io_perf_data_item *io_perf_bytes_count;
167+
struct io_perf_data_item *io_perf_dai_byte_count;
168168
#endif
169169
/* Copier gain params */
170170
struct copier_gain_params *gain_data;

0 commit comments

Comments
 (0)