this fixes a "pcm0:virtual:0:dsp0.2: play interrupt timeout, channel dead" error
and sound dying after a few seconds of playback.
I encountered on my Thinkpad X40. It was discussed on freebsd-current in 2004[1] but that code is no longer present in FBSD while we still have it.
The patch removes a line fixing a channel timeout to 1 tick instead of the value calculated immediately beforehand, thus restoring the calculation.
[1] http://lists.freebsd.org/pipermail/freebsd-current/2004-September/036805.html
timeout = (hz * sndbuf_getblksz(bs)) / (sndbuf_getspd(bs) * sndbuf_getbps(bs));
if (timeout < 1)
timeout = 1;
- timeout = 1;
+ /* timeout = 1; */
ret = chn_sleep(c, "pcmwr", timeout);
if (ret == EWOULDBLOCK) {
count -= timeout;