Download raw body.
sndiod: Fix random restarts under load, please test
hi, On Thu, Oct 23, 2025 at 11:26:39AM +0200, Alexandre Ratchov wrote: > Currently, upon an audio(4) buffer underrun, we compensate for the > inserted silence immediately, without stopping DMA. This is to make > the underrun sound less unpleasant. Unfortunately, after ~15 years and > many hacks this approach still doesn't work: sometimes the device just > stops working, a watchdog timer (another hack) disconnects all the > clients and closes the device. > > This diff below is to use a simpler and more robust approach: upon an > underrun, stop DMA, restore the device state and restart. Underruns > will be more audible (because restarting inserts a full buffer of > silence) but this fixes the disconnects (and removes the need for all > the ugly hacks, that will be removed later). > > The code is very short but not trivial and all the upper layers depend > on it, so this diff is worth testing. i've been running this diff for the last couple of days. the underruns are much more more audible, but this seems to otherwise work. it seems to have fixed the disconnects, for me! that is nice, thank you :-)
sndiod: Fix random restarts under load, please test