From: Tomi Manninen (isgpini@tl.krakow.pl)
Date: Thu Mar 11 2004 - 11:30:03 EET
On Thu, 2004-03-11 at 01:41, tus@voyage.fr wrote:
> So, if someone tells me how to modify the period and buffer sizes in
> soundmodem, I'll experiment and see if I can make the problem go away.
It's the ioctl(SNDCTL_DSP_SETFRAGMENT) call in soundcard/audioio.c.
This is from the OSS Programmers Guide (pp. 97-98):
int arg = 0xMMMMSSSS;
ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &arg);
The argument to this call is an integer encoded as 0xMMMMSSSS
(in hex). The 16 least significant bits determine the fragment
size. The size is 2^SSSS. For example SSSS=0008 gives fragment
size of 256 bytes (2^8). The minimum is 16 bytes (SSSS=4) and
the maximum is total_buffer_size/2. Some devices or processor
architectures may require larger fragments - in this case the
requested fragment size is automatically increased.
...
The 16 most significant bits (MMMM) determine the maximum number
of fragments. By default, the driver computes this based on
available buffer space. The minimum value is 2 and the maximum
depends on the total buffer space available for the device. Set
MMMM=0x7fff if you don't want to limit the number of fragments.
I don't think changing the fragment size is a solution though as it
affects the real-time preformance of soundmodem...
-- Tomi Manninen / OH2BNS / KP20ME04- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to lnonmzy@rdslink.ro More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b30 : Thu Mar 11 2004 - 11:32:26 EET