From patchwork Thu Jan 10 21:33:36 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Nissl X-Patchwork-Id: 12574 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1JD5SD-0007Nx-0y for vdr@linuxtv.org; Thu, 10 Jan 2008 23:00:49 +0100 Received: (qmail invoked by alias); 10 Jan 2008 21:33:37 -0000 Received: from p54932CDF.dip0.t-ipconnect.de (EHLO [192.168.101.15]) [84.147.44.223] by mail.gmx.net (mp036) with SMTP; 10 Jan 2008 22:33:37 +0100 X-Authenticated: #527675 X-Provags-ID: V01U2FsdGVkX188ySxNhGE8dZNaEgMmvZrNprLaYlCUwBNiCxHpzK 5E0/Ewl16Vl4Wn Message-ID: <47868F30.3000505@gmx.de> Date: Thu, 10 Jan 2008 22:33:36 +0100 From: Reinhard Nissl User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.9) Gecko/20070801 SUSE/2.0.0.9-0.1 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: VDR Mailing List References: <42162.28712.qm@web55615.mail.re4.yahoo.com> In-Reply-To: <42162.28712.qm@web55615.mail.re4.yahoo.com> X-Y-GMX-Trusted: 0 Subject: Re: [vdr] Rotor patch for 1.5.12 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2008 22:00:49 -0000 Status: O X-Status: X-Keywords: X-UID: 15041 Hi, lucian orasanu schrieb: > it is changed after patch with function above and in > menu.c at line 304 is expecting another function like > this: > > SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,FEC_AUTO); > > so i modified this line in menu.c like this: > > SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,Symbolrate,Symbolrate,Symbolrate,Symbolrate); Try changing it to: SChannel->cChannel::SetSatTransponderData(RotorPos->R_Code(),Frequenz,Pol,Symbolrate,DVBFE_FEC_AUTO,DVBFE_MOD_AUTO,DVBFE_DELSYS_DVBS,DVBFE_ROLLOFF_UNKNOWN); You'll need to apply the attached VDR patch instead of the one included with vdr-rotor. Please keep in mind that I cannot test this patch. The suggested line above will only support DVB-S. For DVB-S2 and H.264 support, a lot more needs to be changed. Bye. --- ../vdr-1.5.12-dvbs2-other/device.h 2007-10-21 11:21:52.000000000 +0200 +++ device.h 2008-01-10 22:09:12.000000000 +0100 @@ -23,6 +23,7 @@ #include "spu.h" #include "thread.h" #include "tools.h" +#include #define MAXDEVICES 16 // the maximum number of devices in the system #define MAXPIDHANDLES 64 // the maximum number of different PIDs per device @@ -261,6 +266,7 @@ public: virtual bool HasProgramme(void); ///< Returns true if the device is currently showing any programme to ///< the user, either through replaying or live. + virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd) {return false;} // PID handle facilities --- ../vdr-1.5.12-dvbs2-other/dvbdevice.c 2008-01-01 22:55:18.000000000 +0100 +++ dvbdevice.c 2008-01-10 22:13:39.000000000 +0100 @@ -71,6 +71,7 @@ static int DvbOpen(const char *Name, int class cDvbTuner : public cThread { private: enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked }; + bool SendDiseqc; int fd_frontend; int cardIndex; int tuneTimeout; @@ -83,6 +84,7 @@ private: cMutex mutex; cCondVar locked; cCondVar newSet; + dvb_diseqc_master_cmd diseqc_cmd; bool GetFrontendStatus(fe_status_t &Status, int TimeoutMs = 0); bool SetFrontend(void); virtual void Action(void); @@ -91,12 +93,14 @@ public: virtual ~cDvbTuner(); bool IsTunedTo(const cChannel *Channel) const; void Set(const cChannel *Channel, bool Tune); + bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd); bool Locked(int TimeoutMs = 0); }; cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, dvbfe_delsys FrontendType) { fd_frontend = Fd_Frontend; + SendDiseqc = false; cardIndex = CardIndex; frontendType = FrontendType; tuneTimeout = 0; @@ -145,6 +149,17 @@ bool cDvbTuner::Locked(int TimeoutMs) return tunerStatus >= tsLocked; } +bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd) +{ + cMutexLock MutexLock(&mutex); + if (!(frontendType & (DVBFE_DELSYS_DVBS | DVBFE_DELSYS_DVBS2)) || SendDiseqc) + return false; + diseqc_cmd=cmd; + SendDiseqc=true; + newSet.Broadcast(); + return true; +} + bool cDvbTuner::GetFrontendStatus(fe_status_t &Status, int TimeoutMs) { if (TimeoutMs) { @@ -348,6 +363,10 @@ void cDvbTuner::Action(void) if (GetFrontendStatus(NewStatus, 10)) Status = NewStatus; cMutexLock MutexLock(&mutex); + if (SendDiseqc) { + CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &diseqc_cmd)); + SendDiseqc=false; + } switch (tunerStatus) { case tsIdle: break; @@ -918,6 +950,11 @@ bool cDvbDevice::HasLock(int TimeoutMs) return dvbTuner ? dvbTuner->Locked(TimeoutMs) : false; } +bool cDvbDevice::SendDiseqcCmd(dvb_diseqc_master_cmd cmd) +{ + return dvbTuner->SendDiseqcCmd(cmd); +} + int cDvbDevice::GetAudioChannelDevice(void) { if (HasDecoder()) { --- ../vdr-1.5.12-dvbs2-other/dvbdevice.h 2008-01-01 22:55:18.000000000 +0100 +++ dvbdevice.h 2008-01-10 22:09:12.000000000 +0100 @@ -66,11 +67,13 @@ public: virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView); public: virtual bool HasLock(int TimeoutMs = 0); + virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd); // PID handle facilities