diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-17 05:38:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-20 16:35:42 -0400 |
commit | 67632e17da1e90a0c43283823f94080c0ee07088 (patch) | |
tree | cb9c204f8e9d72b5510a7076f4c9e698527d44fb /drivers/media/video | |
parent | 8f40a9f5325cdceddb1610cb3dfd8cb532f5a618 (diff) |
V4L/DVB (5850): ivtv: improve API command debugging
Turn off debugging of API commands that occur during encoding or decoding,
unless they are explicitly requested.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-mailbox.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/video/ivtv/ivtv-mailbox.c b/drivers/media/video/ivtv/ivtv-mailbox.c index 6ae42a3b03c..eaa43e9e918 100644 --- a/drivers/media/video/ivtv/ivtv-mailbox.c +++ b/drivers/media/video/ivtv/ivtv-mailbox.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #define API_RESULT (1 << 1) /* Allow 1 second for this cmd to end */ | 37 | #define API_RESULT (1 << 1) /* Allow 1 second for this cmd to end */ |
38 | #define API_FAST_RESULT (3 << 1) /* Allow 0.1 second for this cmd to end */ | 38 | #define API_FAST_RESULT (3 << 1) /* Allow 0.1 second for this cmd to end */ |
39 | #define API_DMA (1 << 3) /* DMA mailbox, has special handling */ | 39 | #define API_DMA (1 << 3) /* DMA mailbox, has special handling */ |
40 | #define API_HIGH_VOL (1 << 5) /* High volume command (i.e. called during encoding or decoding) */ | ||
40 | #define API_NO_WAIT_MB (1 << 4) /* Command may not wait for a free mailbox */ | 41 | #define API_NO_WAIT_MB (1 << 4) /* Command may not wait for a free mailbox */ |
41 | #define API_NO_WAIT_RES (1 << 5) /* Command may not wait for the result */ | 42 | #define API_NO_WAIT_RES (1 << 5) /* Command may not wait for the result */ |
42 | 43 | ||
@@ -77,11 +78,11 @@ static const struct ivtv_api_info api_info[256] = { | |||
77 | API_ENTRY(CX2341X_ENC_SET_DMA_BLOCK_SIZE, API_CACHE), | 78 | API_ENTRY(CX2341X_ENC_SET_DMA_BLOCK_SIZE, API_CACHE), |
78 | API_ENTRY(CX2341X_ENC_GET_PREV_DMA_INFO_MB_10, API_FAST_RESULT), | 79 | API_ENTRY(CX2341X_ENC_GET_PREV_DMA_INFO_MB_10, API_FAST_RESULT), |
79 | API_ENTRY(CX2341X_ENC_GET_PREV_DMA_INFO_MB_9, API_FAST_RESULT), | 80 | API_ENTRY(CX2341X_ENC_GET_PREV_DMA_INFO_MB_9, API_FAST_RESULT), |
80 | API_ENTRY(CX2341X_ENC_SCHED_DMA_TO_HOST, API_DMA), | 81 | API_ENTRY(CX2341X_ENC_SCHED_DMA_TO_HOST, API_DMA | API_HIGH_VOL), |
81 | API_ENTRY(CX2341X_ENC_INITIALIZE_INPUT, API_RESULT), | 82 | API_ENTRY(CX2341X_ENC_INITIALIZE_INPUT, API_RESULT), |
82 | API_ENTRY(CX2341X_ENC_SET_FRAME_DROP_RATE, API_CACHE), | 83 | API_ENTRY(CX2341X_ENC_SET_FRAME_DROP_RATE, API_CACHE), |
83 | API_ENTRY(CX2341X_ENC_PAUSE_ENCODER, API_RESULT), | 84 | API_ENTRY(CX2341X_ENC_PAUSE_ENCODER, API_RESULT), |
84 | API_ENTRY(CX2341X_ENC_REFRESH_INPUT, API_NO_WAIT_MB), | 85 | API_ENTRY(CX2341X_ENC_REFRESH_INPUT, API_NO_WAIT_MB | API_HIGH_VOL), |
85 | API_ENTRY(CX2341X_ENC_SET_COPYRIGHT, API_CACHE), | 86 | API_ENTRY(CX2341X_ENC_SET_COPYRIGHT, API_CACHE), |
86 | API_ENTRY(CX2341X_ENC_SET_EVENT_NOTIFICATION, API_RESULT), | 87 | API_ENTRY(CX2341X_ENC_SET_EVENT_NOTIFICATION, API_RESULT), |
87 | API_ENTRY(CX2341X_ENC_SET_NUM_VSYNC_LINES, API_CACHE), | 88 | API_ENTRY(CX2341X_ENC_SET_NUM_VSYNC_LINES, API_CACHE), |
@@ -102,7 +103,7 @@ static const struct ivtv_api_info api_info[256] = { | |||
102 | API_ENTRY(CX2341X_DEC_SET_DMA_BLOCK_SIZE, API_CACHE), | 103 | API_ENTRY(CX2341X_DEC_SET_DMA_BLOCK_SIZE, API_CACHE), |
103 | API_ENTRY(CX2341X_DEC_GET_XFER_INFO, API_FAST_RESULT), | 104 | API_ENTRY(CX2341X_DEC_GET_XFER_INFO, API_FAST_RESULT), |
104 | API_ENTRY(CX2341X_DEC_GET_DMA_STATUS, API_FAST_RESULT), | 105 | API_ENTRY(CX2341X_DEC_GET_DMA_STATUS, API_FAST_RESULT), |
105 | API_ENTRY(CX2341X_DEC_SCHED_DMA_FROM_HOST, API_DMA), | 106 | API_ENTRY(CX2341X_DEC_SCHED_DMA_FROM_HOST, API_DMA | API_HIGH_VOL), |
106 | API_ENTRY(CX2341X_DEC_PAUSE_PLAYBACK, API_RESULT), | 107 | API_ENTRY(CX2341X_DEC_PAUSE_PLAYBACK, API_RESULT), |
107 | API_ENTRY(CX2341X_DEC_HALT_FW, API_FAST_RESULT), | 108 | API_ENTRY(CX2341X_DEC_HALT_FW, API_FAST_RESULT), |
108 | API_ENTRY(CX2341X_DEC_SET_STANDARD, API_CACHE), | 109 | API_ENTRY(CX2341X_DEC_SET_STANDARD, API_CACHE), |
@@ -227,7 +228,12 @@ static int ivtv_api_call(struct ivtv *itv, int cmd, int args, u32 data[]) | |||
227 | return -EINVAL; | 228 | return -EINVAL; |
228 | } | 229 | } |
229 | 230 | ||
230 | IVTV_DEBUG_API("API Call: %s\n", api_info[cmd].name); | 231 | if (api_info[cmd].flags & API_HIGH_VOL) { |
232 | IVTV_DEBUG_HI_API("API Call: %s\n", api_info[cmd].name); | ||
233 | } | ||
234 | else { | ||
235 | IVTV_DEBUG_API("API Call: %s\n", api_info[cmd].name); | ||
236 | } | ||
231 | 237 | ||
232 | /* clear possibly uninitialized part of data array */ | 238 | /* clear possibly uninitialized part of data array */ |
233 | for (i = args; i < CX2341X_MBOX_MAX_DATA; i++) | 239 | for (i = args; i < CX2341X_MBOX_MAX_DATA; i++) |