Skip to content

Conversation

@ujfalusi
Copy link
Collaborator

@ujfalusi ujfalusi commented Jun 3, 2025

The process module can change different parameters in the audio path and
this change has to be properly evaluated and applied.

In case of playback we are converting from multiple input formats to a
single format (or just passing through without change), the output format
lookup must be based on the input format.

In case of capture, we are converting from a single input format to a
format which is to be passed to the FE, we need to use the input parameters
and the FE parameters to be able to find the correct format:
for those parameters that are modified by the module instance we need to
use the FE parameter while for the rest we use the input parameters.

Signed-off-by: Peter Ujfalusi [email protected]

Copy link

@singalsu singalsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested today successfully several multi-channel playback and capture formats cases to/from 2ch HDA codec with this patch plus #5435 and #5441. The process module tested for channels conversion was selector/micsel.

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, just 1 question for reuse.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ujfalusi @ranj063 I'm assuming we can inject this params data into the module creation IPC update when its ready ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with what the module creation IPC update does, but this is stored at widget creation time and can be used later when we create the messages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a question for @ranj063

@ujfalusi ujfalusi force-pushed the peter/sof/pr/ipc4-process-ouitput-01 branch from ea4f69e to 791b32e Compare June 23, 2025 13:44
@ujfalusi
Copy link
Collaborator Author

Changes since v1:

  • rebased on 8-bit format support

bardliao
bardliao previously approved these changes Jun 23, 2025
ujfalusi added 2 commits June 26, 2025 10:23
…t of a module

Based on the input and output formats we can evaluate what param might be
changed by the module instance.
If there is a difference between the input rate/channels/format and the
output  rate/channels/format it means that the module can change one or
multiple of the params.

Store this information during init for later use.

Signed-off-by: Peter Ujfalusi <[email protected]>
The process module can change different parameters in the audio path and
this change has to be properly evaluated and applied.

In case of playback we are converting from multiple input formats to a
single format (or just passing through without change), the output format
lookup must be based on the input format.

In case of capture, we are converting from a single input format to a
format which is to be passed to the FE, we need to use the input parameters
and the FE parameters to be able to find the correct format:
for those parameters that are modified by the module instance we need to
use the FE parameter while for the rest we use the input parameters.

Signed-off-by: Peter Ujfalusi <[email protected]>
@ujfalusi ujfalusi force-pushed the peter/sof/pr/ipc4-process-ouitput-01 branch from 791b32e to 796efb2 Compare June 26, 2025 07:23
@ujfalusi
Copy link
Collaborator Author

Changes since v2:

  • rebased on the fmt type fix

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.

4 participants