]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
skypopen: tweaking the OSS audio driver, still gives a load average higher than snd...
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 14 Dec 2010 14:38:57 +0000 (08:38 -0600)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 14 Dec 2010 14:38:57 +0000 (08:38 -0600)
src/mod/endpoints/mod_skypopen/oss/Makefile
src/mod/endpoints/mod_skypopen/oss/main.c

index 91cc61ba1ee7c30e149224df03fc9e693381b38e..465db533e4c33d9bdbd1c7334f7463d03c30e79a 100644 (file)
@@ -1,6 +1,6 @@
 # Comment/uncomment the following line to disable/enable debugging
 #DEBUG = y
-LDDINC=/usr/src/linux-headers-2.6.32-26-server/include
+#LDDINC=/usr/src/linux-headers-2.6.32-26-server/include
 
 # Add your debugging flag (or not) to CFLAGS
 ifeq ($(DEBUG),y)
index 925441b254a7221fc7a86aca53cba2263e09b1d9..8da9c549ac8074f18873cd7d4ed2665d8f96791a 100644 (file)
@@ -67,7 +67,7 @@ void my_timer_callback_inq( unsigned long data )
 {
        struct scull_dev *dev = (void *)data;
 
-       dev->readable=1;
+       //dev->readable=1;
        wake_up_interruptible(&dev->inq);
        mod_timer( &dev->timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
 
@@ -77,7 +77,7 @@ void my_timer_callback_outq( unsigned long data )
 {
        struct scull_dev *dev = (void *)data;
 
-       dev->writable=1;
+       //dev->writable=1;
        wake_up_interruptible(&dev->outq);
        mod_timer( &dev->timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
 }
@@ -172,14 +172,14 @@ ssize_t scull_read(struct file *filp, char __user *buf, size_t count,
 {
        struct scull_dev *dev = filp->private_data;
 
-       //DEFINE_WAIT(wait);
-       //prepare_to_wait(&dev->inq, &wait, TASK_INTERRUPTIBLE);
-       //schedule();
-       //finish_wait(&dev->inq, &wait);
+       DEFINE_WAIT(wait);
+       prepare_to_wait(&dev->inq, &wait, TASK_INTERRUPTIBLE);
+       schedule();
+       finish_wait(&dev->inq, &wait);
        //memset(buf, 255, count);
 
-       wait_event_interruptible(dev->inq, dev->readable);
-       dev->readable=0;
+       //wait_event_interruptible(dev->inq, dev->readable);
+       //dev->readable=0;
        return count;
 
 }
@@ -188,13 +188,13 @@ ssize_t scull_write(struct file *filp, const char __user *buf, size_t count,
                loff_t *f_pos)
 {
        struct scull_dev *dev = filp->private_data;
-       //DEFINE_WAIT(wait);
-       //prepare_to_wait(&dev->outq, &wait, TASK_INTERRUPTIBLE);
-       //schedule();
-       //finish_wait(&dev->outq, &wait);
+       DEFINE_WAIT(wait);
+       prepare_to_wait(&dev->outq, &wait, TASK_INTERRUPTIBLE);
+       schedule();
+       finish_wait(&dev->outq, &wait);
 
-       wait_event_interruptible(dev->outq, dev->writable);
-       dev->writable=0;
+       //wait_event_interruptible(dev->outq, dev->writable);
+       //dev->writable=0;
 
        return count;