Update of /cvsroot/alsa/alsa-kernel/core/seq
In directory sc8-pr-cvs1:/tmp/cvs-serv17362

Modified Files:
        seq_timer.c 
Log Message:
minor cleanup

Index: seq_timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_timer.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- seq_timer.c 1 Mar 2003 14:50:36 -0000       1.14
+++ seq_timer.c 1 Mar 2003 19:00:15 -0000       1.15
@@ -268,28 +268,26 @@
        if (tmr->timeri)
                return -EBUSY;
        sprintf(str, "sequencer queue %i", q->queue);
-       if (tmr->type == SNDRV_SEQ_TIMER_ALSA) {        /* standard ALSA timer */
-               if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE)
-                       tmr->alsa_id.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
-               t = snd_timer_open(str, &tmr->alsa_id, q->queue);
-               if (t == NULL && tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE) {
-                       if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_GLOBAL ||
-                           tmr->alsa_id.device != SNDRV_TIMER_GLOBAL_SYSTEM) {
-                               snd_timer_id_t tid;
-                               memset(&tid, 0, sizeof(tid));
-                               tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
-                               tid.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
-                               tid.card = -1;
-                               tid.device = SNDRV_TIMER_GLOBAL_SYSTEM;
-                               t = snd_timer_open(str, &tid, q->queue);
-                       }
-                       if (t == NULL) {
-                               snd_printk(KERN_ERR "fatal error: cannot create 
timer\n");
-                               return -ENODEV;
-                       }
-               }
-       } else {
+       if (tmr->type != SNDRV_SEQ_TIMER_ALSA)  /* standard ALSA timer */
                return -EINVAL;
+       if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE)
+               tmr->alsa_id.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
+       t = snd_timer_open(str, &tmr->alsa_id, q->queue);
+       if (t == NULL && tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE) {
+               if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_GLOBAL ||
+                   tmr->alsa_id.device != SNDRV_TIMER_GLOBAL_SYSTEM) {
+                       snd_timer_id_t tid;
+                       memset(&tid, 0, sizeof(tid));
+                       tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
+                       tid.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
+                       tid.card = -1;
+                       tid.device = SNDRV_TIMER_GLOBAL_SYSTEM;
+                       t = snd_timer_open(str, &tid, q->queue);
+               }
+               if (t == NULL) {
+                       snd_printk(KERN_ERR "seq fatal error: cannot create timer\n");
+                       return -ENODEV;
+               }
        }
        t->callback = snd_seq_timer_interrupt;
        t->callback_data = q;



-------------------------------------------------------
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

Reply via email to