]> err.no Git - linux-2.6/commitdiff
[ALSA] sound/hda: rate-limit timeout message
authorRandy Dunlap <randy_d_dunlap@linux.intel.com>
Mon, 7 Nov 2005 13:43:23 +0000 (14:43 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 3 Jan 2006 11:15:48 +0000 (12:15 +0100)
Modules: HDA Intel driver

Rate-limit the azx_get_response timeout message.  A continuous 2 per second
is too much.

Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c

index ed525c03c996fd6b6f5209b369d2e1fdd66a5e53..429ef3810b1694f5a8fcffe2f82a9a3bb2cf9dbd 100644 (file)
@@ -37,6 +37,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/init.h>
@@ -514,7 +515,9 @@ static unsigned int azx_get_response(struct hda_codec *codec)
 
        while (chip->rirb.cmds) {
                if (! --timeout) {
-                       snd_printk(KERN_ERR "azx_get_response timeout\n");
+                       if (printk_ratelimit())
+                               snd_printk(KERN_ERR
+                                       "azx_get_response timeout\n");
                        chip->rirb.rp = azx_readb(chip, RIRBWP);
                        chip->rirb.cmds = 0;
                        return -1;