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

PR5136 + ASOC: SOF: Intel: hda-stream: report DMA position if FW load fail #5141

Draft
wants to merge 3 commits into
base: topic/sof-dev
Choose a base branch
from

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Aug 7, 2024

kv2019i added 3 commits August 6, 2024 12:28
Commit 9ee3f0d (" ASOC: SOF: Intel: hda-loader: only wait for
HDaudio IOC for IPC4 devices") removed DMA wait for IPC3 case.
Proceed and remove the wait for IPC4 devices as well.

There is no dependency to IPC version in the load logic and
checking the firmware status is a sufficient check in case of
errors.

The removed code also had a bug in that -ETIMEDOUT is returned
without stopping the DMA transfer.

Link: thesofproject#5135
Suggested-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Kai Vehmanen <[email protected]>
When a single-shot DMA is complete, hda_dsp_stream_get_position()
will point to hstream->bufsize.

Current code zeros out the returned position in this case as
ALSA core does not expect to get such values in its pointer callback.
While valid in the ALSA case, this is no helpful when debugging
other DMA usages, e.g. firmware loading.

Allow valid value of hstream->bufsize to be returned as a position.

Signed-off-by: Kai Vehmanen <[email protected]>
To help debugging FW load failures, print out the last position
of the DMA used to load the firmware image. This allows to see whether
DMA transfer has started and whether it completed.

Signed-off-by: Kai Vehmanen <[email protected]>
@kv2019i kv2019i requested review from plbossart and ujfalusi August 7, 2024 13:21
@kv2019i
Copy link
Collaborator Author

kv2019i commented Aug 7, 2024

Example how we could add debugging tools back after the IOC check is removed.

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.

1 participant