Opened 9 years ago

Last modified 9 years ago

#1677 new defect

ao:alsa, audio frame skipping (au8830)

Reported by: dottomi@… Owned by: reimar
Priority: normal Component: ao
Version: unspecified Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

When playing audio (from any file), MPlayer is skipping audio samples.
I noticed that the first skip takes place the same time “filtered audio buffer size“ increases (while playing):

alsa-init: got buffersize=65536
...
Starting playback...
Increasing filtered audio buffer size from 0 to 65536
A: 0.0 (00.0) of 89.0 (01:29.0) ??,?%
...
A: 8.9 (08.8) of 89.0 (01:29.0) 0.2%
A: 8.9 (08.8) of 89.0 (01:29.0) 0.2%


Increasing filtered audio buffer size from 65536 to 67584
A: 9.3 (09.2) of 89.0 (01:29.0) 0.2%


A: 9.3 (09.2) of 89.0 (01:29.0) 0.2%

The buffer size doesn't change later on, but the skipping occurs, at random interval.

It looks like it buffer underruns. I added a line near line 818 in libao2/ao_alsa.c (1.0_rc4_p20100213) to output a message when “ret > ao_data.buffersize” is true on that line, and it did output it when it skips.

Using integrated sound card (V8237) instead of the PCI one I normally use (au8830) makes the problem to not appear, but XMMS2 somehow plays everything fine on the latter card. Probably the ALSA card driver is buggy, but I'd like to know what doesn't work right here.

Attachments (1)

mplayerlogs.tar.bz2 (76.1 KB) - added by dottomi@… 9 years ago.
mplayer logs for different audio stream formats

Download all attachments as: .zip

Change History (3)

comment:1 Changed 9 years ago by reimar

Please always give the full (-v) MPlayer output, for example at least the period size value is essential.
And what precisely means "any file", are they all MP3, or also AAC or uncompressed or ..., and what sample rates, channel counts etc.?
If it was a 196kHz, 8 channel, float audio file that 64kB buffer wouldn't even be 10 ms, and MPlayer wouldn't be able to handle that (well, I guess the PCI bus probably couldn't either).
For more "normal" files it looks reasonable, but that also depends on the corresponding period size.

Changed 9 years ago by dottomi@…

mplayer logs for different audio stream formats

comment:2 Changed 9 years ago by dottomi@…

Guess I didn't test it right. By “any file” I meant “be it either WAVE, MP3, OGG, AAC, MKV, AVI or streamed WMA”, but I completely forgot about sample rates, etc.

Here's the logs for different audio stream formats. Looks like only 44100Hz and 48000Hz at s16le, 2 channels plays anything.

Note: See TracTickets for help on using tickets.