|
@@ -27,6 +27,7 @@
|
|
|
#include <linux/rwsem.h> /* struct rw_semaphore */
|
|
|
#include <linux/pm.h> /* pm_message_t */
|
|
|
#include <linux/stringify.h>
|
|
|
+#include <linux/printk.h>
|
|
|
|
|
|
/* number of supported soundcards */
|
|
|
#ifdef CONFIG_SND_DYNAMIC_MINORS
|
|
@@ -375,6 +376,11 @@ void __snd_printk(unsigned int level, const char *file, int line,
|
|
|
*/
|
|
|
#define snd_BUG() WARN(1, "BUG?\n")
|
|
|
|
|
|
+/**
|
|
|
+ * Suppress high rates of output when CONFIG_SND_DEBUG is enabled.
|
|
|
+ */
|
|
|
+#define snd_printd_ratelimit() printk_ratelimit()
|
|
|
+
|
|
|
/**
|
|
|
* snd_BUG_ON - debugging check macro
|
|
|
* @cond: condition to evaluate
|
|
@@ -398,6 +404,8 @@ static inline void _snd_printd(int level, const char *format, ...) {}
|
|
|
unlikely(__ret_warn_on); \
|
|
|
})
|
|
|
|
|
|
+static inline bool snd_printd_ratelimit(void) { return false; }
|
|
|
+
|
|
|
#endif /* CONFIG_SND_DEBUG */
|
|
|
|
|
|
#ifdef CONFIG_SND_DEBUG_VERBOSE
|