-
Notifications
You must be signed in to change notification settings - Fork 349
IPC4: simplify pcm conversion function and add LSB & MSB support #7959
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
Conversation
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach to move the DAI-specific overrides to copier, but I think the confusion of what LSB/MSB means is still causing problems here. LE/BE (endianess) is not the same thing at all and we shouldn't mix these. Please see comments inline.
493dd4c to
2a5e466
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RanderWang , looks good now!
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New enum values need to go at end and align with kernel.
|
Part of fixes for #7697 |
|
SOFCI TEST |
c1c515a to
acbdd82
Compare
|
sorry, I am still checking the error |
1882347 to
36437ee
Compare
36916ab to
c96bb37
Compare
It is missed in kconfig. Signed-off-by: Rander Wang <rander.wang@intel.com>
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 <rander.wang@intel.com>
c96bb37 to
c2349c7
Compare
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 <rander.wang@intel.com>
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 <rander.wang@intel.com>
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 <rander.wang@intel.com>
|
@RanderWang can you check internal CI. thanks ! |
|
@lgirdwood I checked and tried to modify it for a few days. 4 tests are failed All are failed with FW exception. I have no idea that why my PR can affect the SetDX. |
|
@lgirdwood I set up the CI internal test in my environment and check the failed cases: |
|
@wszypelt @lrudyX can someone check CI results, @RanderWang has checked and cant explain why this PR would fail PM tests when its related to audio format converion. Could be a false positive ? Thanks ! |
CI results are unclear, lets wait for rerun. |
Internal CI shows green :) |
|
Known fail in https://sof-ci.01.org/sofpr/PR7959/build11852/devicetest/index.html , rest is good, proceeding with merge. Thanks @RanderWang , this was a long one. Thanks @lrudyX for checking the test results. |
Currently cSOF only supports S24_LE, now add S24_BE to support sample type IPC4_TYPE_MSB_INTEGER