Update of /cvsroot/alsa/alsa-kernel/core/seq
In directory sc8-pr-cvs1:/tmp/cvs-serv28590/core/seq
Modified Files:
seq_timer.c seq_timer.h
Log Message:
Clemens Ladisch <[EMAIL PROTECTED]>:
- fixed timer resolution calculations
Some functions assumed that timer->hw.resolution is in Hz, while it's
actually in ns/tick.
Index: seq_timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_timer.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- seq_timer.c 11 Mar 2003 15:02:26 -0000 1.17
+++ seq_timer.c 7 Oct 2003 10:07:14 -0000 1.18
@@ -335,7 +335,7 @@
if (! r && t->hw.c_resolution)
r = t->hw.c_resolution(t);
if (r) {
- tmr->ticks = (unsigned int)(tmr->preferred_resolution / r);
+ tmr->ticks = (unsigned int)(1000000000uL / (r *
tmr->preferred_resolution));
if (! tmr->ticks)
tmr->ticks = 1;
}
Index: seq_timer.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_timer.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- seq_timer.h 4 Feb 2003 13:25:09 -0000 1.5
+++ seq_timer.h 7 Oct 2003 10:07:14 -0000 1.6
@@ -47,7 +47,7 @@
snd_timer_id_t alsa_id; /* ALSA's timer ID */
snd_timer_instance_t *timeri; /* timer instance */
unsigned int ticks;
- unsigned long preferred_resolution; /* timer resolution */
+ unsigned long preferred_resolution; /* timer resolution, ticks/sec */
unsigned int skew;
unsigned int skew_base;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog