aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/core.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-11 15:39:35 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-11 15:39:35 -0400
commit56c5d900dbb8e042bfad035d18433476931d8f93 (patch)
tree00b793965beeef10db03e0ff021d2d965c410759 /include/sound/core.h
parent4dd95b63ae25c5cad6986829b5e8788e9faa0330 (diff)
parentead9d23d803ea3a73766c3cb27bf7563ac8d7266 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: sound/core/memalloc.c
Diffstat (limited to 'include/sound/core.h')
-rw-r--r--include/sound/core.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 821d5a59d28b..35424a971b7a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -28,6 +28,7 @@
28#include <linux/rwsem.h> /* struct rw_semaphore */ 28#include <linux/rwsem.h> /* struct rw_semaphore */
29#include <linux/pm.h> /* pm_message_t */ 29#include <linux/pm.h> /* pm_message_t */
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/stringify.h>
31 32
32/* number of supported soundcards */ 33/* number of supported soundcards */
33#ifdef CONFIG_SND_DYNAMIC_MINORS 34#ifdef CONFIG_SND_DYNAMIC_MINORS
@@ -60,6 +61,7 @@ typedef int __bitwise snd_device_type_t;
60#define SNDRV_DEV_INFO ((__force snd_device_type_t) 0x1006) 61#define SNDRV_DEV_INFO ((__force snd_device_type_t) 0x1006)
61#define SNDRV_DEV_BUS ((__force snd_device_type_t) 0x1007) 62#define SNDRV_DEV_BUS ((__force snd_device_type_t) 0x1007)
62#define SNDRV_DEV_CODEC ((__force snd_device_type_t) 0x1008) 63#define SNDRV_DEV_CODEC ((__force snd_device_type_t) 0x1008)
64#define SNDRV_DEV_JACK ((__force snd_device_type_t) 0x1009)
63#define SNDRV_DEV_LOWLEVEL ((__force snd_device_type_t) 0x2000) 65#define SNDRV_DEV_LOWLEVEL ((__force snd_device_type_t) 0x2000)
64 66
65typedef int __bitwise snd_device_state_t; 67typedef int __bitwise snd_device_state_t;
@@ -111,7 +113,7 @@ struct snd_card {
111 char shortname[32]; /* short name of this soundcard */ 113 char shortname[32]; /* short name of this soundcard */
112 char longname[80]; /* name of this soundcard */ 114 char longname[80]; /* name of this soundcard */
113 char mixername[80]; /* mixer name */ 115 char mixername[80]; /* mixer name */
114 char components[80]; /* card components delimited with 116 char components[128]; /* card components delimited with
115 space */ 117 space */
116 struct module *module; /* top-level module */ 118 struct module *module; /* top-level module */
117 119
@@ -363,8 +365,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
363 365
364#ifdef CONFIG_SND_DEBUG 366#ifdef CONFIG_SND_DEBUG
365 367
366#define __ASTRING__(x) #x
367
368#ifdef CONFIG_SND_VERBOSE_PRINTK 368#ifdef CONFIG_SND_VERBOSE_PRINTK
369/** 369/**
370 * snd_printd - debug printk 370 * snd_printd - debug printk
@@ -379,33 +379,15 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
379#define snd_printd(fmt, args...) \ 379#define snd_printd(fmt, args...) \
380 printk(fmt ,##args) 380 printk(fmt ,##args)
381#endif 381#endif
382/** 382
383 * snd_assert - run-time assertion macro 383#define snd_BUG() WARN(1, "BUG?\n")
384 * @expr: expression 384#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
385 *
386 * This macro checks the expression in run-time and invokes the commands
387 * given in the rest arguments if the assertion is failed.
388 * When CONFIG_SND_DEBUG is not set, the expression is executed but
389 * not checked.
390 */
391#define snd_assert(expr, args...) do { \
392 if (unlikely(!(expr))) { \
393 snd_printk(KERN_ERR "BUG? (%s)\n", __ASTRING__(expr)); \
394 dump_stack(); \
395 args; \
396 } \
397} while (0)
398
399#define snd_BUG() do { \
400 snd_printk(KERN_ERR "BUG?\n"); \
401 dump_stack(); \
402} while (0)
403 385
404#else /* !CONFIG_SND_DEBUG */ 386#else /* !CONFIG_SND_DEBUG */
405 387
406#define snd_printd(fmt, args...) /* nothing */ 388#define snd_printd(fmt, args...) /* nothing */
407#define snd_assert(expr, args...) (void)(expr)
408#define snd_BUG() /* nothing */ 389#define snd_BUG() /* nothing */
390#define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */
409 391
410#endif /* CONFIG_SND_DEBUG */ 392#endif /* CONFIG_SND_DEBUG */
411 393