Skip to content

audio: codec_adapter: DTS codec problem when running with sof-mt8195-mt6359-rt1019-rt5682 topology #4901

@markbartonxperi

Description

@markbartonxperi

As a result of some internal testing on a machine running the sof-mt8195-mt6359-rt1019-rt5682 topology (but modified to use our DTS Codec pipeline on the speaker path in place of the passthrough pipeline) I received a bug report that audio output was not correct. In the recording I was sent I hear a small segment of buffer repeating ~10 times, then skipping ahead to another segment of buffer, which then repeated.

Looking at the sof log for the machine under test, a buffer under-run is being reported:

eg:

[   205547880.373928] (       54166.871094) c0 dai          1.6            src/audio/dai.c:954  WARN dai_copy(): Copy_bytes 192 + avail bytes 0 < period bytes 1920, possible glitch
[   205561422.248390] (       13541.874023) c0 dai          1.6            src/audio/dai.c:963  WARN dai_copy(): nothing to copy

... repeat many times...

Unfortunately I don't have access to the machine under test - my development system is an UP! Xtreme board, on which everything works. However, I compared the sof-hda-generic topology I use with the sof-mt8195-mt6359-rt1019-rt5682 topology and noticed the pipeline period in the sof-mt8195-mt6359-rt1019-rt5682 case was 10000, as opposed to 1000. After changing the PIPELINE_PCM_ADD and DAI_ADD declarations in sof-mt8195-mt6359-rt1019-rt5682.m4 and redeploying the topology to the machine under test, everything starting working.

Conversely, when I change the PIPELINE_PCM_ADD and DAI_ADD declarations in my version sof-hda-generic.m4 to use a period of 10000, I am able to replicate the problem heard on the machine under test in my environment.

Repeating the test with my codec_adapter-based DTS codec removed from the pipeline and only EQ in place, everything works on the machine under test with a period of either 1000 or 10000, which made me suspicious of my implementation, of course. I felt like I should be detecting a change in period (from 192 to 1920) somewhere in the life-cycle of my codec, which I should interpret as a signal to reallocate my input and output buffers. I've added logging in a fair-few locations now, and the period is always reported to my code as 192 bytes.

Is there something other than the period that I'm meant to check in order to understand that I should allocate larger buffers?

Thanks in advance
Mark

Metadata

Metadata

Assignees

Labels

codec adapterIssues related to codec adapter

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions