|
13 | 13 | #include <sof/schedule/schedule.h> |
14 | 14 | #include <sof/schedule/ll_schedule.h> |
15 | 15 | #include <sof/schedule/ll_schedule_domain.h> |
| 16 | +#include <sof/audio/pipeline.h> |
16 | 17 | #include <rtos/task.h> |
17 | 18 | #include <rtos/userspace_helper.h> |
18 | 19 | #include <ipc4/fw_reg.h> |
@@ -94,6 +95,40 @@ ZTEST(userspace_ll, ll_task_test) |
94 | 95 | ll_task_test(); |
95 | 96 | } |
96 | 97 |
|
| 98 | +static void pipeline_check(void) |
| 99 | +{ |
| 100 | + struct pipeline *p; |
| 101 | + struct k_heap *heap; |
| 102 | + uint32_t pipeline_id = 1; |
| 103 | + uint32_t priority = 5; |
| 104 | + uint32_t comp_id = 10; |
| 105 | + int ret; |
| 106 | + |
| 107 | + heap = zephyr_ll_user_heap(); |
| 108 | + zassert_not_null(heap, "user heap not found"); |
| 109 | + |
| 110 | + /* Create pipeline on user heap */ |
| 111 | + p = pipeline_new(heap, pipeline_id, priority, comp_id, NULL); |
| 112 | + zassert_not_null(p, "pipeline creation failed"); |
| 113 | + |
| 114 | + /* Verify heap assignment */ |
| 115 | + zassert_equal(p->heap, heap, "pipeline heap not equal to user heap"); |
| 116 | + |
| 117 | + /* Verify pipeline properties */ |
| 118 | + zassert_equal(p->pipeline_id, pipeline_id, "pipeline id mismatch"); |
| 119 | + zassert_equal(p->priority, priority, "priority mismatch"); |
| 120 | + zassert_equal(p->comp_id, comp_id, "comp id mismatch"); |
| 121 | + |
| 122 | + /* Free pipeline */ |
| 123 | + ret = pipeline_free(p); |
| 124 | + zassert_ok(ret, "pipeline free failed"); |
| 125 | +} |
| 126 | + |
| 127 | +ZTEST(userspace_ll, pipeline_check) |
| 128 | +{ |
| 129 | + pipeline_check(); |
| 130 | +} |
| 131 | + |
97 | 132 | ZTEST_SUITE(userspace_ll, NULL, NULL, NULL, NULL, NULL); |
98 | 133 |
|
99 | 134 | /** |
|
0 commit comments