Re: [Alsa-devel] alsa timer slippage

2003-12-17 Thread Chris Cannam
On Wednesday 17 Dec 2003 3:13 pm, Jaroslav Kysela wrote: > Thanks for insigh to the problem. Can you try the attached patch? Yes, that's a success. Thank you. It's still not absolutely perfect, but it's significantly better than the original version. I've seen one slippage (of about 40ms, und

Re: [Alsa-devel] alsa timer slippage

2003-12-17 Thread Jaroslav Kysela
On Mon, 15 Dec 2003, Chris Cannam wrote: > On Monday 15 Dec 2003 9:16 am, Chris Cannam wrote: > > This seems to suggest that the default system-based timer is doing > > something a bit naive, like assuming it was called back on time > > without actually checking. > > Hmm yes, even this crappy lit

Re: [Alsa-devel] alsa timer slippage

2003-12-15 Thread Chris Cannam
On Monday 15 Dec 2003 9:16 am, Chris Cannam wrote: > This seems to suggest that the default system-based timer is doing > something a bit naive, like assuming it was called back on time > without actually checking. Hmm yes, even this crappy little patch to alsa-kernel/core/timer.c (gross adjustme

Re: [Alsa-devel] alsa timer slippage

2003-12-15 Thread Chris Cannam
On Monday 15 Dec 2003 1:30 am, Pedro Lopez-Cabanillas wrote: > The ALSA MIDI sequencer can use several timer sources. By default, > it uses the Linux system timer functions [...] > Other timer sources are PCM devices and the RTC timer. Ah... so that puts Jan's comment into perspective. I could ha

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Pedro Lopez-Cabanillas
Chris Cannam wrote: > While trying to track down the source of some poor timing in > sequencing, I've noticed that my ALSA sequencer queue timer has a > tendency to fall suddenly behind. > > I have a little test program (available on request) that just starts a > queue and every second or so compar

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Fernando Pablo Lopez-Lezcano
On Sun, 2003-12-14 at 06:48, Chris Cannam wrote: > On Sunday 14 Dec 2003 2:34 pm, Chris Cannam wrote: > > On Sunday 14 Dec 2003 2:02 pm, Jan Depner wrote: > > > If I'm not mistaken the timing for your audio is coming from your > > > sound card not your system clock. > > > > [...] > > I mentally rul

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Chris Cannam
On Sunday 14 Dec 2003 2:34 pm, Chris Cannam wrote: > On Sunday 14 Dec 2003 2:02 pm, Jan Depner wrote: > > If I'm not mistaken the timing for your audio is coming from your > > sound card not your system clock. > > [...] what if you have more > than one soundcard or no soundcard at all And of cours

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Jan Depner
Multiple soundcards usually have to use word clock or some proprietary method of syncing the cards. Usually one card will be the master and the others slaves. I know you can put up to 4 ST Audio DSP24 cards in one system and set one up as master. I believe the same is true for the M-Audio Delta

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Chris Cannam
On Sunday 14 Dec 2003 2:34 pm, Chris Cannam wrote: > On Sunday 14 Dec 2003 2:02 pm, Jan Depner wrote: > > If I'm not mistaken the timing for your audio is coming from your > > sound card not your system clock. > > [...] > I mentally ruled out a hardware problem quite early on because I > wasn't see

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Chris Cannam
On Sunday 14 Dec 2003 2:02 pm, Jan Depner wrote: > If I'm not mistaken the timing for your audio is coming from your > sound card not your system clock. Is that so? Obvious though it is, that simply hadn't occurred to me. I mentally ruled out a hardware problem quite early on because I wasn't s

Re: [Alsa-devel] alsa timer slippage

2003-12-14 Thread Jan Depner
If I'm not mistaken the timing for your audio is coming from your sound card not your system clock. The gettimeofday is from the system clock. They probably won't match. Of course, I could be totally in the dark ;-) Jan On Sun, 2003-12-14 at 08:07, Chris Cannam wrote: > > While trying to tra

[Alsa-devel] alsa timer slippage

2003-12-14 Thread Chris Cannam
While trying to track down the source of some poor timing in sequencing, I've noticed that my ALSA sequencer queue timer has a tendency to fall suddenly behind. I have a little test program (available on request) that just starts a queue and every second or so compares the queue timer against