[linux-dvb] libdvb and dvbscan

2002-10-12 Thread Juha Yrjölä
Hi all,

I started hacking together a general-purpose DVB library. It can be
downloaded at:

http://jemmari.tky.hut.fi/dvb/libdvb.tar.gz

It's very much work-in-progress at the moment, but I put it there so you
can see what the API is going to be like. The package includes only one
test program, ingeniously called 'dvbscan'. It will parse the PAT, SDT
and PMT tables and print out all the services. At least here at the
university campus it did. =) Your mileage may vary. In the future
dvbscan will be able to scan through a number of frequencies, and output
the channel list in various formats.

You will have to specify your DVB driver include directory in Makefile
for the package to compile correctly. A recent CVS version of the driver
is required.

Cheers,
Juha




-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] Patch for cards with the Philips CD1516 tuner box (spXXXX?)

2002-10-12 Thread Juha Yrjölä
I managed to get my Fujitsu-Siemens PCI-DVB Cable card to tune to the
whole frequency range (130..460 MHz) by patching the driver. The diff
against the latest CVS HEAD is attached.

I also cleaned up the tuner_set_tv_freq() function a bit.

Cheers,
Juha


Index: driver/frontends/ves1820.c
===
RCS file: /cvs/linuxtv/DVB/driver/frontends/ves1820.c,v
retrieving revision 1.2
diff -u -b -r1.2 ves1820.c
--- driver/frontends/ves1820.c	10 Oct 2002 19:22:30 -	1.2
+++ driver/frontends/ves1820.c	12 Oct 2002 23:44:35 -
@@ -150,18 +150,29 @@
 static
 int tuner_set_tv_freq (struct dvb_frontend *frontend, u32 freq, u8 pwr)
 {
-u32 div = (freq + 36125000) / 62500;
-	static u8 byte3 [] = { 0x8e, 0x85 };
+u32 div;
+	static int freq_mod [] = { 3675, 36125000 };
+	static u8 byte3 [] = { 0x8e, 0x8e };
 	static u8 byte4 [] = { 0x92, 0x84 };
 	static u8 addr [] = { 0x61, 0x62 };
 	int tuner_type = GET_TUNER(frontend);
-u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff,
-			byte3[tuner_type] | ((div >> 10) & 0x60),
-			byte4[tuner_type] | (pwr << 6) };
+u8 buf [4];
 
-	if (tuner_type == 1)
+	div = (freq + freq_mod[tuner_type]) / 62500;
+	buf[0] = (div >> 8) & 0x7f;
+	buf[1] = div & 0xff;
+	buf[2] = byte3[tuner_type];
+	buf[3] = byte4[tuner_type] | (pwr << 6);
+	if (tuner_type == 1) {
+		buf[2] |= (div >> 10) & 0x60;
 		buf[3] = (freq < 17400 ? 0x88 :
 			  freq < 47000 ? 0x84 : 0x81) | (pwr << 6);
+	} else {
+		freq += freq_mod[tuner_type];
+		buf[2] |= pwr << 7;
+		buf[3] = (freq < 17400 ? 0xa1 :
+			  freq < 45400 ? 0x92 : 0x34);
+	}
 
 return tuner_write (frontend->i2c, addr[tuner_type], buf);
 }



[linux-dvb] Re: ts bandwidth

2002-10-12 Thread Gavin Hamill
On Sat, Oct 12, 2002 at 09:14:16PM +, Justin Cormack wrote:
> Can anyone tell me what is the maximum full TS size for typical (er, UK and
> Germany would be good) broadcasts on cable, terrestrial and sattelite?
> 
> I get the impression that for UK terrestrial it must be about 50Mbit - is
> this right?

To the best of my knowledge it's 38Mbit of actual raw MPEG data.. it'll 
be 50Mbit when you include the 2/3 FEC 

Cheers, :)

gdh


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] ts bandwidth

2002-10-12 Thread Justin Cormack
Can anyone tell me what is the maximum full TS size for typical (er, UK and
Germany would be good) broadcasts on cable, terrestrial and sattelite?

I get the impression that for UK terrestrial it must be about 50Mbit - is
this right?

Justin


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] Re: DVB-T and RedHat 8.0

2002-10-12 Thread Gavin Hamill
On Sat, Oct 12, 2002 at 10:00:03PM +0100, Simon Crook wrote:
> Hi,
> 
> I am having problems getting the dvb driver working on RedHat 8.0. I am

Frightening! :) I was just about to write the list about the same 
problem.. I'm using Debian 3.0 with a Nova-t in the UK.. and I had 
everything working wonderfully a few days ago...

I was installing some kernel header packages earlier today to try and
get a Quicknet PhoneJACK working.. and once I was finished playing, to
the best of my knowledge I undid all the installs / changes...

Obviously something's still amiss because I'm getting these hundreds of 
unresolved symbols :(

Any ideas as to where to look would be very helpful =)

gdh



-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] drivers for the B2C2 (eg. Technisat SkyStar2) card ready!

2002-10-12 Thread Miernik
I don't know if you all know, that on 2002 March 22, B2C2 has released
Linux drivers for their DVB cards. You can grab them in one of these
places:

http://www.oskom.ru/drivers/b2c2_install_base.tgz
http://www.yansat.page.pl/programy/skystar2/b2c2_install_base.tgz
http://www.esat.pl/files/dvb/technisat/b2c2_install_base.tgz

They are precompiled modules for kernels:

2.4.2
2.4.2-2
2.4.3
2.4.7-10
2.4.8
2.4.9-13
2.4.10
2.4.17

I do not know what the -2  -10  -13 numbers mean.
Does somebody know?

Unfortunately there is no source code. 

Specifications of the card is avialable on:

http://www.b2c2.com/products/pc-specs.html

-- 
Miernik  _
/   /
tel.: +48608233394 /   /  mailto:miernik@;ctnet.pl
__/___/  ICQ UIN: 4004001



msg06581/pgp0.pgp
Description: PGP signature


[linux-dvb] DVB-T and RedHat 8.0

2002-10-12 Thread Simon Crook
Hi,

I am having problems getting the dvb driver working on RedHat 8.0. I am
using the Hauppauge NOVA-t and previously had it working fine on RedHat 
7.3 (using files obtained via the LinuxTV public CVS repository in early
September). When I installed the driver under 7.3, I followed the steps
outlined in this How-To posting - 
www.linuxtv.org/mailinglists/linux-dvb/2002/01-2002/msg00246.html, 
excluding the line 'make dep && make && make modules' in step 1.

The kernel I am using in RedHat 8.0 is 2.4.18-14 and I have the kernel
sources in /usr/src for that version also. The DVB driver I have was
obtained from the CVS today (13th Oct). The first problem I had was that
when I typed 'make' in the DVB/driver directory, an error appeared saying
that tmp_include_depends could not be found. I managed to fix this by
running the 'make dep...' line, mentioned above, in the linux kernel
source directory. 'make dep' seemed to work correctly but 'make' and 'make
modules' seemed to results in errors. Running 'make' in DVB/driver now
resulted in the driver compiling successfully. The problem I have now is
that 'make install' results in the following:

