summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--INSTALL7
-rw-r--r--dvbapi.c70
-rw-r--r--dvbapi.h4
4 files changed, 40 insertions, 43 deletions
diff --git a/HISTORY b/HISTORY
index 9ad19127..df60e3a6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -745,3 +745,5 @@ Video Disk Recorder Revision History
- The pipe to the Dolby Digital replay command (option '-a') now closes all
unused file descriptors in the child process to avoid crashing when the
OSD is used (thanks to Andreas Vitting).
+- Switched to the driver's new tuning API (VDR now requires a driver version
+ dated 2001-09-14 or higher).
diff --git a/INSTALL b/INSTALL
index 846ddeec..b3271f9d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -27,11 +27,8 @@ You can find 'libdvdread' at
http://www.dtek.chalmers.se/groups/dvd/downloads.html
-VDR requires the card driver version 0.9.0 or higher
-to work properly. You need to load the dvb.o module *without* option
-'outstream=0' (previous versions of VDR required this option to have
-the driver supply the data in AV_PES format; as of version 0.70 VDR
-works with PES format).
+VDR requires the card driver version dated 2001-09-14 or higher
+to work properly.
After extracting the package, change into the VDR directory
and type 'make'. This should produce an executable file
diff --git a/dvbapi.c b/dvbapi.c
index 829bc701..fe675d10 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -7,7 +7,7 @@
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
*
- * $Id: dvbapi.c 1.119 2001/09/15 12:45:19 kls Exp $
+ * $Id: dvbapi.c 1.120 2001/09/15 13:51:27 kls Exp $
*/
//#define DVDDEBUG 1
@@ -40,15 +40,14 @@ extern "C" {
#include "tools.h"
#include "videodir.h"
-#define DEV_VIDEO "/dev/video"
-#define DEV_OST_OSD "/dev/ost/osd"
-#define DEV_OST_QAMFE "/dev/ost/qamfe"
-#define DEV_OST_QPSKFE "/dev/ost/qpskfe"
-#define DEV_OST_SEC "/dev/ost/sec"
-#define DEV_OST_DVR "/dev/ost/dvr"
-#define DEV_OST_DEMUX "/dev/ost/demux"
-#define DEV_OST_VIDEO "/dev/ost/video"
-#define DEV_OST_AUDIO "/dev/ost/audio"
+#define DEV_VIDEO "/dev/video"
+#define DEV_OST_OSD "/dev/ost/osd"
+#define DEV_OST_FRONTEND "/dev/ost/frontend"
+#define DEV_OST_SEC "/dev/ost/sec"
+#define DEV_OST_DVR "/dev/ost/dvr"
+#define DEV_OST_DEMUX "/dev/ost/demux"
+#define DEV_OST_VIDEO "/dev/ost/video"
+#define DEV_OST_AUDIO "/dev/ost/audio"
// The size of the array used to buffer video data:
// (must be larger than MINVIDEODATA - see remux.h)
@@ -2474,9 +2473,8 @@ cDvbApi::cDvbApi(int n)
// Devices that are only present on DVB-C or DVB-S cards:
- fd_qamfe = OstOpen(DEV_OST_QAMFE, n, O_RDWR);
- fd_qpskfe = OstOpen(DEV_OST_QPSKFE, n, O_RDWR);
- fd_sec = OstOpen(DEV_OST_SEC, n, O_RDWR);
+ fd_frontend = OstOpen(DEV_OST_FRONTEND, n, O_RDWR);
+ fd_sec = OstOpen(DEV_OST_SEC, n, O_RDWR);
// Devices that all DVB cards must have:
@@ -2507,7 +2505,7 @@ cDvbApi::cDvbApi(int n)
// We only check the devices that must be present - the others will be checked before accessing them:
- if (((fd_qpskfe >= 0 && fd_sec >= 0) || fd_qamfe >= 0) && fd_demuxv >= 0 && fd_demuxa1 >= 0 && fd_demuxa2 >= 0 && fd_demuxd1 >= 0 && fd_demuxd2 >= 0 && fd_demuxt >= 0) {
+ if (fd_frontend >= 0 && fd_demuxv >= 0 && fd_demuxa1 >= 0 && fd_demuxa2 >= 0 && fd_demuxd1 >= 0 && fd_demuxd2 >= 0 && fd_demuxt >= 0) {
siProcessor = new cSIProcessor(OstName(DEV_OST_DEMUX, n));
if (!dvbApi[0]) // only the first one shall set the system time
siProcessor->SetUseTSTime(Setup.SetSystemTime);
@@ -2627,7 +2625,7 @@ bool cDvbApi::Init(void)
NumDvbApis = 0;
for (int i = 0; i < MAXDVBAPI; i++) {
if (useDvbApi == 0 || (useDvbApi & (1 << i)) != 0) {
- if (Probe(OstName(DEV_OST_QPSKFE, i)) || Probe(OstName(DEV_OST_QAMFE, i)))
+ if (Probe(OstName(DEV_OST_FRONTEND, i)))
dvbApi[NumDvbApis++] = new cDvbApi(i);
else
break;
@@ -3227,7 +3225,7 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char
bool ChannelSynced = false;
- if (fd_qpskfe >= 0 && fd_sec >= 0) { // DVB-S
+ if (fd_sec >= 0) { // DVB-S
// Frequency offsets:
@@ -3243,10 +3241,10 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char
tone = SEC_TONE_ON;
}
- qpskParameters qpsk;
- qpsk.iFrequency = freq * 1000UL;
- qpsk.SymbolRate = Srate * 1000UL;
- qpsk.FEC_inner = FEC_AUTO;
+ FrontendParameters Frontend;
+ Frontend.Frequency = freq * 1000UL;
+ Frontend.u.qpsk.SymbolRate = Srate * 1000UL;
+ Frontend.u.qpsk.FEC_inner = FEC_AUTO;
int volt = (Polarization == 'v' || Polarization == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
@@ -3270,44 +3268,44 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char
// Tuning:
- CHECK(ioctl(fd_qpskfe, QPSK_TUNE, &qpsk));
+ CHECK(ioctl(fd_frontend, FE_SET_FRONTEND, &Frontend));
// Wait for channel sync:
- if (cFile::FileReady(fd_qpskfe, 5000)) {
- qpskEvent event;
- int res = ioctl(fd_qpskfe, QPSK_GET_EVENT, &event);
+ if (cFile::FileReady(fd_frontend, 5000)) {
+ FrontendEvent event;
+ int res = ioctl(fd_frontend, FE_GET_EVENT, &event);
if (res >= 0)
ChannelSynced = event.type == FE_COMPLETION_EV;
else
- esyslog(LOG_ERR, "ERROR %d in qpsk get event", res);
+ esyslog(LOG_ERR, "ERROR %d in frontend get event", res);
}
else
esyslog(LOG_ERR, "ERROR: timeout while tuning");
}
- else if (fd_qamfe >= 0) { // DVB-C
+ else if (fd_frontend >= 0) { // DVB-C
// Frequency and symbol rate:
- qamParameters qam;
- qam.Frequency = FrequencyMHz * 1000000UL;
- qam.SymbolRate = Srate * 1000UL;
- qam.FEC_inner = FEC_AUTO;
- qam.QAM = QAM_64;
+ FrontendParameters Frontend;
+ Frontend.Frequency = FrequencyMHz * 1000000UL;
+ Frontend.u.qam.SymbolRate = Srate * 1000UL;
+ Frontend.u.qam.FEC_inner = FEC_AUTO;
+ Frontend.u.qam.QAM = QAM_64;
// Tuning:
- CHECK(ioctl(fd_qamfe, QAM_TUNE, &qam));
+ CHECK(ioctl(fd_frontend, FE_SET_FRONTEND, &Frontend));
// Wait for channel sync:
- if (cFile::FileReady(fd_qamfe, 5000)) {
- qamEvent event;
- int res = ioctl(fd_qamfe, QAM_GET_EVENT, &event);
+ if (cFile::FileReady(fd_frontend, 5000)) {
+ FrontendEvent event;
+ int res = ioctl(fd_frontend, FE_GET_EVENT, &event);
if (res >= 0)
ChannelSynced = event.type == FE_COMPLETION_EV;
else
- esyslog(LOG_ERR, "ERROR %d in qam get event", res);
+ esyslog(LOG_ERR, "ERROR %d in frontend get event", res);
}
else
esyslog(LOG_ERR, "ERROR: timeout while tuning");
diff --git a/dvbapi.h b/dvbapi.h
index 508942e6..5e19a8e1 100644
--- a/dvbapi.h
+++ b/dvbapi.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.h 1.49 2001/09/09 14:37:18 kls Exp $
+ * $Id: dvbapi.h 1.50 2001/09/15 13:46:00 kls Exp $
*/
#ifndef __DVBAPI_H
@@ -87,7 +87,7 @@ class cDvbApi {
friend class cTransferBuffer;
private:
int videoDev;
- int fd_osd, fd_qpskfe, fd_qamfe, fd_sec, fd_dvr, fd_audio, fd_video, fd_demuxa1, fd_demuxa2, fd_demuxd1, fd_demuxd2, fd_demuxv, fd_demuxt;
+ int fd_osd, fd_frontend, fd_sec, fd_dvr, fd_audio, fd_video, fd_demuxa1, fd_demuxa2, fd_demuxd1, fd_demuxd2, fd_demuxv, fd_demuxt;
int vPid, aPid1, aPid2, dPid1, dPid2;
bool SetPid(int fd, dmxPesType_t PesType, int Pid, dmxOutput_t Output);
bool SetVpid(int Vpid, dmxOutput_t Output) { return SetPid(fd_demuxv, DMX_PES_VIDEO, Vpid, Output); }