aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2012-04-10 05:00:35 -0400
committerTakashi Iwai <tiwai@suse.de>2012-04-10 08:53:55 -0400
commitfae3d88a5c56c3f836e95c4516da883a48612437 (patch)
treeeb08d977ab3da42c466062ba237e05b4e4a1ae5f /include
parent38be95dd3d314bd393a26f6e441ae2c57ef7f064 (diff)
ALSA: hda - hide HDMI/ELD printks unless snd.debug=2
Also remove two warnings when CONFIG_SND_DEBUG is not set: sound/pci/hda/patch_hdmi.c: In function ‘hdmi_intrinsic_event’: sound/pci/hda/patch_hdmi.c:761:6: warning: unused variable ‘eldv’ [-Wunused-variable] sound/pci/hda/patch_hdmi.c:760:6: warning: unused variable ‘pd’ [-Wunused-variable] Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index b6e0f57d451d..bc056687f647 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res);
325 325
326/* --- */ 326/* --- */
327 327
328/* sound printk debug levels */
329enum {
330 SND_PR_ALWAYS,
331 SND_PR_DEBUG,
332 SND_PR_VERBOSE,
333};
334
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 335#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5) 336__printf(4, 5)
330void __snd_printk(unsigned int level, const char *file, int line, 337void __snd_printk(unsigned int level, const char *file, int line,
@@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
354 */ 361 */
355#define snd_printd(fmt, args...) \ 362#define snd_printd(fmt, args...) \
356 __snd_printk(1, __FILE__, __LINE__, fmt, ##args) 363 __snd_printk(1, __FILE__, __LINE__, fmt, ##args)
364#define _snd_printd(level, fmt, args...) \
365 __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
357 366
358/** 367/**
359 * snd_BUG - give a BUG warning message and stack trace 368 * snd_BUG - give a BUG warning message and stack trace
@@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
383#else /* !CONFIG_SND_DEBUG */ 392#else /* !CONFIG_SND_DEBUG */
384 393
385#define snd_printd(fmt, args...) do { } while (0) 394#define snd_printd(fmt, args...) do { } while (0)
395#define _snd_printd(level, fmt, args...) do { } while (0)
386#define snd_BUG() do { } while (0) 396#define snd_BUG() do { } while (0)
387static inline int __snd_bug_on(int cond) 397static inline int __snd_bug_on(int cond)
388{ 398{