/usr/src/linux/scripts/pathdown.sh: line 4: TOPDIR: parameter null or not
set
install -v -m 0755 -d /lib/modules//misc
find . -name "*.o" -a ! -name "*ksyms*" -exec install -v -m 0644 {}
/lib/modules//misc/ \;
`./av7110/saa7146_core.o' -> `/lib/modules//misc/saa7146_core.o'
`./av7110/saa7146_v4l.o' -> `/lib/modules//misc/saa7146_v4l.o'
`./av7110/av7110.o' -> `/lib/modules//misc/av7110.o'
`./av7110/av7110_ir.o' -> `/lib/modules//misc/av7110_ir.o'
`./av7110/dvb-ttpci.o' -> `/lib/modules//misc/dvb-ttpci.o'
`./frontends/alps_bsru6.o' -> `/lib/modules//misc/alps_bsru6.o'
`./frontends/alps_bsrv2.o' -> `/lib/modules//misc/alps_bsrv2.o'
`./frontends/grundig_29504-401.o' ->
`/lib/modules//misc/grundig_29504-401.o'
`./frontends/grundig_29504-491.o' ->
`/lib/modules//misc/grundig_29504-491.o'
`./frontends/ves1820.o' -> `/lib/modules//misc/ves1820.o'
`./dmxdev.o' -> `/lib/modules//misc/dmxdev.o'
`./dvb_demux.o' -> `/lib/modules//misc/dvb_demux.o'
`./dvb_net.o' -> `/lib/modules//misc/dvb_net.o'
`./dvb_i2c.o' -> `/lib/modules//misc/dvb_i2c.o'
`./dvb_filter.o' -> `/lib/modules//misc/dvb_filter.o'
`./dvb_frontend.o' -> `/lib/modules//misc/dvb_frontend.o'
`./dvbdev.o' -> `/lib/modules//misc/dvbdev.o'
`./dvb-core.o' -> `/lib/modules//misc/dvb-core.o'
depmod -a
depmod: *** Unresolved symbols in /lib/modules/misc/av7110.o
depmod: *** Unresolved symbols in /lib/modules/misc/av7110_ir.o
depmod: *** Unresolved symbols in /lib/modules/misc/dmxdev.o
depmod: *** Unresolved symbols in /lib/modules/misc/dvb-core.o
depmod: *** Unresolved symbols in /lib/modules/misc/dvb-ttpci.o
depmod: *** Unresolved symbols in /lib/modules/misc/dvb_frontend.o
depmod: *** Unresolved symbols in /lib/modules/misc/dvb_net.o
depmod: *** Unresolved symbols in /lib/modules/misc/dvbdev.o
depmod: *** Unresolved symbols in /lib/modules/misc/saa7146_core.o
depmod: *** Unresolved symbols in /lib/modules/misc/saa7146_v4l.o


And running 'make insmod' after that results in:

/usr/src/linux/scripts/pathdown.sh: line 4: TOPDIR: parameter null or not
set
DIR=`pwd`; (cd /usr/src/linux; make SUBDIRS=$DIR modules)
make[1]: Entering directory `/usr/src/linux-2.4.18-14'
make -r -f tmp_include_depends all
make[2]: Entering directory `/usr/src/linux-2.4.18-14'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/linux-2.4.18-14'
make -C  /usr/local/src/DVB/driver CFLAGS="-D__KERNEL__
-I/usr/src/linux-2.4.18-14/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS
-include
/usr/src/linux-2.4.18-14/include/linux/modversions.h" MAKING_MODULES=1
modules
make[2]: Entering directory `/usr/local/src/DVB/driver'
ld -m elf_i386 -r -o dvb-core.o dmxdev.o dvb_demux.o dvb_net.o dvb_i2c.o
dvb_filter.o dvb_frontend.o dvbdev.o
make -C av7110 modules
make[3]: Entering directory `/usr/local/src/DVB/driver/av7110'
ld -m elf_i386 -r -o dvb-ttpci.o saa7146_core.o saa7146_v4l.o av7110.o
av7110_ir.o
make[3]: Leaving directory `/usr/local/src/DVB/driver/av7110'
make -C frontends modules
make[3]: Entering directory `/usr/local/src/DVB/driver/frontends'
make[3]: Nothing to be done for `modules'.
make[3]: Leaving directory `/usr/local/src/DVB/driver/frontends'
make[2]: Leaving directory `/usr/local/src/DVB/driver'
make[1]: Leaving directory `/usr/src/linux-2.4.18-14'

