-
Notifications
You must be signed in to change notification settings - Fork 349
[Do not review] Audio: Up_down_mixer: Handle Linux driver init #10021
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?
Conversation
004f41b to
d0a8207
Compare
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
left a comment
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.
LGTM. Good stuff.
| 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; |
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.
@ranj063 this may align with your kernel updates to pass module init data with stream data.
| frames_without_wrap = (input_end - input_pos) / input_frame_bytes; | ||
| frames_without_wrap = MIN(frames_without_wrap, frames); |
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.
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 |
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.
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()"); |
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.
btw, we can do func now in Zephyr.
No description provided.