DVB ASI
DVB-ASI Driver for FreeBSD 4
This driver uses the Newbus and the bus_dma API. It means that it could be
easily ported to FreeBSD5, NetBSD and OpenBSD.
- dvbasi_freebsd-1.01.tgz
New sysctls:
- hw.asi.txN.ring_cnt_ratio (default = 50%): min buffer number that should be
filled before starting TX.
- hw.asi.[t|r]xN.cpu_buffer (Read Only): current processed buffer
- hw.asi.[t|r]xN.cpu_offset (Read Only): current offset into the processed buffer
- hw.asi.[t|r]xN.dev_buffer (Read Only): current processed buffer by the HW.
Support of VBR with txtest that adds some null cells when the traffic is under a lower
limit.
Fix CPU load with txtest due to bad support of POLLPRI by asi_polltx() and asi_pollrx().
- dvbasi_freebsd-1.00.tgz
First release
Installation
sh$ tar xvzf dvbasi_freebsd-1.xy.tgz
sh$ cd dvbasi_freebsd-1.xy
sh$ make
sh$ su
sh$ make install
Porting guide from Linux to FreeBSD
The DVB ASI Driver of FreeBSD is using the same IOCTLs and quite the same
sysctls than the Linux ones. The main differences are:
- sysctls:
- dev.asi.* is replaced by hw.asi.*
- dev.asi.tx1.bufsize is replaced by hw.asi.tx1.buf_len
- dev.asi.rx0.buffers is replaced by hw.asi.rx0.ring_cnt
- headers:
The other APIs of this driver are compatible with the asi-0.7.0
from Computer Modules. If they are not, it should be a bug. Thanks
to report them to <vincent.jardin@6wind.com>
For example rxcfg.c becomes
[...unchanged...]
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#if defined(__FreeBSD__)
#include <dev/asi/asivar.h>
#include <dev/asi/asi_dvbm_fdureg.h>
#include <sys/sysctl.h>
#define CTL_DEV CTL_HW
#elif defined(linux)
#include "../asi.h"
#endif
#define TMP_BUFLEN 80
const char progname[] = "rxcfg";
void show_cap (unsigned int cap)
{
char str[TMP_BUFLEN] = "[ ] ";
[...unchanged...]
Tools ported to FreeBSD
- asicfg.c
- mknull.c
- rxtest.c
- txtest.c
- calcstuff.c
- rxcfg.c
- txcfg.c
- cknull.c
- rxmon.c
- txmon.c
Thanks
Special thanks to Tom Thorsteinson and Les Zoltan from Computer Modules who
helped us to port this driver.
Copyright 2003 © Vincent Jardin <jardin@6WIND.com> , 6WIND