diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-06-22 05:09:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-06 16:18:47 -0400 |
commit | 59076122cbd325a9ee6ab062ebbbc4604768f97f (patch) | |
tree | 0f555a93e8f251bf5cc99d4135b39929920a0b55 /drivers/media | |
parent | 2ba60ac018f886de1203bc5c81969a4219706623 (diff) |
[media] v4l2-ioctl.c: use the new table for querycap and i/o ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 328 |
1 files changed, 133 insertions, 195 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index be89dade6e2c..7556678846f9 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -183,6 +183,63 @@ static const char *v4l2_memory_names[] = { | |||
183 | /* ------------------------------------------------------------------ */ | 183 | /* ------------------------------------------------------------------ */ |
184 | /* debug help functions */ | 184 | /* debug help functions */ |
185 | 185 | ||
186 | static void v4l_print_querycap(const void *arg, bool write_only) | ||
187 | { | ||
188 | const struct v4l2_capability *p = arg; | ||
189 | |||
190 | pr_cont("driver=%s, card=%s, bus=%s, version=0x%08x, " | ||
191 | "capabilities=0x%08x, device_caps=0x%08x\n", | ||
192 | p->driver, p->card, p->bus_info, | ||
193 | p->version, p->capabilities, p->device_caps); | ||
194 | } | ||
195 | |||
196 | static void v4l_print_enuminput(const void *arg, bool write_only) | ||
197 | { | ||
198 | const struct v4l2_input *p = arg; | ||
199 | |||
200 | pr_cont("index=%u, name=%s, type=%u, audioset=0x%x, tuner=%u, " | ||
201 | "std=0x%08Lx, status=0x%x, capabilities=0x%x\n", | ||
202 | p->index, p->name, p->type, p->audioset, p->tuner, | ||
203 | (unsigned long long)p->std, p->status, p->capabilities); | ||
204 | } | ||
205 | |||
206 | static void v4l_print_enumoutput(const void *arg, bool write_only) | ||
207 | { | ||
208 | const struct v4l2_output *p = arg; | ||
209 | |||
210 | pr_cont("index=%u, name=%s, type=%u, audioset=0x%x, " | ||
211 | "modulator=%u, std=0x%08Lx, capabilities=0x%x\n", | ||
212 | p->index, p->name, p->type, p->audioset, p->modulator, | ||
213 | (unsigned long long)p->std, p->capabilities); | ||
214 | } | ||
215 | |||
216 | static void v4l_print_audio(const void *arg, bool write_only) | ||
217 | { | ||
218 | const struct v4l2_audio *p = arg; | ||
219 | |||
220 | if (write_only) | ||
221 | pr_cont("index=%u, mode=0x%x\n", p->index, p->mode); | ||
222 | else | ||
223 | pr_cont("index=%u, name=%s, capability=0x%x, mode=0x%x\n", | ||
224 | p->index, p->name, p->capability, p->mode); | ||
225 | } | ||
226 | |||
227 | static void v4l_print_audioout(const void *arg, bool write_only) | ||
228 | { | ||
229 | const struct v4l2_audioout *p = arg; | ||
230 | |||
231 | if (write_only) | ||
232 | pr_cont("index=%u\n", p->index); | ||
233 | else | ||
234 | pr_cont("index=%u, name=%s, capability=0x%x, mode=0x%x\n", | ||
235 | p->index, p->name, p->capability, p->mode); | ||
236 | } | ||
237 | |||
238 | static void v4l_print_u32(const void *arg, bool write_only) | ||
239 | { | ||
240 | pr_cont("value=%u\n", *(const u32 *)arg); | ||
241 | } | ||
242 | |||
186 | static void dbgbuf(unsigned int cmd, struct video_device *vfd, | 243 | static void dbgbuf(unsigned int cmd, struct video_device *vfd, |
187 | struct v4l2_buffer *p) | 244 | struct v4l2_buffer *p) |
188 | { | 245 | { |
@@ -392,6 +449,69 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type) | |||
392 | return -EINVAL; | 449 | return -EINVAL; |
393 | } | 450 | } |
394 | 451 | ||
452 | static int v4l_querycap(const struct v4l2_ioctl_ops *ops, | ||
453 | struct file *file, void *fh, void *arg) | ||
454 | { | ||
455 | struct v4l2_capability *cap = (struct v4l2_capability *)arg; | ||
456 | |||
457 | cap->version = LINUX_VERSION_CODE; | ||
458 | return ops->vidioc_querycap(file, fh, cap); | ||
459 | } | ||
460 | |||
461 | static int v4l_s_input(const struct v4l2_ioctl_ops *ops, | ||
462 | struct file *file, void *fh, void *arg) | ||
463 | { | ||
464 | return ops->vidioc_s_input(file, fh, *(unsigned int *)arg); | ||
465 | } | ||
466 | |||
467 | static int v4l_s_output(const struct v4l2_ioctl_ops *ops, | ||
468 | struct file *file, void *fh, void *arg) | ||
469 | { | ||
470 | return ops->vidioc_s_output(file, fh, *(unsigned int *)arg); | ||
471 | } | ||
472 | |||
473 | static int v4l_enuminput(const struct v4l2_ioctl_ops *ops, | ||
474 | struct file *file, void *fh, void *arg) | ||
475 | { | ||
476 | struct v4l2_input *p = arg; | ||
477 | |||
478 | /* | ||
479 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | ||
480 | * CAP_STD here based on ioctl handler provided by the | ||
481 | * driver. If the driver doesn't support these | ||
482 | * for a specific input, it must override these flags. | ||
483 | */ | ||
484 | if (ops->vidioc_s_std) | ||
485 | p->capabilities |= V4L2_IN_CAP_STD; | ||
486 | if (ops->vidioc_s_dv_preset) | ||
487 | p->capabilities |= V4L2_IN_CAP_PRESETS; | ||
488 | if (ops->vidioc_s_dv_timings) | ||
489 | p->capabilities |= V4L2_IN_CAP_CUSTOM_TIMINGS; | ||
490 | |||
491 | return ops->vidioc_enum_input(file, fh, p); | ||
492 | } | ||
493 | |||
494 | static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops, | ||
495 | struct file *file, void *fh, void *arg) | ||
496 | { | ||
497 | struct v4l2_output *p = arg; | ||
498 | |||
499 | /* | ||
500 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | ||
501 | * CAP_STD here based on ioctl handler provided by the | ||
502 | * driver. If the driver doesn't support these | ||
503 | * for a specific output, it must override these flags. | ||
504 | */ | ||
505 | if (ops->vidioc_s_std) | ||
506 | p->capabilities |= V4L2_OUT_CAP_STD; | ||
507 | if (ops->vidioc_s_dv_preset) | ||
508 | p->capabilities |= V4L2_OUT_CAP_PRESETS; | ||
509 | if (ops->vidioc_s_dv_timings) | ||
510 | p->capabilities |= V4L2_OUT_CAP_CUSTOM_TIMINGS; | ||
511 | |||
512 | return ops->vidioc_enum_output(file, fh, p); | ||
513 | } | ||
514 | |||
395 | struct v4l2_ioctl_info { | 515 | struct v4l2_ioctl_info { |
396 | unsigned int ioctl; | 516 | unsigned int ioctl; |
397 | u32 flags; | 517 | u32 flags; |
@@ -443,7 +563,7 @@ struct v4l2_ioctl_info { | |||
443 | } | 563 | } |
444 | 564 | ||
445 | static struct v4l2_ioctl_info v4l2_ioctls[] = { | 565 | static struct v4l2_ioctl_info v4l2_ioctls[] = { |
446 | IOCTL_INFO(VIDIOC_QUERYCAP, 0), | 566 | IOCTL_INFO_FNC(VIDIOC_QUERYCAP, v4l_querycap, v4l_print_querycap, 0), |
447 | IOCTL_INFO(VIDIOC_ENUM_FMT, INFO_FL_CLEAR(v4l2_fmtdesc, type)), | 567 | IOCTL_INFO(VIDIOC_ENUM_FMT, INFO_FL_CLEAR(v4l2_fmtdesc, type)), |
448 | IOCTL_INFO(VIDIOC_G_FMT, INFO_FL_CLEAR(v4l2_format, type)), | 568 | IOCTL_INFO(VIDIOC_G_FMT, INFO_FL_CLEAR(v4l2_format, type)), |
449 | IOCTL_INFO(VIDIOC_S_FMT, INFO_FL_PRIO), | 569 | IOCTL_INFO(VIDIOC_S_FMT, INFO_FL_PRIO), |
@@ -461,22 +581,22 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { | |||
461 | IOCTL_INFO(VIDIOC_G_STD, 0), | 581 | IOCTL_INFO(VIDIOC_G_STD, 0), |
462 | IOCTL_INFO(VIDIOC_S_STD, INFO_FL_PRIO), | 582 | IOCTL_INFO(VIDIOC_S_STD, INFO_FL_PRIO), |
463 | IOCTL_INFO(VIDIOC_ENUMSTD, INFO_FL_CLEAR(v4l2_standard, index)), | 583 | IOCTL_INFO(VIDIOC_ENUMSTD, INFO_FL_CLEAR(v4l2_standard, index)), |
464 | IOCTL_INFO(VIDIOC_ENUMINPUT, INFO_FL_CLEAR(v4l2_input, index)), | 584 | IOCTL_INFO_FNC(VIDIOC_ENUMINPUT, v4l_enuminput, v4l_print_enuminput, INFO_FL_CLEAR(v4l2_input, index)), |
465 | IOCTL_INFO(VIDIOC_G_CTRL, INFO_FL_CTRL), | 585 | IOCTL_INFO(VIDIOC_G_CTRL, INFO_FL_CTRL), |
466 | IOCTL_INFO(VIDIOC_S_CTRL, INFO_FL_PRIO | INFO_FL_CTRL), | 586 | IOCTL_INFO(VIDIOC_S_CTRL, INFO_FL_PRIO | INFO_FL_CTRL), |
467 | IOCTL_INFO(VIDIOC_G_TUNER, INFO_FL_CLEAR(v4l2_tuner, index)), | 587 | IOCTL_INFO(VIDIOC_G_TUNER, INFO_FL_CLEAR(v4l2_tuner, index)), |
468 | IOCTL_INFO(VIDIOC_S_TUNER, INFO_FL_PRIO), | 588 | IOCTL_INFO(VIDIOC_S_TUNER, INFO_FL_PRIO), |
469 | IOCTL_INFO(VIDIOC_G_AUDIO, 0), | 589 | IOCTL_INFO_STD(VIDIOC_G_AUDIO, vidioc_g_audio, v4l_print_audio, 0), |
470 | IOCTL_INFO(VIDIOC_S_AUDIO, INFO_FL_PRIO), | 590 | IOCTL_INFO_STD(VIDIOC_S_AUDIO, vidioc_s_audio, v4l_print_audio, INFO_FL_PRIO), |
471 | IOCTL_INFO(VIDIOC_QUERYCTRL, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_queryctrl, id)), | 591 | IOCTL_INFO(VIDIOC_QUERYCTRL, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_queryctrl, id)), |
472 | IOCTL_INFO(VIDIOC_QUERYMENU, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_querymenu, index)), | 592 | IOCTL_INFO(VIDIOC_QUERYMENU, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_querymenu, index)), |
473 | IOCTL_INFO(VIDIOC_G_INPUT, 0), | 593 | IOCTL_INFO_STD(VIDIOC_G_INPUT, vidioc_g_input, v4l_print_u32, 0), |
474 | IOCTL_INFO(VIDIOC_S_INPUT, INFO_FL_PRIO), | 594 | IOCTL_INFO_FNC(VIDIOC_S_INPUT, v4l_s_input, v4l_print_u32, INFO_FL_PRIO), |
475 | IOCTL_INFO(VIDIOC_G_OUTPUT, INFO_FL_CLEAR(v4l2_output, index)), | 595 | IOCTL_INFO_STD(VIDIOC_G_OUTPUT, vidioc_g_output, v4l_print_u32, 0), |
476 | IOCTL_INFO(VIDIOC_S_OUTPUT, INFO_FL_PRIO), | 596 | IOCTL_INFO_FNC(VIDIOC_S_OUTPUT, v4l_s_output, v4l_print_u32, INFO_FL_PRIO), |
477 | IOCTL_INFO(VIDIOC_ENUMOUTPUT, 0), | 597 | IOCTL_INFO_FNC(VIDIOC_ENUMOUTPUT, v4l_enumoutput, v4l_print_enumoutput, INFO_FL_CLEAR(v4l2_output, index)), |
478 | IOCTL_INFO(VIDIOC_G_AUDOUT, 0), | 598 | IOCTL_INFO_STD(VIDIOC_G_AUDOUT, vidioc_g_audout, v4l_print_audioout, 0), |
479 | IOCTL_INFO(VIDIOC_S_AUDOUT, INFO_FL_PRIO), | 599 | IOCTL_INFO_STD(VIDIOC_S_AUDOUT, vidioc_s_audout, v4l_print_audioout, INFO_FL_PRIO), |
480 | IOCTL_INFO(VIDIOC_G_MODULATOR, INFO_FL_CLEAR(v4l2_modulator, index)), | 600 | IOCTL_INFO(VIDIOC_G_MODULATOR, INFO_FL_CLEAR(v4l2_modulator, index)), |
481 | IOCTL_INFO(VIDIOC_S_MODULATOR, INFO_FL_PRIO), | 601 | IOCTL_INFO(VIDIOC_S_MODULATOR, INFO_FL_PRIO), |
482 | IOCTL_INFO(VIDIOC_G_FREQUENCY, INFO_FL_CLEAR(v4l2_frequency, tuner)), | 602 | IOCTL_INFO(VIDIOC_G_FREQUENCY, INFO_FL_CLEAR(v4l2_frequency, tuner)), |
@@ -490,8 +610,8 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { | |||
490 | IOCTL_INFO(VIDIOC_S_JPEGCOMP, INFO_FL_PRIO), | 610 | IOCTL_INFO(VIDIOC_S_JPEGCOMP, INFO_FL_PRIO), |
491 | IOCTL_INFO(VIDIOC_QUERYSTD, 0), | 611 | IOCTL_INFO(VIDIOC_QUERYSTD, 0), |
492 | IOCTL_INFO(VIDIOC_TRY_FMT, 0), | 612 | IOCTL_INFO(VIDIOC_TRY_FMT, 0), |
493 | IOCTL_INFO(VIDIOC_ENUMAUDIO, INFO_FL_CLEAR(v4l2_audio, index)), | 613 | IOCTL_INFO_STD(VIDIOC_ENUMAUDIO, vidioc_enumaudio, v4l_print_audio, INFO_FL_CLEAR(v4l2_audio, index)), |
494 | IOCTL_INFO(VIDIOC_ENUMAUDOUT, INFO_FL_CLEAR(v4l2_audioout, index)), | 614 | IOCTL_INFO_STD(VIDIOC_ENUMAUDOUT, vidioc_enumaudout, v4l_print_audioout, INFO_FL_CLEAR(v4l2_audioout, index)), |
495 | IOCTL_INFO(VIDIOC_G_PRIORITY, 0), | 615 | IOCTL_INFO(VIDIOC_G_PRIORITY, 0), |
496 | IOCTL_INFO(VIDIOC_S_PRIORITY, INFO_FL_PRIO), | 616 | IOCTL_INFO(VIDIOC_S_PRIORITY, INFO_FL_PRIO), |
497 | IOCTL_INFO(VIDIOC_G_SLICED_VBI_CAP, INFO_FL_CLEAR(v4l2_sliced_vbi_cap, type)), | 617 | IOCTL_INFO(VIDIOC_G_SLICED_VBI_CAP, INFO_FL_CLEAR(v4l2_sliced_vbi_cap, type)), |
@@ -631,25 +751,6 @@ static long __video_do_ioctl(struct file *file, | |||
631 | 751 | ||
632 | switch (cmd) { | 752 | switch (cmd) { |
633 | 753 | ||
634 | /* --- capabilities ------------------------------------------ */ | ||
635 | case VIDIOC_QUERYCAP: | ||
636 | { | ||
637 | struct v4l2_capability *cap = (struct v4l2_capability *)arg; | ||
638 | |||
639 | cap->version = LINUX_VERSION_CODE; | ||
640 | ret = ops->vidioc_querycap(file, fh, cap); | ||
641 | if (!ret) | ||
642 | dbgarg(cmd, "driver=%s, card=%s, bus=%s, " | ||
643 | "version=0x%08x, " | ||
644 | "capabilities=0x%08x, " | ||
645 | "device_caps=0x%08x\n", | ||
646 | cap->driver, cap->card, cap->bus_info, | ||
647 | cap->version, | ||
648 | cap->capabilities, | ||
649 | cap->device_caps); | ||
650 | break; | ||
651 | } | ||
652 | |||
653 | /* --- priority ------------------------------------------ */ | 754 | /* --- priority ------------------------------------------ */ |
654 | case VIDIOC_G_PRIORITY: | 755 | case VIDIOC_G_PRIORITY: |
655 | { | 756 | { |
@@ -1164,98 +1265,6 @@ static long __video_do_ioctl(struct file *file, | |||
1164 | (unsigned long long)*p); | 1265 | (unsigned long long)*p); |
1165 | break; | 1266 | break; |
1166 | } | 1267 | } |
1167 | /* ------ input switching ---------- */ | ||
1168 | /* FIXME: Inputs can be handled inside videodev2 */ | ||
1169 | case VIDIOC_ENUMINPUT: | ||
1170 | { | ||
1171 | struct v4l2_input *p = arg; | ||
1172 | |||
1173 | /* | ||
1174 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | ||
1175 | * CAP_STD here based on ioctl handler provided by the | ||
1176 | * driver. If the driver doesn't support these | ||
1177 | * for a specific input, it must override these flags. | ||
1178 | */ | ||
1179 | if (ops->vidioc_s_std) | ||
1180 | p->capabilities |= V4L2_IN_CAP_STD; | ||
1181 | if (ops->vidioc_s_dv_preset) | ||
1182 | p->capabilities |= V4L2_IN_CAP_PRESETS; | ||
1183 | if (ops->vidioc_s_dv_timings) | ||
1184 | p->capabilities |= V4L2_IN_CAP_CUSTOM_TIMINGS; | ||
1185 | |||
1186 | ret = ops->vidioc_enum_input(file, fh, p); | ||
1187 | if (!ret) | ||
1188 | dbgarg(cmd, "index=%d, name=%s, type=%d, " | ||
1189 | "audioset=%d, " | ||
1190 | "tuner=%d, std=%08Lx, status=%d\n", | ||
1191 | p->index, p->name, p->type, p->audioset, | ||
1192 | p->tuner, | ||
1193 | (unsigned long long)p->std, | ||
1194 | p->status); | ||
1195 | break; | ||
1196 | } | ||
1197 | case VIDIOC_G_INPUT: | ||
1198 | { | ||
1199 | unsigned int *i = arg; | ||
1200 | |||
1201 | ret = ops->vidioc_g_input(file, fh, i); | ||
1202 | if (!ret) | ||
1203 | dbgarg(cmd, "value=%d\n", *i); | ||
1204 | break; | ||
1205 | } | ||
1206 | case VIDIOC_S_INPUT: | ||
1207 | { | ||
1208 | unsigned int *i = arg; | ||
1209 | |||
1210 | dbgarg(cmd, "value=%d\n", *i); | ||
1211 | ret = ops->vidioc_s_input(file, fh, *i); | ||
1212 | break; | ||
1213 | } | ||
1214 | |||
1215 | /* ------ output switching ---------- */ | ||
1216 | case VIDIOC_ENUMOUTPUT: | ||
1217 | { | ||
1218 | struct v4l2_output *p = arg; | ||
1219 | |||
1220 | /* | ||
1221 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | ||
1222 | * CAP_STD here based on ioctl handler provided by the | ||
1223 | * driver. If the driver doesn't support these | ||
1224 | * for a specific output, it must override these flags. | ||
1225 | */ | ||
1226 | if (ops->vidioc_s_std) | ||
1227 | p->capabilities |= V4L2_OUT_CAP_STD; | ||
1228 | if (ops->vidioc_s_dv_preset) | ||
1229 | p->capabilities |= V4L2_OUT_CAP_PRESETS; | ||
1230 | if (ops->vidioc_s_dv_timings) | ||
1231 | p->capabilities |= V4L2_OUT_CAP_CUSTOM_TIMINGS; | ||
1232 | |||
1233 | ret = ops->vidioc_enum_output(file, fh, p); | ||
1234 | if (!ret) | ||
1235 | dbgarg(cmd, "index=%d, name=%s, type=%d, " | ||
1236 | "audioset=0x%x, " | ||
1237 | "modulator=%d, std=0x%08Lx\n", | ||
1238 | p->index, p->name, p->type, p->audioset, | ||
1239 | p->modulator, (unsigned long long)p->std); | ||
1240 | break; | ||
1241 | } | ||
1242 | case VIDIOC_G_OUTPUT: | ||
1243 | { | ||
1244 | unsigned int *i = arg; | ||
1245 | |||
1246 | ret = ops->vidioc_g_output(file, fh, i); | ||
1247 | if (!ret) | ||
1248 | dbgarg(cmd, "value=%d\n", *i); | ||
1249 | break; | ||
1250 | } | ||
1251 | case VIDIOC_S_OUTPUT: | ||
1252 | { | ||
1253 | unsigned int *i = arg; | ||
1254 | |||
1255 | dbgarg(cmd, "value=%d\n", *i); | ||
1256 | ret = ops->vidioc_s_output(file, fh, *i); | ||
1257 | break; | ||
1258 | } | ||
1259 | 1268 | ||
1260 | /* --- controls ---------------------------------------------- */ | 1269 | /* --- controls ---------------------------------------------- */ |
1261 | case VIDIOC_QUERYCTRL: | 1270 | case VIDIOC_QUERYCTRL: |
@@ -1426,77 +1435,6 @@ static long __video_do_ioctl(struct file *file, | |||
1426 | p->id, p->index); | 1435 | p->id, p->index); |
1427 | break; | 1436 | break; |
1428 | } | 1437 | } |
1429 | /* --- audio ---------------------------------------------- */ | ||
1430 | case VIDIOC_ENUMAUDIO: | ||
1431 | { | ||
1432 | struct v4l2_audio *p = arg; | ||
1433 | |||
1434 | ret = ops->vidioc_enumaudio(file, fh, p); | ||
1435 | if (!ret) | ||
1436 | dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " | ||
1437 | "mode=0x%x\n", p->index, p->name, | ||
1438 | p->capability, p->mode); | ||
1439 | else | ||
1440 | dbgarg(cmd, "index=%d\n", p->index); | ||
1441 | break; | ||
1442 | } | ||
1443 | case VIDIOC_G_AUDIO: | ||
1444 | { | ||
1445 | struct v4l2_audio *p = arg; | ||
1446 | |||
1447 | ret = ops->vidioc_g_audio(file, fh, p); | ||
1448 | if (!ret) | ||
1449 | dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " | ||
1450 | "mode=0x%x\n", p->index, | ||
1451 | p->name, p->capability, p->mode); | ||
1452 | else | ||
1453 | dbgarg(cmd, "index=%d\n", p->index); | ||
1454 | break; | ||
1455 | } | ||
1456 | case VIDIOC_S_AUDIO: | ||
1457 | { | ||
1458 | struct v4l2_audio *p = arg; | ||
1459 | |||
1460 | dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " | ||
1461 | "mode=0x%x\n", p->index, p->name, | ||
1462 | p->capability, p->mode); | ||
1463 | ret = ops->vidioc_s_audio(file, fh, p); | ||
1464 | break; | ||
1465 | } | ||
1466 | case VIDIOC_ENUMAUDOUT: | ||
1467 | { | ||
1468 | struct v4l2_audioout *p = arg; | ||
1469 | |||
1470 | dbgarg(cmd, "Enum for index=%d\n", p->index); | ||
1471 | ret = ops->vidioc_enumaudout(file, fh, p); | ||
1472 | if (!ret) | ||
1473 | dbgarg2("index=%d, name=%s, capability=%d, " | ||
1474 | "mode=%d\n", p->index, p->name, | ||
1475 | p->capability, p->mode); | ||
1476 | break; | ||
1477 | } | ||
1478 | case VIDIOC_G_AUDOUT: | ||
1479 | { | ||
1480 | struct v4l2_audioout *p = arg; | ||
1481 | |||
1482 | ret = ops->vidioc_g_audout(file, fh, p); | ||
1483 | if (!ret) | ||
1484 | dbgarg2("index=%d, name=%s, capability=%d, " | ||
1485 | "mode=%d\n", p->index, p->name, | ||
1486 | p->capability, p->mode); | ||
1487 | break; | ||
1488 | } | ||
1489 | case VIDIOC_S_AUDOUT: | ||
1490 | { | ||
1491 | struct v4l2_audioout *p = arg; | ||
1492 | |||
1493 | dbgarg(cmd, "index=%d, name=%s, capability=%d, " | ||
1494 | "mode=%d\n", p->index, p->name, | ||
1495 | p->capability, p->mode); | ||
1496 | |||
1497 | ret = ops->vidioc_s_audout(file, fh, p); | ||
1498 | break; | ||
1499 | } | ||
1500 | case VIDIOC_G_MODULATOR: | 1438 | case VIDIOC_G_MODULATOR: |
1501 | { | 1439 | { |
1502 | struct v4l2_modulator *p = arg; | 1440 | struct v4l2_modulator *p = arg; |