(   \
insmod videodev;\
  \
insmod dvb-core.o;  \
make -C frontends insmod; \
 make -C av7110 insmod; \
)
Using /lib/modules/2.4.18-14/kernel/drivers/media/video/videodev.o
dvb-core.o: unresolved symbol __wake_up
dvb-core.o: unresolved symbol alloc_skb
dvb-core.o: unresolved symbol ether_setup
dvb-core.o: unresolved symbol register_chrdev
dvb-core.o: unresolved symbol remove_wait_queue
dvb-core.o: unresolved symbol unre

[linux-dvb] make insmod Error 139

2002-10-12 Thread Andrea
Hello,
i'm italian student, sorry for my bad english ;)
Before to write this mail i've checked all message into mainglist, but i couldn't 
resolve my problems.
My distribution is Slackware 8.1 with 2.4.19 kernel, it's not original kernel but same 
problem i've found with original 2.4.18.
I resolved some problems like "//busy" in dvb.c and "tv.tv_sec=1" in dvb_frontend.c, 
but when i try "make insmod" I receive this output:

./makedev.napi
make
make[1]: Entering directory `/root/DVB/driver'
DIR=`pwd`; (cd /usr/src/linux; make SUBDIRS=$DIR modules)
make[2]: Entering directory `/usr/local/src/linux-2.4.19'
make -C  /root/DVB/driver CFLAGS="-D__KERNEL__ -I/usr/local/src/linux-2.4.19/include 
-Wall -Wstrict-prototypes
 -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe 
-mpreferred-stack-boundary=2 -
march=i686 -DMODULE -DMODVERSIONS -include 
/usr/local/src/linux-2.4.19/include/linux/modversions.h" MAKING_MOD
ULES=1 modules
make[3]: Entering directory `/root/DVB/driver'
make[3]: Nothing to be done for `modules'.
make[3]: Leaving directory `/root/DVB/driver'
make[2]: Leaving directory `/usr/local/src/linux-2.4.19'

