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

[SOF-2.7] Add 24bit msb support #8171

Merged
merged 5 commits into from
Sep 7, 2023

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Sep 6, 2023

Backport of #8151

It is missed in kconfig.

Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit 67f9862)
For sample format with 24 bits valid sample bit and 32 bits container,
valid sample is at msb 24bits if IPC4_TYPE_MSB_INTEGER is set.

Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit ea10065)
Remove gateway type and direction for pcm conversion check and will move
them to copier module. This will make pcm conversion check more general
and simple. Also remove s16/c32 for gateway since it is never used.

Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit eec45d1)
At first the sample type is set to MSB_INTEGER to follow windows
settings, but actually we use LSB_INTERGER type such as S24_4LE.
Now change the default sample type to LSB_INTERGER to align with
FW usage. For DAI copier we need to use MSB_INTERGER for hardware
requirement. Currently sample type only affect s24/c32 case, so only
change sample type in dai for this format config.

FW will use sample type to choose correct format conversion
function and can deal with Windows audio stream correctly with MSB
s24/c32 format.

out_fmt_cfg is redefined for a alsa-lib bug. Alsa-lib will first process
out_fmt_cfg = '$[($out_channels | ($out_valid_bit_depth * 256)) |
($out_sample_type * 65536)]' in base class and then deal with
out_sample_type, so error is reported. Now first define out_sample_type
and then out_fmt_cfg, everything works.

Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit fc8a4b6)
Adjust valid format in copier for some types of dai gateway which
need to use MSB type.

Currently sample type only affect the copier module so we don't do
it in audio_stream_fmt_conversion.

Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit 65b2e0b)
@kv2019i
Copy link
Collaborator Author

kv2019i commented Sep 6, 2023

@RanderWang Can you verify I did the backport looks good?

@kv2019i kv2019i requested a review from alex-cri September 6, 2023 16:42
Copy link
Collaborator

@RanderWang RanderWang left a comment

Choose a reason for hiding this comment

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

@kv2019i Thanks! Perfect!

@kv2019i
Copy link
Collaborator Author

kv2019i commented Sep 7, 2023

One pause-resume fail in https://sof-ci.01.org/sofpr/PR8171/build12665/devicetest is a DUT issue related to dmic. This can be ignored. Rest of tests pass. as this was already reviewed in mainline, proceeding with merge.

@kv2019i kv2019i merged commit 2d834e9 into thesofproject:stable-v2.7 Sep 7, 2023
38 of 41 checks passed
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