Repository navigation
dp, pipeline, ipc4: core DP binding, hostless WoV routing, and platform hardening #11505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7225643
d24b603
0a3c326
7f4868e
b4b9244
f92a5bf
d6a8436
792377d
73af4bb
5b03191
0f964d3
9b0f3a6
44d7281
6713c7e
1b955da
bee3056
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -422,12 +422,21 @@ static void module_adapter_calculate_dp_period(struct comp_dev *dev) | |
| unsigned int period = UINT32_MAX; | ||
|
|
||
| for (int i = 0; i < mod->num_of_sinks; i++) { | ||
| unsigned int frame_bytes = sink_get_frame_bytes(mod->sinks[i]); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we say in teh commit message why this is needed for WOV and state flow.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: split into the 3 commits from |
||
| unsigned int rate = sink_get_rate(mod->sinks[i]); | ||
|
|
||
| /* Skip virtual/event-only detect sinks with no audio format so WoV | ||
| * pipelines prepare without dividing by zero (period comes from | ||
| * source or dev->period during INIT -> PREPARE). | ||
| */ | ||
| if (!frame_bytes || !rate) | ||
| continue; | ||
|
|
||
| /* calculate time required the module to provide OBS data portion - a period | ||
| * use 64bit integers to avoid overflows | ||
| */ | ||
| unsigned int sink_period = 1000000ULL * sink_get_min_free_space(mod->sinks[i]) / | ||
| (sink_get_frame_bytes(mod->sinks[i]) * | ||
| sink_get_rate(mod->sinks[i])); | ||
| (frame_bytes * rate); | ||
| /* note the minimal period for the module */ | ||
| if (period > sink_period) | ||
| period = sink_period; | ||
|
|
@@ -493,6 +502,12 @@ int module_adapter_prepare(struct comp_dev *dev) | |
| * Second example is a module with variable data rate on output (like MPEG encoder) | ||
| */ | ||
| if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP) { | ||
| /* legacy comp_driver consumers don't set their input buffer params at bind */ | ||
| comp_dev_for_each_consumer(dev, sink) { | ||
| if (!audio_stream_get_rate(&sink->stream) && mod->stream_params) | ||
| buffer_set_params(sink, mod->stream_params, BUFFER_UPDATE_FORCE); | ||
| } | ||
|
|
||
| /* calculate DP period if a module didn't */ | ||
| if (!dev->period) | ||
| module_adapter_calculate_dp_period(dev); | ||
|
|
@@ -604,7 +619,7 @@ static int module_adapter_copy_ring_buffers(struct comp_dev *dev) | |
| /* input - we need to copy data from audio_stream (as source) | ||
| * to ring_buffer (as sink) | ||
| */ | ||
| err = audio_buffer_sync_secondary_buffer(&buffer->audio_buffer, UINT_MAX); | ||
| err = audio_buffer_sync_secondary_buffer(&buffer->audio_buffer, SIZE_MAX); | ||
|
|
||
| if (err) { | ||
| comp_err(dev, "LL to DP copy error status: %d", err); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -285,8 +285,13 @@ static int pipeline_comp_prepare(struct comp_dev *current, | |
| return err; | ||
|
|
||
| err = comp_prepare(current); | ||
| if (err < 0 || err == PPL_STATUS_PATH_STOP) | ||
| if (err < 0 || err == PPL_STATUS_PATH_STOP) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This patch looks like we can again split and attribute correct author from wov-001 tag.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: split into 3 commits from
|
||
| if (err < 0) { | ||
| pipe_err(current->pipeline, "comp_prepare for comp 0x%x failed %d", | ||
| dev_comp_id(current), err); | ||
| } | ||
| return err; | ||
| } | ||
|
|
||
| return pipeline_for_each_comp(current, ctx, dir); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be split into 5 patches, one for each subject above with correct author from the wov-001 tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed: split into 5 atomic commits matching
wov-001subjects and authors:5b03191fa(Liam Girdwood)lib, audio: add NULL guards during DAI, DMA, and copier teardown0f964d360(Liam Girdwood)ipc: ipc-helper: reset component before freeing if not in ready state9b0f3a6a5(Seppo Ingalsuo)lib: notifier: wait for completion of remote core notifications44d7281ad(Seppo Ingalsuo)lib: agent: guard against NULL system agent in sa_set_panic_on_delay()6713c7ec9(Seppo Ingalsuo)audio: host-zephyr: increase minimum no-bytes warning interval