Skip to content

ASoC: qcom: q6asm-dai: Retry writes that hit a full SMD FIFO - #458

Closed
vlw wants to merge 1 commit into
msm8916-mainline:wip/msm8916/7.0from
vlw:q6asm-dai-eagain
Closed

vlw wants to merge 1 commit into
msm8916-mainline:wip/msm8916/7.0from
vlw:q6asm-dai-eagain

Conversation

@vlw

@vlw vlw commented Nov 15, 2026

Copy link
Copy Markdown

A full SMD FIFO (-EAGAIN) while queueing periods was treated as fatal and stopped playback right after it started. The remaining periods are now sent when the DSP returns a buffer.

Tested on a Samsung Galaxy A3 (SM-A300F, MSM8916) running LineageOS 24. Playback no longer stops at the start.

Per CONTRIBUTING.md this touches a shared upstream driver, so it is posted here for early review before going to the upstream lists.

q6asm_dai_ack() queues every period the application has written, one
APR packet each, sent with rpmsg_trysend(). A large write can fill the
SMD FIFO. q6asm_write_async() then returns -EAGAIN, and the ack fails,
which stops the stream.

Stop queueing on -EAGAIN instead, and push the remaining periods when
the DSP hands a buffer back with DATA_WRITE_DONE. Both callers share
the queueing loop under prtd->lock. Initialize that lock for PCM
streams, which so far only the compress path did.

Tested on MSM8916, where playback used to stop right after it started.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Vladimir Bely <vlwwwwww@gmail.com>
@vlw vlw closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant