|
From: <lin...@us...> - 2002-06-27 18:41:45
|
Update of /cvsroot/dvbtools/dvbtune In directory usw-pr-cvs1:/tmp/cvs-serv3402 Modified Files: README Makefile tune.c Added Files: dvb_defaults.h Log Message: added new dvb_defaults.h file and related changes --- NEW FILE: dvb_defaults.h --- /* dvb_defaults.h Idea provided by Tomi Ollila, implemented by Dave Chapman. Copyright (C) Dave Chapman 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or, point your browser to http://www.gnu.org/copyleft/gpl.html */ #ifndef _DVB_DEFAULTS_H #define _DVB_DEFAULTS_H /* Either uncomment one of the following lines, or add it to your "make" command. e.g. make FINLAND=1 */ //#define UK //#define FINLAND //#define FINLAND2 /* Firstly, lets define some world-wide defaults */ #define BANDWIDTH_DEFAULT BANDWIDTH_8_MHZ #define CONSTELLATION_DEFAULT QAM_64 #define HIERARCHY_DEFAULT HIERARCHY_NONE #define LP_CODERATE_DEFAULT FEC_1_2 /* DVB-T */ #ifdef UK /* UNITED KINGDOM settings */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #ifdef FINLAND /* FINLAND settings 1 */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_8K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifdef FINLAND2 /* FINLAND settings 2 */ #define HP_CODERATE_DEFAULT FEC_1_2 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifndef HP_CODERATE_DEFAULT #warning No DVB-T country defined in dvb_defaults.h #warning defaulting to UK #warning Ignore this if using Satellite or Cable /* Default to the UK */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #endif Index: README =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 16 May 2002 21:39:46 -0000 1.2 --- README 27 Jun 2002 18:41:40 -0000 1.3 *************** *** 36,40 **** If you are using dvbtune for DVB-T in Finland, you should replace the ! "make" command with "make FINLAND=1". Once you have installed libxml (if required), then you can compile --- 36,41 ---- If you are using dvbtune for DVB-T in Finland, you should replace the ! "make" command with "make FINLAND=1". or "make FINLAND2=1" (see the ! comments in the dvb_defaults.h file for details). Once you have installed libxml (if required), then you can compile Index: Makefile =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 16 May 2002 21:39:46 -0000 1.2 --- Makefile 27 Jun 2002 18:41:40 -0000 1.3 *************** *** 4,12 **** all: dvbtune ifdef FINLAND CFLAGS += -DFINLAND endif ! tune.o: tune.c tune.h dvbtune: dvbtune.c tune.o --- 4,20 ---- all: dvbtune + ifdef UK + CFLAGS += -DUK + endif + ifdef FINLAND CFLAGS += -DFINLAND endif ! ifdef FINLAND2 ! CFLAGS += -DFINLAND2 ! endif ! ! tune.o: tune.c tune.h dvb_defaults.h dvbtune: dvbtune.c tune.o Index: tune.c =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tune.c 27 Jun 2002 08:04:08 -0000 1.4 --- tune.c 27 Jun 2002 18:41:40 -0000 1.5 *************** *** 1,2 **** --- 1,23 ---- + /* dvbtune - tune.c + + Copyright (C) Dave Chapman 2001,2002 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Or, point your browser to http://www.gnu.org/copyleft/gpl.html + + */ + #include <stdio.h> #include <stdlib.h> *************** *** 11,19 **** #include <ost/frontend.h> #define slof (11700*1000UL) #define lof1 (9750*1000UL) #define lof2 (10600*1000UL) - int OSTSelftest(int fd) { --- 32,41 ---- #include <ost/frontend.h> + #include "dvb_defaults.h" + #define slof (11700*1000UL) #define lof1 (9750*1000UL) #define lof2 (10600*1000UL) int OSTSelftest(int fd) { *************** *** 150,172 **** feparams.Frequency=freq; feparams.Inversion=INVERSION_OFF; ! #ifdef FINLAND ! /* FINLAND Parameters */ ! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8 ! feparams.u.ofdm.HP_CodeRate=FEC_1_2; ! feparams.u.ofdm.LP_CodeRate=FEC_1_2; ! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16 ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_8; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE; ! #else ! /* UK Parameters */ ! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8 ! feparams.u.ofdm.HP_CodeRate=FEC_2_3; ! feparams.u.ofdm.LP_CodeRate=FEC_1_2; ! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16 ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE; ! #endif break; case FE_QPSK: --- 172,182 ---- feparams.Frequency=freq; feparams.Inversion=INVERSION_OFF; ! feparams.u.ofdm.bandWidth=BANDWIDTH_DEFAULT; ! feparams.u.ofdm.HP_CodeRate=HP_CODERATE_DEFAULT; ! feparams.u.ofdm.LP_CodeRate=LP_CODERATE_DEFAULT; ! feparams.u.ofdm.Constellation=CONSTELLATION_DEFAULT; ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_DEFAULT; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_DEFAULT; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_DEFAULT; break; case FE_QPSK: |