Changeset 4126
- Timestamp:
- 05/25/08 15:03:47 (8 months ago)
- Files:
-
- ivtv/trunk/utils/ivtv-ctl.c (modified) (9 diffs)
- ivtv/trunk/utils/v4l2-dbg.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ivtv/trunk/utils/ivtv-ctl.c
r4122 r4126 40 40 #include <linux/videodev2.h> 41 41 #include <linux/dvb/video.h> 42 #include <linux/dvb/audio.h> 42 43 43 44 /* copied from ivtv-driver.h */ … … 85 86 OptSetYuvMode, 86 87 OptGetYuvMode, 88 OptSetAudioMute, 89 OptSetStereoMode, 90 OptSetBilingualMode, 87 91 OptLast = 256 88 92 }; 89 93 90 94 static char options[OptLast]; 95 96 static int app_result; 91 97 92 98 static struct option long_options[] = { … … 105 111 {"get-yuv-mode", no_argument, 0, OptGetYuvMode}, 106 112 {"set-yuv-mode", required_argument, 0, OptSetYuvMode}, 113 {"set-audio-mute", required_argument, 0, OptSetAudioMute}, 114 {"set-stereo-mode", required_argument, 0, OptSetStereoMode}, 115 {"set-bilingual-mode", required_argument, 0, OptSetBilingualMode}, 107 116 {0, 0, 0, 0} 108 117 }; … … 122 131 printf(" mode 2: progressive\n"); 123 132 printf(" mode 3: auto\n"); 133 printf(" --set-audio-mute <mute>\n"); 134 printf(" 0=enable audio during 1.5x and 0.5x playback\n"); 135 printf(" 1=mute audio during 1.5x and 0.5x playback\n"); 136 printf(" --set-stereo-mode <mode>\n"); 137 printf(" mode 0: playback stereo as stereo\n"); 138 printf(" mode 1: playback left stereo channel as mono\n"); 139 printf(" mode 2: playback right stereo channel as mono\n"); 140 printf(" mode 3: playback stereo as mono\n"); 141 printf(" mode 4: playback stereo as swapped stereo\n"); 142 printf(" --set-bilingual-mode <mode>\n"); 143 printf(" mode 0: playback bilingual as stereo\n"); 144 printf(" mode 1: playback left bilingual channel as mono\n"); 145 printf(" mode 2: playback right bilingual channel as mono\n"); 146 printf(" mode 3: playback bilingual as mono\n"); 147 printf(" mode 4: playback bilingual as swapped stereo\n"); 124 148 printf(" --reset <mask> reset the infrared receiver (1) or digitizer (2) [VIDIOC_INT_RESET]\n"); 125 149 printf("\n"); … … 286 310 printf("ioctl %s ", name); 287 311 retVal = ioctl(fd, request, parm); 288 if (retVal < 0) 312 if (retVal < 0) { 313 app_result = -1; 289 314 printf("failed: %s\n", strerror(errno)); 315 } 290 316 else 291 317 printf("ok\n"); … … 326 352 int gpio_set_dir = 0; 327 353 int passthrough = 0; 354 int audio_mute = 0; 355 int stereo_mode = 0; 356 int bilingual_mode = 0; 328 357 int debug_level = 0; 329 358 __u32 reset = 0; … … 427 456 case OptPassThrough: 428 457 passthrough = strtol(optarg, 0L, 0); 458 break; 459 case OptSetAudioMute: 460 audio_mute = strtol(optarg, 0L, 0); 461 break; 462 case OptSetStereoMode: 463 stereo_mode = strtol(optarg, 0L, 0); 464 break; 465 case OptSetBilingualMode: 466 bilingual_mode = strtol(optarg, 0L, 0); 429 467 break; 430 468 case OptSetGPIO: … … 589 627 } 590 628 629 if (options[OptSetAudioMute]) { 630 doioctl(fd, AUDIO_SET_MUTE, (void *)audio_mute, "AUDIO_SET_MUTE"); 631 } 632 633 if (options[OptSetStereoMode]) { 634 doioctl(fd, AUDIO_CHANNEL_SELECT, 635 (void *)stereo_mode, "AUDIO_CHANNEL_SELECT"); 636 } 637 638 if (options[OptSetBilingualMode]) { 639 doioctl(fd, AUDIO_BILINGUAL_CHANNEL_SELECT, 640 (void *)bilingual_mode, "AUDIO_BILINGUAL_CHANNEL_SELECT"); 641 } 642 591 643 if (options[OptReset]) 592 644 doioctl(fd, VIDIOC_INT_RESET, &reset, "VIDIOC_INT_RESET"); … … 632 684 633 685 close(fd); 634 exit( 0);635 } 686 exit(app_result); 687 } ivtv/trunk/utils/v4l2-dbg.cpp
r3967 r4126 34 34 #include <sys/klog.h> 35 35 36 #include "videodev2.h"36 #include <linux/videodev2.h> 37 37 38 38 #include <list>
