Skip to content

Conversation

@singalsu
Copy link
Collaborator

No description provided.

@singalsu singalsu force-pushed the add_updwownmix branch 3 times, most recently from 004f41b to d0a8207 Compare May 21, 2025 08:58
@singalsu singalsu force-pushed the add_updwownmix branch 6 times, most recently from 7985b42 to 1ae07ab Compare May 23, 2025 09:47
singalsu added 11 commits May 23, 2025 16:12
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>
Copy link
Member

@lgirdwood lgirdwood left a 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;
Copy link
Member

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.

Comment on lines +486 to +487
frames_without_wrap = (input_end - input_pos) / input_frame_bytes;
frames_without_wrap = MIN(frames_without_wrap, frames);
Copy link
Member

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
Copy link
Member

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()");
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants