Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: 1.0.0-pre1 and WinTV-NOVA-T PCI signal fine(?), no picture



On Mon, Mar 03, 2003 at 03:50:25PM +0200, Kimmo Vuorinen wrote:
> Could you tell us how you modified dvbstream, I'm having exactly same 
> problem. I thought first that it was my mistake with some settings.

After some re-iterating of the list, seems like the easiest solution
is:

 insmod dvb-core.o dvb_shutdown_timeout=0
  
Which explains why I got it working first since make insmod does that
for me, while I forgot to add it to my modules.conf. 

I've attached the patch anyway.

-- 
Riku Voipio  	       |    riku.voipio@iki.fi         |
kirkkonummentie 33     |    +358 40 8476974          --+--
02140 Espoo            |                               |
Facts do not cease to exist because they are ignored.  |
Index: dvbstream.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/dvbstream.c,v
retrieving revision 1.8
diff -u -r1.8 dvbstream.c
--- dvbstream.c	13 Oct 2002 18:44:09 -0000	1.8
+++ dvbstream.c	3 Mar 2003 14:19:33 -0000
@@ -99,10 +99,15 @@
 fe_code_rate_t HP_CodeRate=HP_CODERATE_DEFAULT;
 unsigned int diseqc=0;
 char pol=0;
+int fd_sec=0;
+int fd_frontend=0;
 
-int open_fe(int* fd_frontend,int* fd_sec) {
+int open_fe() {
 
-    if((*fd_frontend = open(frontenddev[card],O_RDWR)) < 0){
+    if (fd_frontend > 0)
+        return 1;
+
+    if((fd_frontend = open(frontenddev[card],O_RDWR)) < 0){
         perror("FRONTEND DEVICE: ");
         return -1;
     }
@@ -110,7 +115,7 @@
     fd_sec=0;
 #else
     if (fd_sec!=0) {
-      if((*fd_sec = open(secdev[card],O_RDWR)) < 0){
+      if((fd_sec = open(secdev[card],O_RDWR)) < 0){
           perror("SEC DEVICE: ");
           return -1;
       }
@@ -175,8 +180,6 @@
   int pestypes[MAX_CHANNELS];
   unsigned char hi_mappids[8192];
   unsigned char lo_mappids[8192];
-  int fd_sec;
-  int fd_frontend;
   int pid,pid2;
   int connectionOpen;
   int fromlen;
@@ -322,11 +325,11 @@
               if (cmd[i]!=0) {
                 while (cmd[i]==' ') i++;
                 srate=atoi(&cmd[i])*1000UL;
-                if (open_fe(&fd_frontend,&fd_sec)) {
+                if (open_fe()) {
                   fprintf(stderr,"Tuning to %ld,%ld,%c\n",freq,srate,pol);
                   tune_it(fd_frontend,fd_sec,freq,srate,pol,tone,specInv,diseqc,modulation,HP_CodeRate,TransmissionMode,guardInterval,bandWidth);
-                  close(fd_frontend);
-                  if (fd_sec) close(fd_sec);
+                  //close(fd_frontend);
+                  //if (fd_sec) close(fd_sec);
                 }
               }
             }
@@ -614,16 +617,20 @@
   if (signal(SIGALRM, SignalHandler) == SIG_IGN) signal(SIGALRM, SIG_IGN);
 
   if ( (freq>100000000)) {
-    if (open_fe(&fd_frontend,0)) {
+    if (open_fe()) {
       i=tune_it(fd_frontend,0,freq,0,0,tone,specInv,diseqc,modulation,HP_CodeRate,TransmissionMode,guardInterval,bandWidth);
-      close(fd_frontend);
+      //close(fd_frontend);
     }
   } else if ((freq!=0) && (pol!=0) && (srate!=0)) {
-    if (open_fe(&fd_frontend,&fd_sec)) {
+    if (open_fe()) {
       i=tune_it(fd_frontend,fd_sec,freq,srate,pol,tone,specInv,diseqc,modulation,HP_CodeRate,TransmissionMode,guardInterval,bandWidth);
-      close(fd_frontend);
-      if (fd_sec) close(fd_sec);
+      //close(fd_frontend);
+      //if (fd_sec) close(fd_sec);
     }
+  }
+  else 
+  {
+    open_fe();
   }
 
   if (i<0) { exit(i); }

Home | Main Index | Thread Index