Kai Vehmanen <[EMAIL PROTECTED]>: > And another cs4281 mystery: with 0.9.0rc1 the record wakeup is constantly > late. Even though I've set avail_min to x frames, upon wake-up there's > continuously more than y*x frames available (ie. not just a few samples). > This is not a scheduling issue as the playback direction works fine (if > not counting system load spikes, there's always ~avail_min of data > available).
It will only wake up on the period border AFAIK. And you can have maximum 2 periods per buffer... I have cs4281.c (forked about revision 1.20) supporting any number of periods (ported alsa-5 code from Pekka Pessi). It also allows to actually get sound from the secondary codec (but still within single stereo stream) so one can for example get 2 left channels input and 2 right output or so. I have attached it as cs4281.c-tom6.gz. I understand that mangle_channels code is very specialized, but the interrupt handler allowing more periods would be of benefit to all. I would be grateful if someone could audit and take over this part of the code. Or please advice me what should I do to make it easier to digest. > From: ext Sander van Leeuwen [mailto:[EMAIL PROTECTED]] > Sent: 08 August, 2002 13:38 I have a feeling that a lot of your changes are already in ALSA CVS (especially 1.22-1.23 diff). > - Increased loop delays during init to prevent detection failures That one is really important. I often need to load the current driver 2 times to avoid timeouts. > The attached source file isn't up to date with the latest CVS. All my changes are >marked by > #ifdef TARGET_OS2. #ifdef TARGET_OS2 end_time = (jiffies + 1000) + 1; Well, you mean jiffies + 10*HZ, don't you ? Please do not make assumptions about HZ, I am running it at 2000 Hz. Best regards, -- Tomasz Motylewski P.S. To Takashi and Jaroslav: am I on your kill-list or so? I have received no comments about reported problems with alsa-lib (snd_pcm_mmap_*_avail).
cs4281.c-tom6.gz
Description: Binary data