[linux-audio-dev] fragmentcount ioctl with - 1?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] fragmentcount ioctl with - 1?
From: Stefan Westerfeld (stefan_AT_space.twc.de)
Date: Fri Sep 08 2000 - 00:32:26 EEST


   Hi!

I just found out that if I try to initialize the fragment count/size, then my
code is currently always wrong by 1. It seems that when using

ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, 0xMMMMSSSS);

then 2^SSSS is the usual fragment value, whereas MMMM is the number of
fragments MINUS 1. Can anybody confirm this MINUS 1 (didn't find it in
the docs), or is MMMM really supposed to be the number of fragments, and
its just that the driver is wrong here?

To illustrate: ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, 0x0002000a) gives
me 3 (!) fragments with 1024 (2^10) bytes. Using 0x0001000a gives me
2 fragments.

   Cu... Stefan

-- 
  -* Stefan Westerfeld, stefan_AT_space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Sep 08 2000 - 01:30:16 EEST