Skip to content

Commit 48d8ea9

Browse files
committed
HACK: audio: collection of feature limitations to run LL in user
This is a set of temporary changes to audio code to remove calls to privileged interfaces that are not mandatory to run simple audio tests. These need proper solutions to be able to run all use-cases in user LL version. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 2e65960 commit 48d8ea9

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/audio/pipeline/pipeline-graph.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ struct comp_dev *pipeline_get_dai_comp(uint32_t pipeline_id, int dir)
506506
*/
507507
struct comp_dev *pipeline_get_dai_comp_latency(uint32_t pipeline_id, uint32_t *latency)
508508
{
509+
#ifdef CONFIG_SOF_USERSPACE_LL
510+
LOG_WRN("latency cannot be computed in user-space pipelines!");
511+
*latency = 0;
512+
#else
509513
struct ipc_comp_dev *ipc_sink;
510514
struct ipc_comp_dev *ipc_source;
511515
struct comp_dev *source;
@@ -573,7 +577,7 @@ struct comp_dev *pipeline_get_dai_comp_latency(uint32_t pipeline_id, uint32_t *l
573577
/* Get a next sink component */
574578
ipc_sink = ipc_get_ppl_sink_comp(ipc, source->pipeline->pipeline_id);
575579
}
576-
580+
#endif
577581
return NULL;
578582
}
579583
EXPORT_SYMBOL(pipeline_get_dai_comp_latency);

src/audio/pipeline/pipeline-schedule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ static enum task_state pipeline_task_cmd(struct pipeline *p,
154154

155155
p->trigger.cmd = COMP_TRIGGER_NO_ACTION;
156156

157+
#ifndef CONFIG_SOF_USERSPACE_LL
157158
ipc_msg_reply(reply);
159+
#else
160+
LOG_WRN("IPC reply from pipeline thread missing in user-space.");
161+
#endif
158162

159163
return err;
160164
}

zephyr/include/sof/lib/cpu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ static inline bool cpu_is_primary(int id)
5555

5656
static inline bool cpu_is_me(int id)
5757
{
58+
#ifdef CONFIG_SOF_USERSPACE_LL
59+
return true;
60+
#else
5861
return id == cpu_get_id();
62+
#endif
5963
}
6064

6165
int cpu_enable_core(int id);

0 commit comments

Comments
 (0)