Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback d… #5285

Open
wants to merge 1 commit into
base: topic/sof-dev
Choose a base branch
from

Conversation

ujfalusi
Copy link
Collaborator

@ujfalusi ujfalusi commented Jan 8, 2025

…irection

The firmware does not provide any information for capture streams via the shared pipeline registers.

To avoid reporting invalid delay value for capture streams to user space we need to disable it.

Fixes: af74dbd ("ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature")
Cc: [email protected]

…irection

The firmware does not provide any information for capture streams via the
shared pipeline registers.

To avoid reporting invalid delay value for capture streams to user space
we need to disable it.

Fixes: af74dbd ("ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature")
Cc: [email protected]
Signed-off-by: Peter Ujfalusi <[email protected]>
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.

@ujfalusi are you saying we are missing information about capture streams ? is this a FW bug ? @kv2019i

@ujfalusi
Copy link
Collaborator Author

ujfalusi commented Jan 9, 2025

@ujfalusi are you saying we are missing information about capture streams ? is this a FW bug ? @kv2019i

I think it is by design in firmware that no pipeline information is kept for capture streams:
https://github.com/thesofproject/sof/blob/c1df459ca914c89d3cd51bac44a9e683d8eba395/src/audio/copier/copier.c#L327

Somehow the number of fw registers section depends on the number of playback channels:
https://github.com/thesofproject/sof/blob/c1df459ca914c89d3cd51bac44a9e683d8eba395/src/audio/copier/copier_host.c#L108-L111

The pipeline regs are only initialized in case of playback, that's why pipeline_reg_offset remains 0 for capture streams:
https://github.com/thesofproject/sof/blob/c1df459ca914c89d3cd51bac44a9e683d8eba395/src/audio/copier/copier_host.c#L212

It looks to be by design.

@ujfalusi
Copy link
Collaborator Author

ujfalusi commented Jan 9, 2025

I can fix this in kernel...

@ujfalusi ujfalusi closed this Jan 9, 2025
@ujfalusi
Copy link
Collaborator Author

ujfalusi commented Jan 9, 2025

I could handle this in kernel, but it is only going to work for HD-DMA on link side and even with that it is not going to work in case of a split topology path (one DAI to multiple PCMs). It is better and safer to not report the delay in capture at all.

@ujfalusi ujfalusi reopened this Jan 9, 2025
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.

2 participants