make[1]: Leaving directory `/root/DVB/driver'
(   \
insmod dvbdev.o; \
insmod dvb_net.o;\
insmod i2c-core; \
insmod videodev;\
insmod dvb_filter.o;\
insmod dmxdev.o;\
insmod VES1893.o;   \
insmod VES1820.o;   \
insmod L64781.o;\
insmod SP8870.o debug=1;\
insmod tda8083.o;   \
insmod stv0299.o;   \
insmod tuner.o; \
insmod saa7146_core.o mode=0;   \
insmod saa7146_v4l.o;   \
insmod dvb_demux.o; \
insmod dvb_frontend.o;   \
insmod dvb.o init_chan=2 pids_off=0;\
)
Warning: loading dvbdev.o will taint the kernel: non-GPL license - LGPL
  See http://www.tux.org/lkml/#s1-18 for information about tainted modules
Module dvbdev loaded, with warnings
Using /lib/modules/2.4.19/kernel/drivers/i2c/i2c-core.o
Using /lib/modules/2.4.19/kernel/drivers/media/video/videodev.o
Warning: loading tuner.o will taint the kernel: no license
  See http://www.tux.org/lkml/#s1-18 for information about tainted modules
Module tuner loaded, with warnings
Warning: loading saa7146_core.o will taint the kernel: no license
  See http://www.tux.org/lkml/#s1-18 for information about tainted modules
Module saa7146_core loaded, with warnings
Warning: loading saa7146_v4l.o will taint the kernel: no license
  See http://www.tux.org/lkml/#s1-18 for information about tainted modules
Module saa7146_v4l loaded, with warnings
/usr/src/linux/scripts/pathdown.sh: TOPDIR: parameter null or not set
insmod: a module named videodev already exists
Unable to handle kernel NULL pointer dereference at virtual address 003c
*pde = 
Oops: 
CPU:0
EIP:0010:[]Tainted: P
EFLAGS: 00010282
eax: d4e0c2c8   ebx:    ecx:    edx: d4e0c180
esi:    edi: d4e0c2b8   ebp:    esp: cce87e9c
ds: 0018   es: 0018   ss: 0018
Process insmod (pid: 540, stackpage=cce87000)
Stack: d496df20   d4e0c180 cd4d21e0 0001 ccfb2300 c0122b93
   cd4d21e0 ccfb2300 cd1ed850 0001 40214000 40214000 0296 c024a420
   01ff 0060  1000 b30c 0203 d4dff000 0009
Call Trace:[] [] [] [] []
  [] [] [] []

Code: 8b 45 3c 89 42 7c 8b 40 3c 89 82 74 ae 00 00 a1 3c bb e0 d4
 make: *** [insmod] Error 139

N.B: I could seen strings about cpu only if i do "make insmod" from shell, these
 strings disappears if i do "make insmod" from xterm on X. 

I couldn't understood where is the problem...

Thanks, for your support,
Andrea

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] Re: ts problem

2002-10-12 Thread Justin Cormack
> 
> ok, so I have managed to tune properly, and have a ts coming out of
> /dev/dvb/adapter0/dvr0, but there is something odd about it.
> 
> ./streamtype /tmp/stream.ts
> streamtype
> TS_STREAM
> SIZE: 279x4081
> FRAMERATE: 23.976
> DUNNO
> MPEG0
> 
> or other random values...
> streamtype
> TS_STREAM
> SIZE: 4095x4095
> DUNNO
> MPEG0
> 
> It doesnt seem to have any video data...
> 
> Am I configuring the mux incorrectly?

Reply to my own mail - wasnt setting the pid!

Seems better now...


Justin


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] ts problem

2002-10-12 Thread Justin Cormack
ok, so I have managed to tune properly, and have a ts coming out of
/dev/dvb/adapter0/dvr0, but there is something odd about it.

./streamtype /tmp/stream.ts
streamtype
TS_STREAM
SIZE: 279x4081
FRAMERATE: 23.976
DUNNO
MPEG0

or other random values...
streamtype
TS_STREAM
SIZE: 4095x4095
DUNNO
MPEG0

It doesnt seem to have any video data...

Am I configuring the mux incorrectly?

I cant build the docs from cvs - has anyone got a copy of the pdf from
the NEWSTRUCT api (I get a ghostscript error).

Program as below:

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#define FRONTEND "/dev/dvb/adapter0/frontend0"
#define DEMUX "/dev/dvb/adapter0/demux0"
#define DVR "/dev/dvb/adapter0/dvr0"

#define READSIZE (188 * 10)

static int freqs[] = {
  50583, /* MUX 1 */
  48183, /* MUX 2 */
  56183, /* MUX A */
  52983, /* MUX B */
  57817, /* MUX C */
  53783, /* MUX D */
};

int main(int argc, char ** argv) {
  struct dvb_frontend_info info;
  struct dvb_frontend_parameters frontend;
  struct dmx_pes_filter_params pesfilter;
  int fd, fdd, fdts;
  uint16_t strength, snr;
  uint32_t ber;
  fe_status_t status;
  int buffersize = 64 * 1024;
  char buffer[READSIZE];
  int pid = 0;
  int ret;

  int mux = 1;
  uint32_t frequency = freqs[mux];
  fe_spectral_inversion_t inversion = INVERSION_OFF;
  fe_bandwidth_t bandwidth = BANDWIDTH_8_MHZ;
  fe_code_rate_t coderateHP = (mux >= 3) ? FEC_3_4 : FEC_2_3;
  fe_code_rate_t coderateLP = FEC_NONE;
  fe_modulation_t modulation = (mux >= 3) ? QAM_16 : QAM_64;
  fe_transmit_mode_t transmission = TRANSMISSION_MODE_2K;
  fe_guard_interval_t guard = GUARD_INTERVAL_1_32;
  fe_hierarchy_t hierarchy = HIERARCHY_NONE;


  if ((fd = open (FRONTEND, O_RDWR)) < 0) {
perror ("frontend open failed");
return -1;
  }
  
  ioctl (fd, FE_GET_INFO, &info);

  fprintf(stderr, "card found: %s\n", info.name);

  if (info.type != FE_OFDM)
fprintf(stderr, "warning: this program understands DVB-T best\n");

  frontend.frequency = frequency;
  frontend.inversion = inversion;
  frontend.u.ofdm.bandwidth = bandwidth;
  frontend.u.ofdm.code_rate_HP = coderateHP;
  frontend.u.ofdm.code_rate_LP = coderateLP;
  frontend.u.ofdm.constellation = modulation;
  frontend.u.ofdm.transmission_mode = transmission;
  frontend.u.ofdm.guard_interval = guard;
  frontend.u.ofdm.hierarchy_information = hierarchy;

  fprintf (stderr, "tuning to %i Hz\n", frontend.frequency);
  
  if (ioctl(fd, FE_SET_FRONTEND, &frontend) < 0) {
perror("ioctl FE_SET_FRONTEND failed");
close(fd);
return -1;
  }

  usleep(100);

  ioctl(fd, FE_READ_SIGNAL_STRENGTH, &strength);
  ioctl(fd, FE_READ_SNR, &snr);
  ioctl(fd, FE_READ_BER, &ber);

  fprintf(stderr, "signal strength %d SNR %d error %d\n", strength, snr, ber);

  ioctl(fd, FE_READ_STATUS, &status);
  if (status & FE_HAS_LOCK)
fprintf(stderr, "FE_HAS_LOCK\n");
  else
fprintf(stderr, "no lock...\n");

  if ((fdd = open(DEMUX, O_RDWR)) < 0) {
   perror ("demux open failed");
   return -1;
  }

  if (ioctl(fdd, DMX_SET_BUFFER_SIZE, buffersize) == -1)
perror("DMX_SET_BUFFER_SIZE failed");

  pesfilter.pid = pid; // ?
  pesfilter.input = DMX_IN_FRONTEND;
  pesfilter.output = DMX_OUT_TS_TAP;
  pesfilter.pes_type = DMX_PES_VIDEO;
  pesfilter.flags = DMX_IMMEDIATE_START;

  if (ioctl(fdd, DMX_SET_PES_FILTER, &pesfilter) == -1) {
fprintf(stderr, "DMX_SET_PES_FILTER failed "
"(PID = 0x%04x): %d %m\n", pid, errno);
return -1;
  }

  if ((fdts = open(DVR, O_RDONLY)) < 0) {
   perror ("dvr open failed");
   return -1;
  }

  while ((ret = read(fdts, buffer, READSIZE)) > 0) {
write(STDOUT_FILENO, buffer, ret);
if (ret != READSIZE)
  fprintf(stderr, "%d ", ret);
  }

  return 0;
}


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] Re: OT - where to buy

2002-10-12 Thread Otto J. Makela

What was the consensus on best place to buy the DVB-C card?
-- 
   /* * * Otto J. Makela <[EMAIL PROTECTED]> * * * * * * * * * * * * * * * */
  /* Phone: +358 40 765 5772, FAX: +358 40 7860457, ICBM: 60N 25E */
 /* Mail: Mechelininkatu 26 B 27,  FIN-00100  Helsinki,  FINLAND */
/* * * Computers Rule 0100 01001011 * * * * * * * * * * * * */


-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.




[linux-dvb] Re: DVB-s Satellite Internet help needed.

2002-10-12 Thread Miernik
On Sat, Oct 12, 2002 at 12:09:08AM +1000, amen ra wrote:
> 
> There does not seem to be any device for the DVB-s
> card like /dev/dvb0 or similar as in the HOWTO
> How do I setup the device and other software/utils and
> routing to make the Internet connection work ?

You need to use the dvbtune program from
http://www.linuxstb.org/dvbtune/dvbtune-0.3.tar.gz
You will get an interface like dvb0_0, you will be able to see it in
ifconfig. 

-- 
Miernik  _
/   /
tel.: +48608233394 /   /  mailto:miernik@;ctnet.pl
__/___/  ICQ UIN: 4004001



msg06576/pgp0.pgp
Description: PGP signature