Skip to content

ASoC: SOF: ipc4-topology: update pipeline_params in process prepare - #4185

Merged
ranj063 merged 3 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/process_output_params
Feb 16, 2023
Merged

ASoC: SOF: ipc4-topology: update pipeline_params in process prepare#4185
ranj063 merged 3 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/process_output_params

Conversation

@ranj063

Copy link
Copy Markdown
Collaborator

Some modules may modify the audio format during processing. So, update the pipeline params based on pin 0's output format during process prepare.

Signed-off-by: Libin Yang libin.yang@intel.com
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com

kv2019i
kv2019i previously approved these changes Feb 9, 2023
bardliao
bardliao previously approved these changes Feb 10, 2023
Comment threadsound/soc/sof/ipc4-topology.c Outdated
Comment threadsound/soc/sof/ipc4-topology.c
@lgirdwood

Copy link
Copy Markdown
Member

@ranj063 any update ?

Comment threadsound/soc/sof/ipc4-topology.c Outdated
ranj063and others added 3 commits February 14, 2023 09:36
Copy the output format only if the returned index is less than the
available number of output formats and it is meant for Pin 0.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
…format count
Initialize the input format in the base config only if a module has input
formats available.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Some modules may modify the audio format during processing. So, update the
pipeline params based on pin 0's output format during process prepare.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

@plbossartplbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't pretend I fully understand what's behind this PR but the code looks good to me.

@ranj063

Copy link
Copy Markdown
CollaboratorAuthor

@ujfalusi could you please take a look at this one?

@ujfalusi

Copy link
Copy Markdown
Collaborator

@ujfalusi

Copy link
Copy Markdown
Collaborator

SOFCI TEST

@ujfalusiujfalusi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ranj063, I have only one nitpick, but let's wait for the CI result if the ADLP fw crash persists or not.

Comment threadsound/soc/sof/ipc4-topology.c Outdated
sizeof(struct sof_ipc4_audio_format));
/* copy Pin 0 output format */
if (available_fmt->num_output_formats && ret < available_fmt->num_output_formats &&
!available_fmt->output_pin_fmts[ret].pin_index)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nitpick: it would be cleaner to available_fmt->output_pin_fmts[ret].pin_index == 0 as the comment is also telling that we are looking for pin0

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

pin_index is a u32, so !available_fmt->output_pin_fmts[ret].pin_index == 0 is doing the same no?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know, they do the same thing, I was just saying that in this context !pin_index is not easily translates to the intention of pin_index == 0.
It was a nitpick observation.

Sign up for freeto 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.

8 participants

@ranj063@lgirdwood@ujfalusi@plbossart@bardliao@libinyang@kv2019i@aiChaoSONG