Only in pvr250-1.2: setchannel diff -ur ../work.orig/pvr250-1.2/setchannel.c pvr250-1.2/setchannel.c --- ../work.orig/pvr250-1.2/setchannel.c Mon May 2 02:03:12 2005 +++ pvr250-1.2/setchannel.c Thu Aug 17 11:51:31 2006 @@ -58,6 +58,7 @@ printf("Usage: setchannel [-a {on|off}] [-c | -r | -s | -t] [-g geom] [-m chnl_set] [chnl | freq]\n" " -a Enable / disable AFC.\n" " -c Select composite input.\n" + " -d Select unit ( 0..x ). \n" " -r Select radio input.\n" " -s Select svideo input.\n" " -t Select tuner.\n" @@ -93,6 +94,7 @@ int i; int status; int tfd; + int unit; unsigned int channel; unsigned int fraction; unsigned int freq; @@ -107,11 +109,12 @@ channel_set = -1; device = 0; freq = 0; + unit = 0; status = 0; x_size = 0; y_size = 0; - while ((c = getopt (argc, argv, "a:crstg:m:")) != -1) + while ((c = getopt (argc, argv, "a:crstg:m:d:")) != -1) switch (c) { case 'a': if (strcasecmp (optarg, "on") == 0) @@ -124,6 +127,10 @@ } break; + case 'd': + unit = atoi (optarg); + break; + case 'c': device = METEOR_INPUT_DEV2; audio = -1; @@ -208,11 +215,15 @@ exit (1); } - tfd = open( "/dev/cxm0", O_RDONLY ); +{ char buf[255]; + sprintf(buf,"/dev/cxm%d",unit); + + tfd = open( buf, O_RDONLY ); if ( tfd < 0 ) { - perror( "open() of /dev/tuner0 failed." ); + perror( "open() of /dev/cxm0 failed." ); exit(1); } +} if (afc != -1) if ( ioctl( tfd, TVTUNER_SETAFC, &afc ) < 0 ) { Only in pvr250-1.2: setchannel.c.bak