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 /drivers/media/video/ivtv/ivtv-ioctl.c | |
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>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 | ||