Uh oh!
There was an error while loading. Please reload this page.
IPC4: simplify pcm conversion function and add LSB & MSB support - #7959
Conversation
kv2019i
left a comment
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
493dd4c to
2a5e466Compare
kv2019i
left a comment
There was a problem hiding this comment.
Thanks @RanderWang , looks good now!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lgirdwood
left a comment
There was a problem hiding this comment.
New enum values need to go at end and align with kernel.
Uh oh!
There was an error while loading. Please reload this page.
mengdonglin
commented
Aug 9, 2023
Part of fixes for #7697 |
lgirdwood
commented
Aug 9, 2023
SOFCI TEST |
c1c515a to
acbdd82CompareRanderWang
commented
Aug 17, 2023
sorry, I am still checking the error |
36916ab to
c96bb37CompareIt 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>
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>
lgirdwood
commented
Aug 21, 2023
@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. |
RanderWang
commented
Aug 22, 2023
@lgirdwood I set up the CI internal test in my environment and check the failed cases: |
lgirdwood
commented
Aug 22, 2023
@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 ! |
lrudyX
commented
Aug 22, 2023
CI results are unclear, lets wait for rerun. |
lrudyX
commented
Aug 22, 2023
Internal CI shows green :) |
kv2019i
commented
Aug 22, 2023
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