Comment 47 for bug 825709

Revision history for this message
David Henningsson (diwic) wrote : Re: Choppy sound due to excessive rewinding on low-end (Atom) CPUs

@Stefano, many thanks!

From the pulseverbose log it seems like there is a driver problem of not reporting the hw position correctly.

( 135.836| 0.000) D: [alsa-sink] alsa-sink.c: avail: 336892 (filled: 15876)
( 135.836| 0.000) D: [alsa-sink] alsa-sink.c: 90.00 ms left to play; inc threshold = 0.00 ms; dec threshold = 100.00 ms
( 135.836| 0.000) D: [alsa-sink] alsa-sink.c: work_done = 0
( 135.836| 0.000) D: [alsa-sink] alsa-sink.c: Waking up in 60.00ms (system clock).
( 135.896| 0.060) D: [alsa-sink] alsa-sink.c: avail: 336892 (filled: 15876)
( 135.896| 0.000) D: [alsa-sink] alsa-sink.c: 90.00 ms left to play; inc threshold = 0.00 ms; dec threshold = 100.00 ms
( 135.896| 0.000) D: [alsa-sink] alsa-sink.c: work_done = 0
( 135.896| 0.000) D: [alsa-sink] alsa-sink.c: Waking up in 60.00ms (system clock).

Notice there are 60 ms between the first and second check of "avail", yet "avail" is not increasing (which it should be doing, if the audio was playing back). Then, suddenly:

( 136.170| 0.060) D: [alsa-sink] alsa-sink.c: avail: 336892 (filled: 15876)
( 136.170| 0.000) D: [alsa-sink] alsa-sink.c: 90.00 ms left to play; inc threshold = 0.00 ms; dec threshold = 100.00 ms
( 136.170| 0.000) D: [alsa-sink] alsa-sink.c: work_done = 0
( 136.171| 0.000) D: [alsa-sink] alsa-sink.c: Waking up in 60.00ms (system clock).
( 136.231| 0.060) D: [alsa-sink] alsa-sink.c: avail: 689660 (filled: 4294630404)
( 136.231| 0.000) D: [alsa-sink] alsa-sink.c: 0.00 ms left to play; inc threshold = 0.00 ms; dec threshold = 100.00 ms

And then, two seconds later (with a latency of ~100 ms!), the underrun is a fact.