diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-19 05:08:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:42 -0400 |
commit | 1aa32c2ffd146dddd76babf842e998502f1b993a (patch) | |
tree | d19c6b10cc00211bc4144db68c528fcb6f95fffc | |
parent | 313e91e824c0c595dec3740c0c87f55eea6bdb3f (diff) |
V4L/DVB (6055): ivtv: improve debug messages
- add FILE debug flag for open/close/read/write/poll.
- show cmd for encoder/decoder command ioctl.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 18 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 55 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 18 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 9 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-mailbox.c | 6 |
5 files changed, 64 insertions, 42 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 3591518ed358..93ddea49f0ed 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -186,8 +186,18 @@ MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60"); | |||
186 | MODULE_PARM_DESC(secam, "Set SECAM standard: B, G, H, D, K, L, LC"); | 186 | MODULE_PARM_DESC(secam, "Set SECAM standard: B, G, H, D, K, L, LC"); |
187 | MODULE_PARM_DESC(ntsc, "Set NTSC standard: M, J, K"); | 187 | MODULE_PARM_DESC(ntsc, "Set NTSC standard: M, J, K"); |
188 | MODULE_PARM_DESC(debug, | 188 | MODULE_PARM_DESC(debug, |
189 | "Debug level (bitmask). Default: errors only\n" | 189 | "Debug level (bitmask). Default: 0\n" |
190 | "\t\t\t(debug = 1023 gives full debugging)"); | 190 | "\t\t\t 1/0x0001: warning\n" |
191 | "\t\t\t 2/0x0002: info\n" | ||
192 | "\t\t\t 4/0x0004: mailbox\n" | ||
193 | "\t\t\t 8/0x0008: ioctl\n" | ||
194 | "\t\t\t 16/0x0010: file\n" | ||
195 | "\t\t\t 32/0x0020: dma\n" | ||
196 | "\t\t\t 64/0x0040: irq\n" | ||
197 | "\t\t\t 128/0x0080: decoder\n" | ||
198 | "\t\t\t 256/0x0100: yuv\n" | ||
199 | "\t\t\t 512/0x0200: i2c\n" | ||
200 | "\t\t\t1024/0x0400: high volume\n"); | ||
191 | MODULE_PARM_DESC(ivtv_pci_latency, | 201 | MODULE_PARM_DESC(ivtv_pci_latency, |
192 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" | 202 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" |
193 | "\t\t\tDefault: Yes"); | 203 | "\t\t\tDefault: Yes"); |
@@ -1354,9 +1364,9 @@ static int module_start(void) | |||
1354 | return -1; | 1364 | return -1; |
1355 | } | 1365 | } |
1356 | 1366 | ||
1357 | if (ivtv_debug < 0 || ivtv_debug > 1023) { | 1367 | if (ivtv_debug < 0 || ivtv_debug > 2047) { |
1358 | ivtv_debug = 0; | 1368 | ivtv_debug = 0; |
1359 | printk(KERN_INFO "ivtv: Debug value must be >= 0 and <= 1023\n"); | 1369 | printk(KERN_INFO "ivtv: Debug value must be >= 0 and <= 2047\n"); |
1360 | } | 1370 | } |
1361 | 1371 | ||
1362 | if (pci_register_driver(&ivtv_pci_driver)) { | 1372 | if (pci_register_driver(&ivtv_pci_driver)) { |
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index 783fb4449b0e..93a008409f49 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -256,17 +256,18 @@ extern const u32 yuv_offset[4]; | |||
256 | 256 | ||
257 | /* debugging */ | 257 | /* debugging */ |
258 | 258 | ||
259 | #define IVTV_DBGFLG_WARN (1 << 0) | 259 | #define IVTV_DBGFLG_WARN (1 << 0) |
260 | #define IVTV_DBGFLG_INFO (1 << 1) | 260 | #define IVTV_DBGFLG_INFO (1 << 1) |
261 | #define IVTV_DBGFLG_API (1 << 2) | 261 | #define IVTV_DBGFLG_MB (1 << 2) |
262 | #define IVTV_DBGFLG_DMA (1 << 3) | 262 | #define IVTV_DBGFLG_IOCTL (1 << 3) |
263 | #define IVTV_DBGFLG_IOCTL (1 << 4) | 263 | #define IVTV_DBGFLG_FILE (1 << 4) |
264 | #define IVTV_DBGFLG_I2C (1 << 5) | 264 | #define IVTV_DBGFLG_DMA (1 << 5) |
265 | #define IVTV_DBGFLG_IRQ (1 << 6) | 265 | #define IVTV_DBGFLG_IRQ (1 << 6) |
266 | #define IVTV_DBGFLG_DEC (1 << 7) | 266 | #define IVTV_DBGFLG_DEC (1 << 7) |
267 | #define IVTV_DBGFLG_YUV (1 << 8) | 267 | #define IVTV_DBGFLG_YUV (1 << 8) |
268 | #define IVTV_DBGFLG_I2C (1 << 9) | ||
268 | /* Flag to turn on high volume debugging */ | 269 | /* Flag to turn on high volume debugging */ |
269 | #define IVTV_DBGFLG_HIGHVOL (1 << 9) | 270 | #define IVTV_DBGFLG_HIGHVOL (1 << 10) |
270 | 271 | ||
271 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for | 272 | /* NOTE: extra space before comma in 'itv->num , ## args' is required for |
272 | gcc-2.95, otherwise it won't compile. */ | 273 | gcc-2.95, otherwise it won't compile. */ |
@@ -275,30 +276,32 @@ extern const u32 yuv_offset[4]; | |||
275 | if ((x) & ivtv_debug) \ | 276 | if ((x) & ivtv_debug) \ |
276 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ | 277 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ |
277 | } while (0) | 278 | } while (0) |
278 | #define IVTV_DEBUG_WARN(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_WARN, "warning", fmt , ## args) | 279 | #define IVTV_DEBUG_WARN(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_WARN, "warn", fmt , ## args) |
279 | #define IVTV_DEBUG_INFO(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_INFO, "info",fmt , ## args) | 280 | #define IVTV_DEBUG_INFO(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_INFO, "info", fmt , ## args) |
280 | #define IVTV_DEBUG_API(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_API, "api", fmt , ## args) | 281 | #define IVTV_DEBUG_MB(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_MB, "mb", fmt , ## args) |
281 | #define IVTV_DEBUG_DMA(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args) | 282 | #define IVTV_DEBUG_DMA(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args) |
282 | #define IVTV_DEBUG_IOCTL(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) | 283 | #define IVTV_DEBUG_IOCTL(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) |
283 | #define IVTV_DEBUG_I2C(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) | 284 | #define IVTV_DEBUG_FILE(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_FILE, "file", fmt , ## args) |
284 | #define IVTV_DEBUG_IRQ(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) | 285 | #define IVTV_DEBUG_I2C(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) |
285 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | 286 | #define IVTV_DEBUG_IRQ(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) |
286 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | 287 | #define IVTV_DEBUG_DEC(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args) |
288 | #define IVTV_DEBUG_YUV(fmt, args...) IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args) | ||
287 | 289 | ||
288 | #define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...) \ | 290 | #define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...) \ |
289 | do { \ | 291 | do { \ |
290 | if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \ | 292 | if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \ |
291 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ | 293 | printk(KERN_INFO "ivtv%d " type ": " fmt, itv->num , ## args); \ |
292 | } while (0) | 294 | } while (0) |
293 | #define IVTV_DEBUG_HI_WARN(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warning", fmt , ## args) | 295 | #define IVTV_DEBUG_HI_WARN(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warn", fmt , ## args) |
294 | #define IVTV_DEBUG_HI_INFO(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info",fmt , ## args) | 296 | #define IVTV_DEBUG_HI_INFO(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info", fmt , ## args) |
295 | #define IVTV_DEBUG_HI_API(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_API, "api", fmt , ## args) | 297 | #define IVTV_DEBUG_HI_MB(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_MB, "mb", fmt , ## args) |
296 | #define IVTV_DEBUG_HI_DMA(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args) | 298 | #define IVTV_DEBUG_HI_DMA(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args) |
297 | #define IVTV_DEBUG_HI_IOCTL(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) | 299 | #define IVTV_DEBUG_HI_IOCTL(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args) |
298 | #define IVTV_DEBUG_HI_I2C(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) | 300 | #define IVTV_DEBUG_HI_FILE(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_FILE, "file", fmt , ## args) |
299 | #define IVTV_DEBUG_HI_IRQ(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) | 301 | #define IVTV_DEBUG_HI_I2C(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args) |
300 | #define IVTV_DEBUG_HI_DEC(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args) | 302 | #define IVTV_DEBUG_HI_IRQ(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args) |
301 | #define IVTV_DEBUG_HI_YUV(fmt, args...) IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", 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) | ||
302 | 305 | ||
303 | /* Standard kernel messages */ | 306 | /* Standard kernel messages */ |
304 | #define IVTV_ERR(fmt, args...) printk(KERN_ERR "ivtv%d: " fmt, itv->num , ## args) | 307 | #define IVTV_ERR(fmt, args...) printk(KERN_ERR "ivtv%d: " fmt, itv->num , ## args) |
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 076b0089a2b0..846e9bfa41f0 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -409,7 +409,7 @@ static ssize_t ivtv_read_pos(struct ivtv_stream *s, char __user *ubuf, size_t co | |||
409 | ssize_t rc = count ? ivtv_read(s, ubuf, count, non_block) : 0; | 409 | ssize_t rc = count ? ivtv_read(s, ubuf, count, non_block) : 0; |
410 | struct ivtv *itv = s->itv; | 410 | struct ivtv *itv = s->itv; |
411 | 411 | ||
412 | IVTV_DEBUG_HI_INFO("read %zd from %s, got %zd\n", count, s->name, rc); | 412 | IVTV_DEBUG_HI_FILE("read %zd from %s, got %zd\n", count, s->name, rc); |
413 | if (rc > 0) | 413 | if (rc > 0) |
414 | pos += rc; | 414 | pos += rc; |
415 | return rc; | 415 | return rc; |
@@ -500,7 +500,7 @@ ssize_t ivtv_v4l2_read(struct file * filp, char __user *buf, size_t count, loff_ | |||
500 | struct ivtv_stream *s = &itv->streams[id->type]; | 500 | struct ivtv_stream *s = &itv->streams[id->type]; |
501 | int rc; | 501 | int rc; |
502 | 502 | ||
503 | IVTV_DEBUG_HI_IOCTL("read %zd bytes from %s\n", count, s->name); | 503 | IVTV_DEBUG_HI_FILE("read %zd bytes from %s\n", count, s->name); |
504 | 504 | ||
505 | rc = ivtv_start_capture(id); | 505 | rc = ivtv_start_capture(id); |
506 | if (rc) | 506 | if (rc) |
@@ -538,7 +538,7 @@ ssize_t ivtv_v4l2_write(struct file *filp, const char __user *user_buf, size_t c | |||
538 | int rc; | 538 | int rc; |
539 | DEFINE_WAIT(wait); | 539 | DEFINE_WAIT(wait); |
540 | 540 | ||
541 | IVTV_DEBUG_HI_IOCTL("write %zd bytes to %s\n", count, s->name); | 541 | IVTV_DEBUG_HI_FILE("write %zd bytes to %s\n", count, s->name); |
542 | 542 | ||
543 | if (s->type != IVTV_DEC_STREAM_TYPE_MPG && | 543 | if (s->type != IVTV_DEC_STREAM_TYPE_MPG && |
544 | s->type != IVTV_DEC_STREAM_TYPE_YUV && | 544 | s->type != IVTV_DEC_STREAM_TYPE_YUV && |
@@ -646,7 +646,7 @@ retry: | |||
646 | to transfer the rest. */ | 646 | to transfer the rest. */ |
647 | if (count && !(filp->f_flags & O_NONBLOCK)) | 647 | if (count && !(filp->f_flags & O_NONBLOCK)) |
648 | goto retry; | 648 | goto retry; |
649 | IVTV_DEBUG_HI_INFO("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused); | 649 | IVTV_DEBUG_HI_FILE("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused); |
650 | return bytes_written; | 650 | return bytes_written; |
651 | } | 651 | } |
652 | 652 | ||
@@ -658,6 +658,7 @@ unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait) | |||
658 | int res = 0; | 658 | int res = 0; |
659 | 659 | ||
660 | /* add stream's waitq to the poll list */ | 660 | /* add stream's waitq to the poll list */ |
661 | IVTV_DEBUG_HI_FILE("Decoder poll\n"); | ||
661 | poll_wait(filp, &s->waitq, wait); | 662 | poll_wait(filp, &s->waitq, wait); |
662 | 663 | ||
663 | set_bit(IVTV_F_I_EV_VSYNC_ENABLED, &itv->i_flags); | 664 | set_bit(IVTV_F_I_EV_VSYNC_ENABLED, &itv->i_flags); |
@@ -687,9 +688,11 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait) | |||
687 | s->name, rc); | 688 | s->name, rc); |
688 | return POLLERR; | 689 | return POLLERR; |
689 | } | 690 | } |
691 | IVTV_DEBUG_FILE("Encoder poll started capture\n"); | ||
690 | } | 692 | } |
691 | 693 | ||
692 | /* add stream's waitq to the poll list */ | 694 | /* add stream's waitq to the poll list */ |
695 | IVTV_DEBUG_HI_FILE("Encoder poll\n"); | ||
693 | poll_wait(filp, &s->waitq, wait); | 696 | poll_wait(filp, &s->waitq, wait); |
694 | 697 | ||
695 | if (eof || s->q_full.length) | 698 | if (eof || s->q_full.length) |
@@ -702,7 +705,7 @@ void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end) | |||
702 | struct ivtv *itv = id->itv; | 705 | struct ivtv *itv = id->itv; |
703 | struct ivtv_stream *s = &itv->streams[id->type]; | 706 | struct ivtv_stream *s = &itv->streams[id->type]; |
704 | 707 | ||
705 | IVTV_DEBUG_IOCTL("close() of %s\n", s->name); | 708 | IVTV_DEBUG_FILE("close() of %s\n", s->name); |
706 | 709 | ||
707 | /* 'Unclaim' this stream */ | 710 | /* 'Unclaim' this stream */ |
708 | 711 | ||
@@ -740,7 +743,7 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts) | |||
740 | struct ivtv *itv = id->itv; | 743 | struct ivtv *itv = id->itv; |
741 | struct ivtv_stream *s = &itv->streams[id->type]; | 744 | struct ivtv_stream *s = &itv->streams[id->type]; |
742 | 745 | ||
743 | IVTV_DEBUG_IOCTL("close() of %s\n", s->name); | 746 | IVTV_DEBUG_FILE("close() of %s\n", s->name); |
744 | 747 | ||
745 | /* Stop decoding */ | 748 | /* Stop decoding */ |
746 | if (test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { | 749 | if (test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { |
@@ -772,7 +775,7 @@ int ivtv_v4l2_close(struct inode *inode, struct file *filp) | |||
772 | struct ivtv *itv = id->itv; | 775 | struct ivtv *itv = id->itv; |
773 | struct ivtv_stream *s = &itv->streams[id->type]; | 776 | struct ivtv_stream *s = &itv->streams[id->type]; |
774 | 777 | ||
775 | IVTV_DEBUG_IOCTL("close() of %s\n", s->name); | 778 | IVTV_DEBUG_FILE("close %s\n", s->name); |
776 | 779 | ||
777 | v4l2_prio_close(&itv->prio, &id->prio); | 780 | v4l2_prio_close(&itv->prio, &id->prio); |
778 | 781 | ||
@@ -855,6 +858,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) | |||
855 | IVTV_ERR("Failed to initialize on minor %d\n", minor); | 858 | IVTV_ERR("Failed to initialize on minor %d\n", minor); |
856 | return -ENXIO; | 859 | return -ENXIO; |
857 | } | 860 | } |
861 | IVTV_DEBUG_FILE("open %s\n", s->name); | ||
858 | 862 | ||
859 | if (y == IVTV_DEC_STREAM_TYPE_MPG && | 863 | if (y == IVTV_DEC_STREAM_TYPE_MPG && |
860 | test_bit(IVTV_F_S_CLAIMED, &itv->streams[IVTV_DEC_STREAM_TYPE_YUV].s_flags)) | 864 | test_bit(IVTV_F_S_CLAIMED, &itv->streams[IVTV_DEC_STREAM_TYPE_YUV].s_flags)) |
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 734f2d2ffa62..2c0f27241332 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1138,12 +1138,14 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void | |||
1138 | memset(&enc->raw, 0, sizeof(enc->raw)); | 1138 | memset(&enc->raw, 0, sizeof(enc->raw)); |
1139 | switch (enc->cmd) { | 1139 | switch (enc->cmd) { |
1140 | case V4L2_ENC_CMD_START: | 1140 | case V4L2_ENC_CMD_START: |
1141 | IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_START\n"); | ||
1141 | enc->flags = 0; | 1142 | enc->flags = 0; |
1142 | if (try) | 1143 | if (try) |
1143 | return 0; | 1144 | return 0; |
1144 | return ivtv_start_capture(id); | 1145 | return ivtv_start_capture(id); |
1145 | 1146 | ||
1146 | case V4L2_ENC_CMD_STOP: | 1147 | case V4L2_ENC_CMD_STOP: |
1148 | IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_STOP\n"); | ||
1147 | enc->flags &= V4L2_ENC_CMD_STOP_AT_GOP_END; | 1149 | enc->flags &= V4L2_ENC_CMD_STOP_AT_GOP_END; |
1148 | if (try) | 1150 | if (try) |
1149 | return 0; | 1151 | return 0; |
@@ -1151,6 +1153,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void | |||
1151 | return 0; | 1153 | return 0; |
1152 | 1154 | ||
1153 | case V4L2_ENC_CMD_PAUSE: | 1155 | case V4L2_ENC_CMD_PAUSE: |
1156 | IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_PAUSE\n"); | ||
1154 | enc->flags = 0; | 1157 | enc->flags = 0; |
1155 | if (try) | 1158 | if (try) |
1156 | return 0; | 1159 | return 0; |
@@ -1163,6 +1166,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void | |||
1163 | break; | 1166 | break; |
1164 | 1167 | ||
1165 | case V4L2_ENC_CMD_RESUME: | 1168 | case V4L2_ENC_CMD_RESUME: |
1169 | IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_RESUME\n"); | ||
1166 | enc->flags = 0; | 1170 | enc->flags = 0; |
1167 | if (try) | 1171 | if (try) |
1168 | return 0; | 1172 | return 0; |
@@ -1174,6 +1178,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void | |||
1174 | ivtv_unmute(itv); | 1178 | ivtv_unmute(itv); |
1175 | break; | 1179 | break; |
1176 | default: | 1180 | default: |
1181 | IVTV_DEBUG_IOCTL("Unknown cmd %d\n", enc->cmd); | ||
1177 | return -EINVAL; | 1182 | return -EINVAL; |
1178 | } | 1183 | } |
1179 | break; | 1184 | break; |
@@ -1408,9 +1413,9 @@ static int ivtv_decoder_ioctls(struct file *filp, unsigned int cmd, void *arg) | |||
1408 | int try = (cmd == VIDEO_TRY_COMMAND); | 1413 | int try = (cmd == VIDEO_TRY_COMMAND); |
1409 | 1414 | ||
1410 | if (try) | 1415 | if (try) |
1411 | IVTV_DEBUG_IOCTL("VIDEO_TRY_COMMAND\n"); | 1416 | IVTV_DEBUG_IOCTL("VIDEO_TRY_COMMAND %d\n", vc->cmd); |
1412 | else | 1417 | else |
1413 | IVTV_DEBUG_IOCTL("VIDEO_COMMAND\n"); | 1418 | IVTV_DEBUG_IOCTL("VIDEO_COMMAND %d\n", vc->cmd); |
1414 | return ivtv_video_command(itv, id, vc, try); | 1419 | return ivtv_video_command(itv, id, vc, try); |
1415 | } | 1420 | } |
1416 | 1421 | ||
diff --git a/drivers/media/video/ivtv/ivtv-mailbox.c b/drivers/media/video/ivtv/ivtv-mailbox.c index 5e3b679202ae..b05436da7136 100644 --- a/drivers/media/video/ivtv/ivtv-mailbox.c +++ b/drivers/media/video/ivtv/ivtv-mailbox.c | |||
@@ -225,15 +225,15 @@ static int ivtv_api_call(struct ivtv *itv, int cmd, int args, u32 data[]) | |||
225 | } | 225 | } |
226 | if (args < 0 || args > CX2341X_MBOX_MAX_DATA || | 226 | if (args < 0 || args > CX2341X_MBOX_MAX_DATA || |
227 | cmd < 0 || cmd > 255 || api_info[cmd].name == NULL) { | 227 | cmd < 0 || cmd > 255 || api_info[cmd].name == NULL) { |
228 | IVTV_ERR("Invalid API call: cmd = 0x%02x, args = %d\n", cmd, args); | 228 | IVTV_ERR("Invalid MB call: cmd = 0x%02x, args = %d\n", cmd, args); |
229 | return -EINVAL; | 229 | return -EINVAL; |
230 | } | 230 | } |
231 | 231 | ||
232 | if (api_info[cmd].flags & API_HIGH_VOL) { | 232 | if (api_info[cmd].flags & API_HIGH_VOL) { |
233 | IVTV_DEBUG_HI_API("API Call: %s\n", api_info[cmd].name); | 233 | IVTV_DEBUG_HI_MB("MB Call: %s\n", api_info[cmd].name); |
234 | } | 234 | } |
235 | else { | 235 | else { |
236 | IVTV_DEBUG_API("API Call: %s\n", api_info[cmd].name); | 236 | IVTV_DEBUG_MB("MB Call: %s\n", api_info[cmd].name); |
237 | } | 237 | } |
238 | 238 | ||
239 | /* clear possibly uninitialized part of data array */ | 239 | /* clear possibly uninitialized part of data array */ |