Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2006 11:48:39 +0400
From:      "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
To:        <freebsd-multimedia@freebsd.org>
Subject:   snd_emu10kx sound lag  workaround
Message-ID:  <D562966835368E4C8DDF68BC113A97B15F0643@demon.hhp.local>

next in thread | raw e-mail | index | archive | help
snd_emu10kx has a problem playing small sound files (it is silent) and
has some sound lag (on large files) with it's default buffer size of
EMUPAGESIZE*4 (=3D16K).
Workaround is to use smaller DMA buffer size (with buffer size =3D
EMUPAGESIZE (=3D4K)) as it was in snd_emu10k1 driver. Hardware can use a
buffer up to EMUPAGESIZE*8192 (=3D32M), if you use only one stereo
channel.

Default DMA buffer size is defined in sys/dev/sound/pci/emu10kx.h:
#define EMU_DEFAULT_BUFSZ	EMUPAGESIZE*4

It seems that driver plays data ahead of sound buffer updates,
 - with small files hardware never returns to start of buffer, with no
sound at all.
 - with large files it has a lag (length depends on sample rate) and
content of last update of hardware buffer is not played all.

I'll try to fix it or ask to commit a workaround next week.

Yuriy.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D562966835368E4C8DDF68BC113A97B15F0643>