[Do not review] Audio: Up_down_mixer: Handle Linux driver init#10021
Draft
singalsu wants to merge 11 commits intothesofproject:mainfrom
Draft
[Do not review] Audio: Up_down_mixer: Handle Linux driver init#10021singalsu wants to merge 11 commits intothesofproject:mainfrom
singalsu wants to merge 11 commits intothesofproject:mainfrom
Conversation
004f41b to
d0a8207
Compare
singalsu
commented
May 21, 2025
7985b42 to
1ae07ab
Compare
This allows to load the component in TGL IPC4 configured devices. The entries are copied from MTL those seem to work also for TGL for test usage. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In Linux the up_down_mixer is initialized as process component type without mix definitions. This change adds to init() a default pass-through configuration with same input and output format. The up/down mixing configuration can be updated with bytes control. The mixing configuration is re-initialized in added prepare() step. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The previous processing function processed entire source and sink circular size. It avoids wrap check but is more inefficient when buffer is larger than period. The return code from sink_commit_buffer() and source_release_data() is ignored to avoid a fail in stream start where first frames count can be zero. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch moves the generic processing stubs from up_down_mixer_hifi3.c to new file up_down_mixer_generic.c. The HiFi versions build choices are added to Kconfig. There are no functiona changes to stubs, the generic processing in e.g. testbench still fails with these. As exception, the missing sof_panic(0); is added to generic downmix16bit_stereo(). Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the stubs of simple conversion functions with real conversions. In these cases the xtensa C code without arithmetic operations can converted to generic with just e.g. ae_int32 to int32_t replace and AE_MOVINT with type cast. This enables to use testbench x86 build to run up_down_mixer. Also the generic versions are potential for better performance with more recent HiFi cores with improvements in compiler technology. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Temporary change, force CI check for generic C version functions. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
… test Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
lgirdwood
reviewed
May 26, 2025
| struct up_down_mixer_config default_config; | ||
| struct module_config *dst = &mod->priv.cfg; | ||
| const struct ipc4_up_down_mixer_module_cfg *up_down_mixer = dst->init_data; | ||
| const struct ipc4_up_down_mixer_module_cfg *up_down_mixer_init = dst->init_data; |
Member
There was a problem hiding this comment.
@ranj063 this may align with your kernel updates to pass module init data with stream data.
Comment on lines
+486
to
+487
| frames_without_wrap = (input_end - input_pos) / input_frame_bytes; | ||
| frames_without_wrap = MIN(frames_without_wrap, frames); |
Member
There was a problem hiding this comment.
Do we align any of this to SIMD width ? Not just in this module, but in the C coded logic ?
| #define CH_COUNT_5_0 5 | ||
| #define CH_COUNT_5_1 6 | ||
| #define CH_COUNT_7_1 8 | ||
| #define CH_COUNT_QUATRO 4 |
Member
There was a problem hiding this comment.
Can we use the IPC4 macros here i.e. reuse for clarity ?
| struct comp_dev *dev = mod->dev; | ||
| int ret; | ||
|
|
||
| comp_info(dev, "set_downmix_coefficients()"); |
Member
There was a problem hiding this comment.
btw, we can do func now in Zephyr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.