Skip to content

Conversation

@singalsu
Copy link
Collaborator

@singalsu singalsu commented May 2, 2023

This patch adds 8 - 192 kHz playback and capture SRC to nocodec topologies such sof-tgl-nocodec.tplg. It enables testing of SRC component with IPC4.

@singalsu
Copy link
Collaborator Author

singalsu commented May 2, 2023

The topology sof-tgl-nocodec.tplg after change, see pipelines for copier.host.5.1 and copier.host.11.1:

sof-tgl-nocodec

Updated picture after rebase & conflict fix:

sof-tgl-nocodec

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.

Good idea to add SRC @singalsu, see a couple of comments below.

@ranj063
Copy link
Collaborator

ranj063 commented May 4, 2023

@singalsu you need the kernel patches first before this tplg change right?

@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 4639ad6 to 71a1a68 Compare May 5, 2023 16:22
@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 71a1a68 to 6af9726 Compare May 9, 2023 11:02
@singalsu
Copy link
Collaborator Author

singalsu commented May 9, 2023

@singalsu you need the kernel patches first before this tplg change right?

Yep, it can't work without your PR

@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch 2 times, most recently from d7ed044 to 457b0d3 Compare May 24, 2023 10:20
@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 457b0d3 to fa682bf Compare June 1, 2023 09:30
@singalsu singalsu requested review from plbossart and ranj063 June 1, 2023 09:31
@ranj063
Copy link
Collaborator

ranj063 commented Jun 2, 2023

SOFCI TEST

@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from fa682bf to 355c979 Compare June 13, 2023 09:37
@singalsu
Copy link
Collaborator Author

No changes, rebase and push in hope to get all green result. Previous run had 43 successful, 1 failing (unrelated looking sof-ci/jenkins/per-device-test/main-ace fail.

@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 355c979 to 795000b Compare June 19, 2023 08:16
@singalsu
Copy link
Collaborator Author

No changes, pushed again to see better success with CI.

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 19, 2023

Test speaker test is still failing https://sof-ci.01.org/sofpr/PR7547/build9796/devicetest/index.html?model=TGLU_RVP_NOCODEC_IPC4ZPH&testcase=test-speaker

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 21, 2023

@singalsu Let's file a but to https://github.com/thesofproject/sof-test/issues . I think we need a test case fix first to merge this as otherwise every PR test will fail to this and this can mask other bugs.

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 21, 2023

@singalsu Let's file a but to https://github.com/thesofproject/sof-test/issues .

Because it's the same organization, we can transfer issues from sof to sof-test in just one click, check the right side of this page.

@singalsu
Copy link
Collaborator Author

@lgirdwood @kv2019i Please prioritize since we have a testing gap for SRC component. This PR has been available since May.

@singalsu
Copy link
Collaborator Author

@lgirdwood @kv2019i Please prioritize since we have a testing gap for SRC component. This PR has been available since May.

Seems we have still the bug in alsabat speaker test CI script. For non-48 kHz rates it should not use -t wav but -t pink because the "left", "right" utterances wav files are for 48 kHz tests only. The pink noise test supports any rate. So need to put priority to fix CI to get green result for this PR.

@lgirdwood
Copy link
Member

@singalsu pls ping when ready with test updates.

@singalsu
Copy link
Collaborator Author

@kv2019i Previous run, 45 successful and 2 unrelated failing checks, trying to get all green with new push. No changes.

@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch 2 times, most recently from 7ce166a to 0e83c1c Compare August 15, 2023 09:23
@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

@singalsu rerunning CI, as a lot of red in the results so possibly a regression.

@singalsu
Copy link
Collaborator Author

@singalsu rerunning CI, as a lot of red in the results so possibly a regression.

Yes there seems to be a regression. FW crashes to exception with capture direction SRC.

@lgirdwood
Copy link
Member

@singalsu rerunning CI, as a lot of red in the results so possibly a regression.

Yes there seems to be a regression. FW crashes to exception with capture direction SRC.

Can you merge @marcinszkudlinski SRC rate fix PR locally and retry, may be a dependecy.

@singalsu
Copy link
Collaborator Author

@singalsu rerunning CI, as a lot of red in the results so possibly a regression.

Yes there seems to be a regression. FW crashes to exception with capture direction SRC.

Can you merge @marcinszkudlinski SRC rate fix PR locally and retry, may be a dependecy.

It doesn't help. There's something else wrong too.

@@ -0,0 +1,346 @@
#src format array
Copy link
Contributor

Choose a reason for hiding this comment

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

May I know the SRC module real capability? I mean does it really support all input format --> output format sample rate converter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You can see the conversions matrix in https://github.com/thesofproject/sof/blob/main/tools/tune/src/src_ipc4_int32.m. There are not many unsupported in/out rates, those zeros.

#
# PCM1 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP1
# PCM2 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP2
# PCM2 ---> SRC ---> Mixin ---> Mixout ---> gain ---> SSP2
Copy link
Contributor

Choose a reason for hiding this comment

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

in your tplg, PCM2-->gain-->SRC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes, I need to fix the comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

This patch removes rule to require fixed rate_out for SRC
widget. A capture SRC in host pipeline or near it has typically
variable output rate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces src_format.conf and src_passthrough_format.conf
with more specific formats definitions for host copiers,
pass-through components, playback src, and capture src.

The DSP internal pipelines are 32 bits, so src_s32_passthrough.conf
is used for components like gain those pass the 8 - 192 kHz
rates with s32 format.

The formats in src_format_sxx_to_s32_convert.conf is for use for
for playback host copier. Input formats are s16/24/32 and the only
output format is s32. Similarly the  src_format_s32_to_sxx_convert.conf
is for capture host copier.

The formats for playback SRC are in src_format_s32_convert_to_48k.conf,
and the formats for capture are in src_format_s32_convert_from_48k.conf.

The new formats definitions use the input_audio_format and
output_audio_format objects instead of audio_format. The unnecessary
word lengths are removed to minimize the formats count in every
component.

The pipelines host-copier-gain-src-mixin-playback.conf and
src-gain-mixin-playback.conf those used the previous format definitions
are updated with these changes.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 0e83c1c to 2fdf3e9 Compare September 1, 2023 14:59
@singalsu
Copy link
Collaborator Author

singalsu commented Sep 1, 2023

CI result "46 successful and 1 failing checks". Failed is sparse and this is all topology so not related.

I'll fix next the comment issue found by @btian1 .

This patch adds 8 - 192 kHz playback and capture SRC to nocodec
topologies such sof-tgl-nocodec.tplg. It enables testing of SRC
component with IPC4 via the SSP loopback in the nocodec topologies

E.g. Play random noise at 44.1 kHz and capture it as 32 kHz. The
SSP loopback runs internally at 48 kHz.

aplay -Dhw:0,2 -f S32_LE -c 2 -r 44100 -d 10 -t raw /dev/random
arecord -Dhw:0,2 -f S16_LE -c 2 -r 32000 -d 10 /tmp/recording.wav

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the nocodec_tplg2_add_src branch from 2fdf3e9 to d97a963 Compare September 1, 2023 18:40
@singalsu singalsu requested a review from btian1 September 1, 2023 18:41
@singalsu
Copy link
Collaborator Author

singalsu commented Sep 4, 2023

Nice, "46 successful and 1 failing checks", the failing sparse is not related.

@kv2019i kv2019i merged commit 2a7a94d into thesofproject:main Sep 5, 2023
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.

8 participants