Skip to content

Conversation

@ranj063
Copy link
Collaborator

@ranj063 ranj063 commented Feb 9, 2023

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

@ranj063 any update ?

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

@plbossart plbossart left a comment

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
Collaborator Author

ranj063 commented Feb 15, 2023

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

@ujfalusi
Copy link
Collaborator

@ujfalusi
Copy link
Collaborator

SOFCI TEST

Copy link
Collaborator

@ujfalusi ujfalusi left a comment

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.

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
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
Collaborator Author

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
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 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.

8 participants