public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [linux-dvb] (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
@ 2008-07-12  0:21 manu
  2008-07-14 16:12 ` Jelle De Loecker
  0 siblings, 1 reply; 6+ messages in thread
From: manu @ 2008-07-12  0:21 UTC (permalink / raw)
  To: Linux DVB Mailing List, Discussion about mythtv

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

	Hi all,
subject says it all. This patch (that applies to trunk, but probably 
also for 0.21.fixes) allows myth to tune with the latest multiproto 
drivers.
No DVB-S2 support here, its a crude patch, but it works for DVB-S.
Bye
Manu


[-- Attachment #2: mythtv-multiproto.patch --]
[-- Type: text/x-patch, Size: 5644 bytes --]

--- ../../trunk/mythtv/libs/libmythtv/dvbchannel.cpp	2008-07-10 22:02:57.000000000 -0400
+++ 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;
 		}
 
 	}


[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-dvb] (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
  2008-07-12  0:21 [linux-dvb] (Crude) Patch to support latest multiproto drivers (as of 2008-07-11 manu
@ 2008-07-14 16:12 ` Jelle De Loecker
  2008-07-14 19:47   ` [linux-dvb] Re : " manu
  2008-07-15 17:55   ` [linux-dvb] " manu
  0 siblings, 2 replies; 6+ messages in thread
From: Jelle De Loecker @ 2008-07-14 16:12 UTC (permalink / raw)
  To: manu, linux-dvb


[-- Attachment #1.1: Type: text/plain, Size: 727 bytes --]


manu schreef:
> 	Hi all,
> subject says it all. This patch (that applies to trunk, but probably 
> also for 0.21.fixes) allows myth to tune with the latest multiproto 
> drivers.
> No DVB-S2 support here, its a crude patch, but it works for DVB-S.
> Bye
> Manu
>   
As ridiculous as it might seem, I still have difficulties applying 
patches. I know, shoot me! I never seem to get when to use the -p1 or 
-p0 option, or whatever! Here's my output.

patch -p0 < mythtv*.patch
patching file libs/libmythtv/dvbchannel.cpp
Hunk #1 FAILED at 211.
Hunk #2 FAILED at 781.
2 out of 2 hunks FAILED -- saving rejects to file 
libs/libmythtv/dvbchannel.cpp.rej


/Met vriendelijke groeten,/

*Jelle De Loecker*
Kipdola Studios - Tomberg

[-- Attachment #1.2: Type: text/html, Size: 1147 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-dvb] Re : (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
  2008-07-14 16:12 ` Jelle De Loecker
@ 2008-07-14 19:47   ` manu
  2008-07-15  9:53     ` Jelle De Loecker
  2008-07-15 17:55   ` [linux-dvb] " manu
  1 sibling, 1 reply; 6+ messages in thread
From: manu @ 2008-07-14 19:47 UTC (permalink / raw)
  To: Linux DVB Mailing List

Le 14.07.2008 12:12:24, Jelle De Loecker a écrit :
> 
> manu schreef:
> > 	Hi all,
> > subject says it all. This patch (that applies to trunk, but 
> probably
> 
> > also for 0.21.fixes) allows myth to tune with the latest multiproto 
> > drivers.
> > No DVB-S2 support here, its a crude patch, but it works for DVB-S.
> > Bye
> > Manu
> >   
> As ridiculous as it might seem, I still have difficulties applying 
> patches. I know, shoot me! I never seem to get when to use the -p1 or 
> -p0 option, or whatever! Here's my output.
> 
> patch -p0 < mythtv*.patch
> patching file libs/libmythtv/dvbchannel.cpp
> Hunk #1 FAILED at 211.
> Hunk #2 FAILED at 781.
> 2 out of 2 hunks FAILED -- saving rejects to file 
> libs/libmythtv/dvbchannel.cpp.rej
> 
> 
> /Met vriendelijke groeten,/
> 
> *Jelle De Loecker*
> Kipdola Studios - Tomberg
> 

p0 is the one, but it looks like your tree does not play well with my 
patch. This patch is to be applied on trunk -latest- mythtv.
HTH
Bye
Manu



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-dvb] Re : (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
  2008-07-14 19:47   ` [linux-dvb] Re : " manu
@ 2008-07-15  9:53     ` Jelle De Loecker
  2008-07-15 11:20       ` [linux-dvb] Re : " manu
  0 siblings, 1 reply; 6+ messages in thread
From: Jelle De Loecker @ 2008-07-15  9:53 UTC (permalink / raw)
  To: manu, LinuxTV DVB Mailing

manu schreef:
> This patch is to be applied on trunk -latest- mythtv.
> HTH
> Bye
> Manu
>   
Well, that's what's so strange about it. I really did download the svn 
trunk, certainly things couldn't have changed so much in a few days?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-dvb] Re : Re : (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
  2008-07-15  9:53     ` Jelle De Loecker
@ 2008-07-15 11:20       ` manu
  0 siblings, 0 replies; 6+ messages in thread
From: manu @ 2008-07-15 11:20 UTC (permalink / raw)
  To: Linux DVB Mailing List

Le 15.07.2008 05:53:40, Jelle De Loecker a écrit :
> manu schreef:
> > This patch is to be applied on trunk -latest- mythtv.
> > HTH
> > Bye
> > Manu
> >   
> Well, that's what's so strange about it. I really did download the 
> svn
> 
> trunk, certainly things couldn't have changed so much in a few days?

Maybe, let me try to regenerate the patch. I will post it ASAP 
(probably today).
Bye
Manu



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-dvb] Re : (Crude) Patch to support latest multiproto drivers (as of 2008-07-11
  2008-07-14 16:12 ` Jelle De Loecker
  2008-07-14 19:47   ` [linux-dvb] Re : " manu
@ 2008-07-15 17:55   ` manu
  1 sibling, 0 replies; 6+ messages in thread
From: manu @ 2008-07-15 17:55 UTC (permalink / raw)
  To: Linux DVB Mailing List

Could you try this patch? I checked this is against 17783.
For this one, go into your mythtv directory and use patch -p2.
HTH
Bye
Manu


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-15 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-12  0:21 [linux-dvb] (Crude) Patch to support latest multiproto drivers (as of 2008-07-11 manu
2008-07-14 16:12 ` Jelle De Loecker
2008-07-14 19:47   ` [linux-dvb] Re : " manu
2008-07-15  9:53     ` Jelle De Loecker
2008-07-15 11:20       ` [linux-dvb] Re : " manu
2008-07-15 17:55   ` [linux-dvb] " manu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox