openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openvortex-dev] getting rid of debug messages


From: O.Sezer
Subject: [Openvortex-dev] getting rid of debug messages
Date: Sat, 13 Sep 2003 20:15:15 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Hello to all:

I know that Manuel and Jeff would need them, but multi-quadzillion
of  "vortex: de alloc"  and similar messages really flooded my
/var/log/messages file (9mb of file, ca. 90% was vortex-related).
So I made this patch to disable some printk's. I hope I did not do
something wrong. Another option would be commenting out the printk
lines, but that would be less practical than editing one line of
the Makefile.

Regards,
Özkan Sezer
--- alsa-driver-0.9.6/pci/au88x0/Makefile.orig  2003-08-11 04:01:49.000000000 
+0300
+++ alsa-driver-0.9.6/pci/au88x0/Makefile       2003-09-13 19:30:02.000000000 
+0300
@@ -3,6 +3,10 @@
 include $(TOPDIR)/toplevel.config
 include $(TOPDIR)/Makefile.conf
 
+# Comment-out if you don't want to see
+# the Vortex debug messages
+EXTRA_CFLAGS += -DDEBUG_VORTEX
+
 snd-au8810-objs := au8810.o au8810_core.o au8810_pcm.o au8810_mixer.o 
au8810_mpu401.o au8810_game.o au8810_eq.o
 snd-au8820-objs := au8820.o au8820_core.o au8820_pcm.o au8820_mixer.o 
au8820_mpu401.o au8820_game.o au8820_synth.o
 snd-au8830-objs := au8830.o au8830_core.o au8830_pcm.o au8830_mixer.o 
au8830_mpu401.o au8830_game.o au8830_eq.o au8830_synth.o
--- alsa-driver-0.9.6/pci/au88x0/au88x0_pcm.c.orig      2003-08-10 
23:12:04.000000000 +0300
+++ alsa-driver-0.9.6/pci/au88x0/au88x0_pcm.c   2003-09-13 17:00:52.000000000 
+0300
@@ -111,8 +111,10 @@
                return err;
        }
 
+       #ifdef DEBUG_VORTEX
        printk(KERN_INFO "Vortex: periods %d, period_bytes %d, channels = 
%d\n", params_periods(hw_params),
                params_period_bytes(hw_params), params_channels(hw_params));
+       #endif
        
        // Make audio routes and config buffer DMA.
        if (substream->pcm == chip->pcm_adb) {
@@ -200,7 +202,9 @@
     switch (cmd) {
     case SNDRV_PCM_TRIGGER_START:
         // do something to start the PCM engine
+       #ifdef DEBUG_VORTEX
         printk(KERN_INFO "vortex: start %d\n", dma);
+       #endif
         if (substream->pcm == chip->pcm_adb) {
             stream->fifo_enabled = 1;
             vortex_adbdma_startfifo(chip, dma);
@@ -214,7 +218,9 @@
        break;
     case SNDRV_PCM_TRIGGER_STOP:
         // do something to stop the PCM engine
+       #ifdef DEBUG_VORTEX
         printk(KERN_INFO "vortex: stop %d\n", dma);
+       #endif
         if (substream->pcm == chip->pcm_adb) {
             stream->fifo_enabled = 0;
             vortex_adbdma_stopfifo(chip, dma);
--- alsa-driver-0.9.6/pci/au88x0/au88x0_core.c.orig     2003-08-10 
23:12:04.000000000 +0300
+++ alsa-driver-0.9.6/pci/au88x0/au88x0_core.c  2003-09-13 17:12:44.000000000 
+0300
@@ -942,8 +942,10 @@
        dma->period_real = page;
        if (dma->period_virt >= dma->nr_periods)
                dma->period_virt -= dma->nr_periods;
+       #ifdef DEBUG_VORTEX
        if ((delta != 1) || (delta < 0))
                printk(KERN_INFO "vortex: % d virt=0x%d, real=0x%x, delta = 
%d\n", adbdma, dma->period_virt, dma->period_real, delta);
+       #endif
 }
 
 void vortex_adbdma_setctrl(vortex_t *vortex, int a, int b, int c, int d, int 
e, int f) {
@@ -1828,11 +1830,15 @@
        spin_unlock(vortex->lock);
        
        if (en) {
+       #ifdef DEBUG_VORTEX
                printk(KERN_INFO "vortex: alloc %d\n", dma);
+       #endif
                //vortex_fifo_adbinitialize(vortex, dma, 0xff);
                //udelay(2000);
        } else {
+       #ifdef DEBUG_VORTEX
                printk(KERN_INFO "vortex: de alloc %d\n", dma);
+       #endif
                //vortex_fifo_setadbvalid(vortex, dma, 0);
        }
        /* AC97 Codec channel setup. FIXME: this has no effect !! */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]