Skip to content

Cold boot fixes - #193

Draft
Lawstorant wants to merge 7 commits into
masterfrom
cold-boot-fixes
Draft

Cold boot fixes#193
Lawstorant wants to merge 7 commits into
masterfrom
cold-boot-fixes

Conversation

@Lawstorant

Copy link
Copy Markdown

No description provided.

Lawstorant and others added 7 commits March 24, 2026 21:52
gip_headset_advance_pointer() compared a byte counter (stream->period,
incremented by the packet payload length in bytes) against
runtime->period_size, which is in frames.  For S16_LE mono
(2 bytes/frame), snd_pcm_period_elapsed() fired at twice the correct
rate; for stereo it fired at four times the correct rate.

Use snd_pcm_lib_period_bytes() to get the period size in bytes,
matching the unit of the counter.

(cherry picked from commit 90a6757)
usb_get_from_anchor removes the URB from the idle anchor and takes
a reference.  If the subsequent skb allocation fails, the URB was
leaked — neither re-anchored nor freed.  Over time under memory
pressure this permanently loses output URBs, making the dongle
unable to send data to controllers.

Re-anchor the URB and drop the reference before returning -ENOMEM.

(cherry picked from commit ef70379)
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