-
Notifications
You must be signed in to change notification settings - Fork 349
component: move comp_copy from header file to source file #6344
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -234,3 +234,27 @@ void audio_stream_copy_to_linear(const struct audio_stream __sparse_cache *sourc | |
| snk += bytes_copied; | ||
| } | ||
| } | ||
|
|
||
|
||
| /** See comp_ops::copy */ | ||
| int comp_copy(struct comp_dev *dev) | ||
| { | ||
| int ret = 0; | ||
|
|
||
| assert(dev->drv->ops.copy); | ||
|
|
||
| /* copy only if we are the owner of the component */ | ||
| if (cpu_is_me(dev->ipc_config.core)) { | ||
| #if CONFIG_PERFORMANCE_COUNTERS | ||
|
||
| perf_cnt_init(&dev->pcd); | ||
| #endif | ||
|
|
||
| ret = dev->drv->ops.copy(dev); | ||
|
|
||
| #if CONFIG_PERFORMANCE_COUNTERS | ||
| perf_cnt_stamp(&dev->pcd, comp_perf_info, dev); | ||
| perf_cnt_average(&dev->pcd, comp_perf_avg_info, dev); | ||
| #endif | ||
| } | ||
|
|
||
| return ret; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -470,7 +470,10 @@ static const struct comp_driver comp_mixer = { | |
| }, | ||
| }; | ||
|
|
||
| static SHARED_DATA struct comp_driver_info comp_mixer_info = { | ||
| #ifndef UNIT_TEST | ||
|
||
| static | ||
| #endif | ||
| SHARED_DATA struct comp_driver_info comp_mixer_info = { | ||
| .drv = &comp_mixer, | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,35 +171,8 @@ static inline int comp_prepare(struct comp_dev *dev) | |
| return 0; | ||
| } | ||
|
|
||
| /** See comp_ops::copy */ | ||
| static inline int comp_copy(struct comp_dev *dev) | ||
| { | ||
| int ret = 0; | ||
|
|
||
| assert(dev->drv->ops.copy); | ||
|
|
||
| /* copy only if we are the owner of the component */ | ||
| if (cpu_is_me(dev->ipc_config.core)) { | ||
| /* BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/43786 | ||
| * TODO: Remove this once the bug gets fixed. | ||
| */ | ||
| #ifndef __ZEPHYR__ | ||
| perf_cnt_init(&dev->pcd); | ||
| #endif | ||
|
|
||
| ret = dev->drv->ops.copy(dev); | ||
| int comp_copy(struct comp_dev *dev); | ||
|
||
|
|
||
| /* BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/43786 | ||
| * TODO: Remove this once the bug gets fixed. | ||
| */ | ||
| #ifndef __ZEPHYR__ | ||
| perf_cnt_stamp(&dev->pcd, comp_perf_info, dev); | ||
| perf_cnt_average(&dev->pcd, comp_perf_avg_info, dev); | ||
| #endif | ||
| } | ||
|
|
||
| return ret; | ||
| } | ||
|
|
||
| /** See comp_ops::get_attribute */ | ||
| static inline int comp_get_attribute(struct comp_dev *dev, uint32_t type, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.