Skip to content

SRC frame format detect logic fix and topology add for testing capture via SRC - #1947

Merged
tlauda merged 3 commits into
thesofproject:masterfrom
singalsu:src_fix_format_logic
Oct 17, 2019
Merged

tlauda merged 3 commits into
thesofproject:masterfrom
singalsu:src_fix_format_logic

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

This patch set fixes corrupt audio in SRC capture if the pipeline needs to convert PCM format from capture DAI format. Check is added to fail prepare() if pipelines requires SRC to convert between frame formats. The earlier version did not handle correctly 16 bit capture from 32 bit configured DAI. A test topology is added since earlier there was no topology to test capture-SRC.

@tlauda tlauda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you still see FW panic?

@singalsu

Copy link
Copy Markdown
Collaborator Author

Do you still see FW panic?

Yes, this was a different issue. There's still the panic if I capture from a DAI with lower rate than DAI rate. Capturing from 16 kHz with 16 - 48 kHz works OK.

Comment thread tools/topology/sof-apl-src-dmic.m4 Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update to use SCHEDULE_TIME_DOMAIN_TIMER.
Master branch has been updated in the meantime.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, done!

Comment thread tools/topology/sof-apl-src-dmic.m4 Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update to use SCHEDULE_TIME_DOMAIN_TIMER.
Master branch has been updated in the meantime.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep.

@singalsu
singalsu force-pushed the src_fix_format_logic branch from 31e5a86 to 37ead96 Compare October 16, 2019 13:16
@singalsu

Copy link
Copy Markdown
Collaborator Author

SOFCI TEST

Comment thread tools/topology/sof/pipe-src-capture.m4 Outdated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There's no undefine() for these macros. They are not needed outside this macro so better to do it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done now (undefines add plus minor topology cleanup). I also created separate pipeline building block macros pipe-src-capture.m4 and pipe-src-volume-capture.m4. The latter is more generic with format convert capability. The other ASRC PR has similar pipeline macros.

This patch avoids wrong configuration for PCM format and audio
corruption in capture pipelines usage if the pipeline requires
format conversion.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The earlier error message was hard to understand and could be
mistaken as internal fail. A redundant trace message about block
sizes is removed because the block sizes are set in each copy()
in current SRC version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds topology sof-apl-src-dmic.m4 to test capture SRC.
The topology instantiates SRCs for 48 -> 8-48 kHz and 16 -> 8-48 kHz
capture. The volume component in pipeline handles PCM format
conversion from the fixed S32_LE DMIC DAI format. Also the bugs in
the earlier non-used pipeline macro are fixed.

The macro pipe-src-capture.m4 is renamed to pipe-src-volume-capture.m4
since it contains a volume component. A new macro pipe-src-capture.m4
is created to provide pipeline building block without volume.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu force-pushed the src_fix_format_logic branch from 37ead96 to 65fb06e Compare October 17, 2019 12:23
@tlauda
tlauda merged commit 81cc31b into thesofproject:master Oct 17, 2019
@singalsu
singalsu deleted the src_fix_format_logic branch January 27, 2021 08:53
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.

3 participants