Skip to content

Conversation

@RanderWang
Copy link
Collaborator

Currently cSOF only supports S24_LE, now add S24_BE to support sample type IPC4_TYPE_MSB_INTEGER

Copy link
Collaborator

@kv2019i kv2019i left a 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.

@RanderWang RanderWang force-pushed the lsb_support branch 2 times, most recently from 493dd4c to 2a5e466 Compare July 20, 2023 09:14
Copy link
Collaborator

@kv2019i kv2019i left a 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!

Copy link
Member

@lgirdwood lgirdwood left a 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.

@lgirdwood lgirdwood added the ABI ABI change involved label Jul 31, 2023
@mengdonglin
Copy link
Collaborator

Part of fixes for #7697

@lgirdwood
Copy link
Member

SOFCI TEST

@RanderWang RanderWang force-pushed the lsb_support branch 2 times, most recently from c1c515a to acbdd82 Compare August 17, 2023 03:21
@RanderWang
Copy link
Collaborator Author

sorry, I am still checking the error

@RanderWang RanderWang requested a review from jsarha as a code owner August 18, 2023 07:38
@RanderWang RanderWang requested review from aiChaoSONG and removed request for ranj063 August 21, 2023 01:06
@RanderWang RanderWang requested a review from ranj063 as a code owner August 21, 2023 01:22
@RanderWang RanderWang force-pushed the lsb_support branch 2 times, most recently from 36916ab to c96bb37 Compare August 21, 2023 05:25
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>
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
Copy link
Member

@RanderWang can you check internal CI. thanks !

@RanderWang
Copy link
Collaborator Author

RanderWang commented Aug 22, 2023

@lgirdwood I checked and tried to modify it for a few days. 4 tests are failed
: TestEnterD3OnMasterCore TestD3StreamCreation TestD3StreamResume TestMemoryStateInfoGet. Most tests are related to power test.

All are failed with FW exception. I have no idea that why my PR can affect the SetDX.

2023-08-21 05:02:09,997 | Sending SetDx (C7000000, 00000000)
Payload:
00000001 00000000 
2023-08-21 05:02:10,137 | Notification FwExceptionNotification (9B0A0000, 00000000)

@RanderWang
Copy link
Collaborator Author

@lgirdwood I set up the CI internal test in my environment and check the failed cases:
TestD3StreamCreation TestD3StreamResume can work with my PR
TestEnterD3OnMasterCore TestMemoryStateInfoGet can't pass without my PR, so the failure are not caused by my PR.

@lgirdwood
Copy link
Member

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

lrudyX 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 !

CI results are unclear, lets wait for rerun.

@lrudyX
Copy link

lrudyX 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 !

CI results are unclear, lets wait for rerun.

Internal CI shows green :)

@kv2019i
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI ABI change involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants