Skip to content

Commit 0382995

Browse files
author
Jyri Sarha
committed
src/audio/host-zephyr.c: HACK test, force out XRUN resource notif every 1000 frames
1 parent 2e21b9d commit 0382995

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

app/overlays/ptl/ll_userspace_overlay.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CONFIG_DAI_USERSPACE=y
1111
CONFIG_COLD_STORE_EXECUTE_DEBUG=n
1212
CONFIG_CROSS_CORE_STREAM=n
1313
CONFIG_INTEL_ADSP_MIC_PRIVACY=n
14-
CONFIG_XRUN_NOTIFICATIONS_ENABLE=n
14+
#CONFIG_XRUN_NOTIFICATIONS_ENABLE=n
1515
CONFIG_SOF_BOOT_TEST_ALLOWED=n
1616
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n
1717
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=n

src/audio/host-zephyr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,11 @@ static void host_dma_cb(struct comp_dev *dev, size_t bytes)
377377
static int host_get_status(struct comp_dev *dev, struct host_data *hd, struct dma_status *stat)
378378
{
379379
int ret = sof_dma_get_status(hd->dma, hd->chan_index, stat);
380+
int *counter = &ipc_get()->dummy_counter;
381+
380382
#if CONFIG_XRUN_NOTIFICATIONS_ENABLE
381-
if (ret == -EPIPE && !hd->xrun_notification_sent) {
383+
// if (ret == -EPIPE && !hd->xrun_notification_sent) {
384+
if (((*counter)++ % 10000) == 1000 && !hd->xrun_notification_sent) {
382385
hd->xrun_notification_sent = send_copier_gateway_xrun_notif_msg
383386
(dev->pipeline->pipeline_id, dev->direction);
384387
} else if (!ret) {

src/include/sof/ipc/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ struct ipc {
121121
struct k_work_delayable z_delayed_work;
122122
struct k_work_q ipc_send_wq;
123123
#endif
124+
int dummy_counter;
124125

125126
void *private;
126127
};

0 commit comments

Comments
 (0)