Skip to content
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

SRC fixes #4341

Merged
merged 3 commits into from
May 16, 2023
Merged

SRC fixes #4341

merged 3 commits into from
May 16, 2023

Conversation

ranj063
Copy link
Collaborator

@ranj063 ranj063 commented May 6, 2023

No description provided.

bardliao
bardliao previously approved these changes May 8, 2023
singalsu
singalsu previously approved these changes May 8, 2023
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.

Tested a number of playback and capture SRC rates combinations 32/44.1/48/96 kHz and everything worked. (thesofproject/sof#7547, thesofproject/sof#7440 needed).

I assume similar change will be needed for ASRC.

@ranj063
Copy link
Collaborator Author

ranj063 commented May 8, 2023

SOFCI TEST

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.

not following this PR at all @ranj063 @singalsu, too many hard-coded assumptions for me.

sound/soc/sof/ipc4-topology.c Show resolved Hide resolved
sound/soc/sof/ipc4-topology.c Show resolved Hide resolved
sound/soc/sof/ipc4-topology.c Show resolved Hide resolved
out_ref_valid_bits = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(in_fmt->fmt_cfg);
/*
* For playback, the SRC will only ever have a single output format based on what the DAI
* supports. The reference params will be ignored when choosing the only available format.
Copy link
Member

Choose a reason for hiding this comment

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

it's also wrong to assume that the SRC output is related directly in a 1:1 manner to the DAI. We could perfectly have multiple stages with two SRC, one to go to 48kHz and a second to reach 192kHz.

sound/soc/sof/ipc4-topology.c Show resolved Hide resolved
bardliao
bardliao previously approved these changes May 10, 2023
…ormat

Modify the pipeline_params based on the SRC output format and set the
sink_rate in the IPC data.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
For playback, the SRC sink rate must be configured based on the requested
output format which is restricted to only handle DAI's that support a
single audio format for now. For capture, the SRC module should convert
the rate to match the rate requested by the PCM hw_params.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When we walk the list of connected widgets from the source to the sink
to prepare all widgets, the pipeline_params must be modified to reflect
the output audio format at each widget. But, the copier only modifies
the sample format in the pipeline_params. So, fix it to also modify the
rate and channels.

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.

thanks @ranj063

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.

Works well, thanks @ranj063 !

@plbossart
Copy link
Member

plbossart commented May 16, 2023

big regression on ADLP_RVP_NOCODEC_IPC4ZPH https://sof-ci.01.org/linuxpr/PR4341/build4885/devicetest/index.html, is this a known issue @ranj063?

@ranj063
Copy link
Collaborator Author

ranj063 commented May 16, 2023

big regression on ADLP_RVP_NOCODEC_IPC4ZPH https://sof-ci.01.org/linuxpr/PR4341/build4885/devicetest/index.html, is this a known issue @ranj063?

@plbossart I think there's an issue with that particular device. It fails on several PRs

@ranj063
Copy link
Collaborator Author

ranj063 commented May 16, 2023

SOFCI TEST

@ranj063
Copy link
Collaborator Author

ranj063 commented May 16, 2023

big regression on ADLP_RVP_NOCODEC_IPC4ZPH https://sof-ci.01.org/linuxpr/PR4341/build4885/devicetest/index.html, is this a known issue @ranj063?

@plbossart i ran the pr test manually https://sof-ci.ostc.intel.com/#/result/planresultdetail/25789 and it looks good.

@plbossart plbossart merged commit 276d859 into thesofproject:topic/sof-dev May 16, 2023
@ranj063 ranj063 deleted the fix/src_formats branch May 16, 2023 22:19
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