diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-10 16:47:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:48 -0400 |
commit | bd58df6d522d5a9c791f6a4820e480e9be60650d (patch) | |
tree | 582569bf9794f4c8958b328f744ddadfd8b409c2 /drivers/media/video/ivtv/ivtv-driver.h | |
parent | 90851fe9fad68db24da8cb497bad7327b97ed3d2 (diff) |
V4L/DVB (5844): ivtv: add high volume debugging flag
Add support for high volume debug messages, allowing them to be turned
on selectively.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index 65ebddab3fe1..6c1a85f1ee1b 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -268,6 +268,8 @@ extern const u32 yuv_offset[4]; | |||
268 | #define IVTV_DBGFLG_IRQ (1 << 6) | 268 | #define IVTV_DBGFLG_IRQ (1 << 6) |
269 | #define IVTV_DBGFLG_DEC (1 << 7) | 269 | #define IVTV_DBGFLG_DEC (1 << 7) |
270 | #define IVTV_DBGFLG_YUV (1 << 8) | 270 | #define IVTV_DBGFLG_YUV (1 << 8) |
271 | /* Flag to turn on high volume debugging */ | ||
272 | #define IVTV_DBGFLG_HIGHVOL (1 << 9) | ||
271 | 273 | ||
272 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for | 274 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for |
273 | gcc-2.95, otherwise it won't compile. */ | 275 | gcc-2.95, otherwise it won't compile. */ |
@@ -286,6 +288,21 @@ extern const u32 yuv_offset[4]; | |||
286 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | 288 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) |
287 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | 289 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) |
288 | 290 | ||
291 | #define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...) \ | ||
292 | do { \ | ||
293 | if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \ | ||
294 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ | ||
295 | } while (0) | ||
296 | #define IVTV_DEBUG_HI_WARN(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warning", fmt , ## args) | ||
297 | #define IVTV_DEBUG_HI_INFO(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info",fmt , ## args) | ||
298 | #define IVTV_DEBUG_HI_API(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_API, "api", fmt , ## args) | ||
299 | #define IVTV_DEBUG_HI_DMA(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args) | ||
300 | #define IVTV_DEBUG_HI_IOCTL(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) | ||
301 | #define IVTV_DEBUG_HI_I2C(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) | ||
302 | #define IVTV_DEBUG_HI_IRQ(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) | ||
303 | #define IVTV_DEBUG_HI_DEC(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | ||
304 | #define IVTV_DEBUG_HI_YUV(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | ||
305 | |||
289 | #define IVTV_FB_DEBUG(x, type, fmt, args...) \ | 306 | #define IVTV_FB_DEBUG(x, type, fmt, args...) \ |
290 | do { \ | 307 | do { \ |
291 | if ((x) & ivtv_debug) \ | 308 | if ((x) & ivtv_debug) \ |