Date: Fri, 22 Dec 2006 11:30:55 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: ariff@freebsd.org, freebsd-multimedia@freebsd.org Subject: SBC driver Message-ID: <200612221130.56361.hselasky@c2i.net>
next in thread | raw e-mail | index | archive | help
Hi,
I installed FreeBSD 6.2 BETA3 on a box with a soundcard that is detected as
"sbc0:". After some while of playing sound, it suddenly turns into white
noise. I think this is because of some buffer underrun, hence the computer is
not so fast, and it is running KDE, and the byte sync is lost.
In the following piece of code:
int
sndbuf_dmaptr(struct snd_dbuf *b)
{
int i;
KASSERT(b, ("sndbuf_dmaptr called with b == NULL"));
KASSERT(sndbuf_getflags(b) & SNDBUF_F_DMA, ("sndbuf_dmaptr called on
non-ISA buffer"));
if (!sndbuf_runsz(b))
return 0;
i = isa_dmastatus(b->dmachan);
KASSERT(i >= 0, ("isa_dmastatus returned %d", i));
return b->bufsize - i;
}
Can it be a good idea to align "i" for 16-bit stereo?
i = isa_dmastatus(b->dmachan) & ~3;
Or even a little bit more:
i = isa_dmastatus(b->dmachan) & ~7;
So that one doesn't write 1 byte, then it underruns, and then one write 3
bytes at the new position?
Yours
--HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612221130.56361.hselasky>
