Re : TT S2-3200 driver

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

 



Le 17.07.2008 06:20:36, Remy Bohmer a écrit :
> Hello Ales and Marc,
> 
> > please try attached patch. With this patch I'm able to get lock on
> channels
> 
> Okay, I want to test it too, but I have some troubles getting the
> multiproto drivers up and running.
> The S2-3200 is detected properly in my system, but I have no working
> szap2, or scan, or dvbstream tools.
> 
> The two of you seem to have it working, so maybe you can give me some
> hints:
> What sources (what version) do I need?
> Is there a clear manual available somewhere that describes how to use
> the multiproto drivers?
> What version of szap2 (and scan) should I use? and where can I find
> it?
> Does dvbstream still work? Or can I use Mythtv directly?

If you want to use myth you can try the attached patch (against trunk).
Make sure that the includes in /usr/include/linux/dvb/ are the one from 
your multiproto tree (check for a DVBFE_SET_DELSYS define in the 
frontend.h source).
Bye
Manu
--- trunk/mythtv/libs/libmythtv/dvbchannel.cpp	2008-07-10 22:02:57.000000000 -0400
+++ trunk-work/mythtv/libs/libmythtv/dvbchannel.cpp	2008-07-11 18:33:33.000000000 -0400
@@ -211,8 +211,16 @@
     }
     VERBOSE(VB_IMPORTANT, LOC + "Getting additional DVBFE_GET_INFO information." + ENO);
     dvbfe_info fe_info;
+    enum dvbfe_delsys delsys = DVBFE_DELSYS_DVBS;
     bzero(&fe_info, sizeof(fe_info));
-    fe_info.delivery = DVBFE_DELSYS_DVBS;
+    if (ioctl(fd_frontend, DVBFE_SET_DELSYS, &delsys)<0)
+    {
+        VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to set delivery system." + ENO);
+        close(fd_frontend);
+        fd_frontend = -1;
+    }
+        
+    //fe_info.delivery = DVBFE_DELSYS_DVBS;
     if (ioctl(fd_frontend, DVBFE_GET_INFO, &fe_info) < 0)
     {
         VERBOSE(VB_IMPORTANT, LOC_ERR +
@@ -773,42 +781,49 @@
 	// check for multiproto API
 	if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 3)) {
 		struct dvbfe_params fe_params;
-		unsigned int delsys = DVBFE_DELSYS_DVBS; //TODO: should come from configuration/database
+		enum dvbfe_delsys delsys = DVBFE_DELSYS_DVBS; //TODO: should come from configuration/database
 
 		VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
                         QString("API minor version=%1, delivery system = %2").arg(DVB_API_VERSION_MINOR).arg(delsys));
 
 		fe_params.frequency = params.frequency;
-		fe_params.inversion = DVBFE_INVERSION_AUTO;
+		fe_params.inversion = INVERSION_AUTO;
 		
 		switch (delsys) 
 		{
-		case DVBFE_DELSYS_DVBS:
-			fe_params.delsys.dvbs.symbol_rate = params.u.qpsk.symbol_rate;
-			fe_params.delsys.dvbs.fec = DVBFE_FEC_AUTO;
-			fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO;
-            		fe_params.delivery= DVBFE_DELSYS_DVBS;
-			VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
-                        	QString("Frequency = %2, Srate = %3 (DVB-S)")..arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate));
-			break;
-		case DVBFE_DELSYS_DVBS2:
-			fe_params.delsys.dvbs2.symbol_rate = params.u.qpsk.symbol_rate; //TODO: should use the new symbol_rate type
-			fe_params.delsys.dvbs2.fec = DVBFE_FEC_AUTO; //TODO: should use the new FEC options
-			fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO;
-            		fe_params.delivery= DVBFE_DELSYS_DVBS2;
-			VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
-                        	QString("Frequency = %2, Srate = %3 (DVB-S2)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs2.symbol_rate));
-			break;
-		default:
-			return false;
+                                            case DVBFE_DELSYS_DVBS:
+                                                fe_params.delsys.dvbs.symbol_rate = params.u.qpsk.symbol_rate;
+                                                fe_params.delsys.dvbs.fec = DVBFE_FEC_AUTO;
+                                                fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO;
+                                                //fe_params.delivery= DVBFE_DELSYS_DVBS;
+                                                VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
+                                                        QString("Frequency = %2, Srate = %3 (DVB-S)")
+                                                        .arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate));
+                                                break;
+                                            case DVBFE_DELSYS_DVBS2:
+                                                fe_params.delsys.dvbs2.symbol_rate = params.u.qpsk.symbol_rate; //TODO: should use the new symbol_rate type
+                                                fe_params.delsys.dvbs2.fec = DVBFE_FEC_AUTO; //TODO: should use the new FEC options
+                                                fe_params.delsys.dvbs.modulation = DVBFE_MOD_AUTO;
+                                                fe_params.delivery= DVBFE_DELSYS_DVBS2;
+                                                VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
+                                                        QString("Frequency = %2, Srate = %3 (DVB-S2)")
+                                                        .arg(fe_params.frequency).arg(fe_params.delsys.dvbs2.symbol_rate));
+                                                break;
+                                            default:
+                                                return false;
 		}
 		VERBOSE(VB_CHANNEL, LOC + "Tune(): " +
-                        QString("Frequency = %1, Srate = %2 (SET_PARAMS)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate));
-
+                                                QString("Frequency = %1, Srate = %2 (SET_PARAMS)").arg(fe_params.frequency).arg(fe_params.delsys.dvbs.symbol_rate));
+                                        
+                                        if (ioctl(fd_frontend, DVBFE_SET_DELSYS, &delsys) < 0) {
+                                            VERBOSE(VB_IMPORTANT, LOC_ERR +
+                                                    "Tune(): " + "DVB_SET_DELSYS failed");
+                                            return false;
+                                        }
 		if (ioctl(fd_frontend, DVBFE_SET_PARAMS, &fe_params) == -1) {
-			VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " +
-                        	"DVBFE_SET_PARAMS failed");
-			return false;
+                                            VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " +
+                                                    "DVBFE_SET_PARAMS failed");
+                                            return false;
 		}
 
 	}

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux