From alsa-devel-owner@alsa.jcu.cz  Mon Jun 22 19:52:51 1998
Received: from nets.tref.nl (nets.tref.nl [145.72.65.105])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id TAA08201
	for <alsa-devel@jcu.cz>; Mon, 22 Jun 1998 19:51:36 +0200
Received: from orbital (arloafoe@ASV01P30.tref.nl [145.72.68.142])
	by nets.tref.nl (8.8.7/8.8.7) with SMTP id TAA94152
	for <alsa-devel@jcu.cz>; Mon, 22 Jun 1998 19:51:18 +0200
Date: Mon, 22 Jun 1998 20:01:11 +0200 (CEST)
From: Andy Lo A Foe <arloafoe@cs.vu.nl>
To: alsa-devel@jcu.cz
Subject: SNDCTL_DSP_SETFRAGMENT
Message-ID: <Pine.LNX.3.96.980622195010.3317A-100000@orbital>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Hi,

I'm coding an app that needs quick response from the DAC device so I'm
using the SNDCTL_DSP_SETFRAGMENT ioctl call to set a fragment size.
My code looks like this:

long param;

param = ( 0x0200 << 16) + 0x0008;

if (ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &param) == -1) {  
                ...error handling...
}

This will create a fragment size of 0x200 (512 bytes), I think :)
But what does the  number in the lower 16-bits really do (0x0008)?

Now, when doing playback I sometimes experience small (barely
noticable, but they're there) hickups in the stream. This seems to happen
with both the ALSA driver and the kernel sound driver. I'm using write()
to send data to the DAC device. Is this the right thing to do?
When not using the fragment code everything sounds ok, but then latency
is bad of course...

Thanks,

-Adnans

--
Andy Lo A Foe, arloafoe@cs.vu.nl | Linux v2.1.105 | "World domination.
http://www.cs.vu.nl/~arloafoe    |   BeOS R3 PPC  |  Fast." -- Linus
BeBox dual 133Mhz, BeDev: E-1516 |  ICQ: 7472949  |    IRC: Adnans


