Commit dcd9a626 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://gkernel.bkbits.net/libata-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 21d3de02 5c6b5243
Documentation for dib3000mb frontend driver and dibusb device driver
====================================================================
Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de),
Documentation for dib3000mb frontend driver and dibusb device driver
dibusb and dib3000mb/mc drivers based on GPL code, which has
The drivers should work with
Copyright (C) 2004 Amaury Demol for DiBcom (ademol@dibcom.fr)
- Twinhan VisionPlus VisionDTV USB-Ter DVB-T Device (VP7041)
http://www.twinhan.com/
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, version 2.
- CTS Portable (Chinese Television System)
http://www.2cts.tv/ctsportable/
- KWorld V-Stream XPERT DTV - DVB-T USB
http://www.kworld.com.tw/asp/pindex.asp?id=4&pid=13
Supported devices USB1.1
========================
Produced and reselled by Twinhan:
---------------------------------
- TwinhanDTV USB-Ter DVB-T Device (VP7041)
http://www.twinhan.com/product_terrestrial_3.asp
- TwinhanDTV Magic Box (VP7041e)
http://www.twinhan.com/product_terrestrial_4.asp
- HAMA DVB-T USB device
http://www.hama.de/portal/articleId*110620/action*2598
- DiBcom USB DVB-T reference device
- CTS Portable (Chinese Television System)
http://www.2cts.tv/ctsportable/
- Unknown USB DVB-T device with vendor ID Hyper-Paltek
Produced and reselled by KWorld:
--------------------------------
- KWorld V-Stream XPERT DTV DVB-T USB
http://www.kworld.com.tw/en/product/DVBT-USB/DVBT-USB.html
- Ultima Electronic/Artec T1 USB TVBOX
- JetWay DTV DVB-T USB
http://www.jetway.com.tw/evisn/product/lcd-tv/DVT-USB/dtv-usb.htm
- ADSTech Instant TV DVB-T USB
http://www.adstech.com/products/PTV-333/intro/PTV-333_intro.asp?pid=PTV-333
Others:
-------
- Ultima Electronic/Artec T1 USB TVBOX (AN2135 and AN2235)
http://www.arteceuro.com/products-tvbox.html
- Compro Videomate DVB-U2000 - DVB-T USB
http://www.comprousa.com/products/vmu2000.htm
- Unknown USB DVB-T device with vendor ID Hyper-Paltek
- Grandtec USB DVB-T
http://www.grand.com.tw/
Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de),
- Avermedia AverTV DVBT USB
http://www.avermedia.com/
both drivers based on GPL code, which has
- DiBcom USB DVB-T reference device (non-public)
Copyright (C) 2004 Amaury Demol for DiBcom (ademol@dibcom.fr)
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, version 2.
Supported devices USB2.0
========================
- Yakumo DVB-T mobile
http://www.yakumo.de/produkte/index.php?pid=1&ag=DVB-T
- DiBcom USB2.0 DVB-T reference device (non-public)
NEWS:
0. NEWS:
2004-11-07 - added remote control support. Thanks to David Matthews.
2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
- merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
- moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
better settled there (added xfer_ops-struct)
- created a common files for frontends (mc/p/mb)
2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
to Amaury Demol for reporting
......@@ -49,7 +88,7 @@ NEWS:
(old news for vp7041.c)
2004-07-15 - found out, by accident, that the device has a TUA6010XS for
frequency generator
PLL
2004-07-12 - figured out, that the driver should also work with the
CTS Portable (Chinese Television System)
2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
......@@ -67,7 +106,7 @@ NEWS:
1. How to use?
NOTE: This driver was developed using Linux 2.6.6.,
it is working with 2.6.7, 2.6.8.1.
it is working with 2.6.7, 2.6.8.1, 2.6.9 .
Linux 2.4.x support is not planned, but patches are very welcome.
......@@ -81,8 +120,15 @@ The USB driver needs to download a firmware to start working.
You can either use "get_dvb_firmware dibusb" to download the firmware or you
can get it directly via
for USB1.1 (AN2135)
http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-5.0.0.11.fw?rev=1.1&content-type=text/plain
for USB1.1 (AN2235) (a few Artec T1 devices)
http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-an2235-1.fw?rev=1.1&content-type=text/plain
for USB2.0 (FX2)
http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-6.0.0.5.fw?rev=1.1&content-type=text/plain
1.2. Compiling
Since the driver is in the linux kernel, activating the driver in
......@@ -94,15 +140,16 @@ to compile the driver as module. Hotplug does the rest.
Hotplug is able to load the driver, when it is needed (because you plugged
in the device).
If you want to enable debug output, you have to load the driver manually.
If you want to enable debug output, you have to load the driver manually and
from withing the dvb-kernel cvs repository.
first have a look, which debug level are available:
modinfo dvb-dibusb
modinfo dib3000mb
modinfo dvb-dibusb
modprobe dvb-dibusb debug=<level>
modprobe dib3000mb debug=<level>
modprobe dvb-dibusb debug=<level>
should do the trick.
......@@ -118,21 +165,19 @@ as a slave device in vdr, was not working for me. Some work has to be done
2. Known problems and bugs
TODO:
- remote control tasklet
- remote control
- signal-quality and strength calculations
- debug messages restructure
- i2c address probing
-
2.1. Adding support for devices
It is not possible to determine the range of devices based on the DiBcom
reference design. This is because the reference design of DiBcom can be sold
to third persons, without telling DiBcom (so done with the Twinhan VP7041 and
reference designs. This is because the reference design of DiBcom can be sold
to thirds, without telling DiBcom (so done with the Twinhan VP7041 and
the HAMA device).
When you think you have a device like this and the driver does not recognizes it,
please send the ****load.inf and the ****cap.inf of the Windows driver to me.
please send the ****load*.inf and the ****cap*.inf of the Windows driver to me.
Sometimes the Vendor or Product ID is identical to the ones of Twinhan, even
though it is not a Twinhan device (e.g. HAMA), then please send me the name
......@@ -153,6 +198,9 @@ Patches, comments and suggestions are very very welcome
providing specs, code and help, on which the dvb-dibusb and dib3000mb are
based.
David Matthews for identifying a new device type (Artec T1 with AN2235)
and for extending dibusb with remote control event handling. Thank you.
Alex Woods for frequently answering question about usb and dvb
stuff, a big thank you
......
......@@ -38,7 +38,7 @@ o Frontends drivers:
Comtech DVBT-6k07 (SP5730 PLL)
(NxtWave Communications NXT6000 demodulator)
- sp887x : Microtune 7202D
- dib3000mb : DiBcom 3000-MB Frontend
- dib3000mb : DiBcom 3000-MB demodulator
DVB-S/C/T:
- dst : TwinHan DST Frontend
......@@ -69,7 +69,17 @@ o Technotrend / Hauppauge DVB USB devices:
o DiBcom DVB-T USB based devices:
- Twinhan VisionPlus VisionDTV USB-Ter DVB-T Device
- KWorld V-Stream XPERT DTV - DVB-T USB
- HAMA DVB-T USB device
- CTS Portable (Chinese Television System)
- KWorld V-Stream XPERT DTV DVB-T USB
- JetWay DTV DVB-T USB
- ADSTech Instant TV DVB-T USB
- Ultima Electronic/Artec T1 USB TVBOX (AN2135 and AN2235)
- Compro Videomate DVB-U2000 - DVB-T USB
- Grandtec USB DVB-T
- Avermedia AverTV DVBT USB
- DiBcom USB DVB-T reference device (non-public)
- Yakumo DVB-T mobile USB2.0
- DiBcom USB2.0 DVB-T reference device (non-public)
o Experimental support for the analog module of the Siemens DVB-C PCI card
......@@ -21,7 +21,7 @@
use File::Temp qw/ tempdir /;
use IO::Handle;
@components = ( "alps_tdlb7", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t", "dec2540t", "dec3000s", "vp7041", "dibusb" );
@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t", "dec2540t", "dec3000s", "vp7041", "dibusb" );
# Check args
syntax() if (scalar(@ARGV) != 1);
......@@ -32,7 +32,7 @@ for($i=0; $i < scalar(@components); $i++) {
if ($cid eq $components[$i]) {
$outfile = eval($cid);
die $@ if $@;
print STDERR "Firmware $outfile extracted successfully. Now copy it to /usr/lib/hotplug/firmware/.\n";
print STDERR "Firmware $outfile extracted successfully. Now copy it to either /lib/firmware or /usr/lib/hotplug/firmware/ (depending on your hotplug version).\n";
exit(0);
}
}
......@@ -47,11 +47,11 @@ syntax();
# ---------------------------------------------------------------
# Firmware-specific extraction subroutines
sub alps_tdlb7 {
sub sp8870 {
my $sourcefile = "tt_Premium_217g.zip";
my $url = "http://www.technotrend.de/new/217g/$sourcefile";
my $hash = "53970ec17a538945a6d8cb608a7b3899";
my $outfile = "dvb-fe-tdlb7.fw";
my $outfile = "dvb-fe-sp8870.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
checkstandard();
......
......@@ -1118,16 +1118,6 @@ static void __init prom_close_stdin(void)
call_prom("close", 1, 0, val);
}
static void __init prom_close_stdin(void)
{
unsigned long offset = reloc_offset();
struct prom_t *_prom = PTRRELOC(&prom);
ihandle val;
if (prom_getprop(_prom->chosen, "stdin", &val, sizeof(val)) > 0)
call_prom("close", 1, 0, val);
}
static int __init prom_find_machine_type(void)
{
unsigned long offset = reloc_offset();
......@@ -1709,9 +1699,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, unsigned long
/* in case stdin is USB and still active on IBM machines... */
prom_close_stdin();
/* in case stdin is USB and still active on IBM machines... */
prom_close_stdin();
/*
* Call OF "quiesce" method to shut down pending DMA's from
* devices etc...
......
......@@ -25,11 +25,11 @@ struct list_head saa7146_devices;
struct semaphore saa7146_devices_lock;
static int initialized = 0;
int saa7146_num = 0;
static int saa7146_num = 0;
unsigned int saa7146_debug = 0;
MODULE_PARM(saa7146_debug,"i");
module_param(saa7146_debug, int, 0644);
MODULE_PARM_DESC(saa7146_debug, "debug level (default: 0)");
#if 0
......@@ -48,7 +48,7 @@ static void dump_registers(struct saa7146_dev* dev)
* gpio and debi helper functions
****************************************************************************/
/* write "data" to the gpio-pin "pin" */
/* write "data" to the gpio-pin "pin" -- unused */
void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
{
u32 value = 0;
......@@ -67,7 +67,7 @@ void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
}
/* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop)
{
unsigned long start;
......@@ -80,6 +80,8 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
DEB_S(("timed out while waiting for registers getting programmed\n"));
return -ETIMEDOUT;
}
if (nobusyloop)
msleep(1);
}
/* wait for transfer to complete */
......@@ -92,6 +94,8 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
DEB_S(("timed out while waiting for transfer completion\n"));
return -ETIMEDOUT;
}
if (nobusyloop)
msleep(1);
}
return 0;
......@@ -248,10 +252,9 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data)
/********************************************************************************/
/* interrupt handler */
static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs)
{
struct saa7146_dev *dev = (struct saa7146_dev*)dev_id;
struct saa7146_dev *dev = dev_id;
u32 isr = 0;
/* read out the interrupt status register */
......@@ -318,16 +321,15 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs)
static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
{
unsigned long adr = 0, len = 0;
struct saa7146_dev* dev = kmalloc (sizeof(struct saa7146_dev),GFP_KERNEL);
struct saa7146_pci_extension_data *pci_ext = (struct saa7146_pci_extension_data *)ent->driver_data;
struct saa7146_extension* ext = pci_ext->ext;
int err = 0;
struct saa7146_dev *dev;
int err = -ENOMEM;
if (!(dev = kmalloc (sizeof(struct saa7146_dev),GFP_KERNEL))) {
dev = kmalloc(sizeof(struct saa7146_dev), GFP_KERNEL);
if (!dev) {
ERR(("out of memory.\n"));
return -ENOMEM;
goto out;
}
/* clear out mem for sure */
......@@ -335,38 +337,37 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
DEB_EE(("pci:%p\n",pci));
if (pci_enable_device(pci)) {
err = pci_enable_device(pci);
if (err < 0) {
ERR(("pci_enable_device() failed.\n"));
err = -EIO;
goto pci_error;
goto err_free;
}
/* enable bus-mastering */
pci_set_master(pci);
dev->pci = pci;
/* get chip-revision; this is needed to enable bug-fixes */
if( 0 > pci_read_config_dword(dev->pci, PCI_CLASS_REVISION, &dev->revision)) {
err = pci_read_config_dword(pci, PCI_CLASS_REVISION, &dev->revision);
if (err < 0) {
ERR(("pci_read_config_dword() failed.\n"));
err = -ENODEV;
goto pci_error;
goto err_disable;
}
dev->revision &= 0xf;
/* remap the memory from virtual to physical adress */
adr = pci_resource_start(pci,0);
len = pci_resource_len(pci,0);
if (!request_mem_region(pci_resource_start(pci,0), pci_resource_len(pci,0), "saa7146")) {
ERR(("request_mem_region() failed.\n"));
err = -ENODEV;
goto pci_error;
}
err = pci_request_region(pci, 0, "saa7146");
if (err < 0)
goto err_disable;
if (!(dev->mem = ioremap(adr,len))) {
dev->mem = ioremap(pci_resource_start(pci, 0),
pci_resource_len(pci, 0));
if (!dev->mem) {
ERR(("ioremap() failed.\n"));
err = -ENODEV;
goto ioremap_error;
goto err_release;
}
/* we don't do a master reset here anymore, it screws up
......@@ -386,42 +387,40 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
saa7146_write(dev, MC2, 0xf8000000);
/* request an interrupt for the saa7146 */
if (request_irq(dev->pci->irq, interrupt_hw, SA_SHIRQ | SA_INTERRUPT,
dev->name, dev))
{
err = request_irq(pci->irq, interrupt_hw, SA_SHIRQ | SA_INTERRUPT,
dev->name, dev);
if (err < 0) {
ERR(("request_irq() failed.\n"));
err = -ENODEV;
goto irq_error;
goto err_unmap;
}
/* get memory for various stuff */
dev->d_rps0.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_RPS_MEM, &dev->d_rps0.dma_handle);
if( NULL == dev->d_rps0.cpu_addr ) {
err = -ENOMEM;
goto kmalloc_error_1;
}
/* get memory for various stuff */
dev->d_rps0.cpu_addr = pci_alloc_consistent(pci, SAA7146_RPS_MEM,
&dev->d_rps0.dma_handle);
if (!dev->d_rps0.cpu_addr)
goto err_free_irq;
memset(dev->d_rps0.cpu_addr, 0x0, SAA7146_RPS_MEM);
dev->d_rps1.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_RPS_MEM, &dev->d_rps1.dma_handle);
if( NULL == dev->d_rps1.cpu_addr ) {
err = -ENOMEM;
goto kmalloc_error_2;
}
dev->d_rps1.cpu_addr = pci_alloc_consistent(pci, SAA7146_RPS_MEM,
&dev->d_rps1.dma_handle);
if (!dev->d_rps1.cpu_addr)
goto err_free_rps0;
memset(dev->d_rps1.cpu_addr, 0x0, SAA7146_RPS_MEM);
dev->d_i2c.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_RPS_MEM, &dev->d_i2c.dma_handle);
if( NULL == dev->d_i2c.cpu_addr ) {
err = -ENOMEM;
goto kmalloc_error_3;
}
dev->d_i2c.cpu_addr = pci_alloc_consistent(pci, SAA7146_RPS_MEM,
&dev->d_i2c.dma_handle);
if (!dev->d_i2c.cpu_addr)
goto err_free_rps1;
memset(dev->d_i2c.cpu_addr, 0x0, SAA7146_RPS_MEM);
/* the rest + print status message */
/* create a nice device name */
sprintf(&dev->name[0], "saa7146 (%d)",saa7146_num);
sprintf(dev->name, "saa7146 (%d)", saa7146_num);
INFO(("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x).\n", dev->mem, dev->revision,dev->pci->irq,dev->pci->subsystem_vendor,dev->pci->subsystem_device));
INFO(("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x).\n", dev->mem, dev->revision, pci->irq, pci->subsystem_vendor, pci->subsystem_device));
dev->ext = ext;
pci_set_drvdata(pci,dev);
......@@ -438,18 +437,18 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
/* set some sane pci arbitrition values */
saa7146_write(dev, PCI_BT_V1, 0x1c00101f);
if( 0 != ext->probe) {
if( 0 != ext->probe(dev) ) {
DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
/* TODO: use the status code of the callback */
err = -ENODEV;
goto probe_error;
}
if (ext->probe && ext->probe(dev)) {
DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
goto err_free_i2c;
}
if( 0 != ext->attach(dev,pci_ext) ) {
if (ext->attach(dev, pci_ext)) {
DEB_D(("ext->attach() failed for %p. skipping device.\n",dev));
err = -ENODEV;
goto attach_error;
goto err_unprobe;
}
INIT_LIST_HEAD(&dev->item);
......@@ -457,30 +456,46 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
saa7146_num++;
err = 0;
goto out;
attach_error:
probe_error:
out:
return err;
err_unprobe:
pci_set_drvdata(pci,NULL);
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle);
kmalloc_error_3:
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_rps1.cpu_addr, dev->d_rps1.dma_handle);
kmalloc_error_2:
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_rps0.cpu_addr, dev->d_rps0.dma_handle);
kmalloc_error_1:
free_irq(dev->pci->irq, (void *)dev);
irq_error:
err_free_i2c:
pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr,
dev->d_i2c.dma_handle);
err_free_rps1:
pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps1.cpu_addr,
dev->d_rps1.dma_handle);
err_free_rps0:
pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps0.cpu_addr,
dev->d_rps0.dma_handle);
err_free_irq:
free_irq(pci->irq, (void *)dev);
err_unmap:
iounmap(dev->mem);
ioremap_error:
release_mem_region(adr,len);
pci_error:
err_release:
pci_release_region(pci, 0);
err_disable:
pci_disable_device(pci);
err_free:
kfree(dev);
out:
return err;
goto out;
}
static void saa7146_remove_one(struct pci_dev *pdev)
{
struct saa7146_dev* dev = (struct saa7146_dev*) pci_get_drvdata(pdev);
struct saa7146_dev* dev = pci_get_drvdata(pdev);
struct {
void *addr;
dma_addr_t dma;
} dev_map[] = {
{ dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle },
{ dev->d_rps1.cpu_addr, dev->d_rps1.dma_handle },
{ dev->d_rps0.cpu_addr, dev->d_rps0.dma_handle },
{ NULL, 0 }
}, *p;
DEB_EE(("dev:%p\n",dev));
dev->ext->detach(dev);
......@@ -491,17 +506,15 @@ static void saa7146_remove_one(struct pci_dev *pdev)
/* disable all irqs, release irq-routine */
saa7146_write(dev, IER, 0);
free_irq(dev->pci->irq, (void *)dev);
free_irq(pdev->irq, dev);
/* free kernel memory */
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle);
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_rps1.cpu_addr, dev->d_rps1.dma_handle);
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, dev->d_rps0.cpu_addr, dev->d_rps0.dma_handle);
for (p = dev_map; p->addr; p++)
pci_free_consistent(pdev, SAA7146_RPS_MEM, p->addr, p->dma);
iounmap(dev->mem);
release_mem_region(pci_resource_start(dev->pci,0), pci_resource_len(dev->pci,0));
pci_release_region(pdev, 0);
list_del(&dev->item);
pci_disable_device(pdev);
kfree(dev);
saa7146_num--;
......
#include <media/saa7146_vv.h>
#include <linux/version.h>
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
......@@ -32,17 +33,6 @@ int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit)
return 1;
}
int saa7146_res_check(struct saa7146_fh *fh, unsigned int bit)
{
return (fh->resources & bit);
}
int saa7146_res_locked(struct saa7146_dev *dev, unsigned int bit)
{
struct saa7146_vv *vv = dev->vv_data;
return (vv->resources & bit);
}
void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
{
struct saa7146_dev *dev = fh->dev;
......
......@@ -9,11 +9,6 @@ static void calculate_output_format_register(struct saa7146_dev* saa, u32 palett
*clip_format |= (( ((palette&0xf00)>>8) << 30) | ((palette&0x00f) << 24) | (((palette&0x0f0)>>4) << 16));
}
static void calculate_bcs_ctrl_register(struct saa7146_dev *dev, int brightness, int contrast, int colour, u32 *bcs_ctrl)
{
*bcs_ctrl = ((brightness << 24) | (contrast << 16) | (colour << 0));
}
static void calculate_hps_source_and_sync(struct saa7146_dev *dev, int source, int sync, u32* hps_ctrl)
{
*hps_ctrl &= ~(MASK_30 | MASK_31 | MASK_28);
......@@ -62,7 +57,7 @@ static struct {
};
/* table of attenuation values for horizontal scaling */
u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0};
static u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0};
/* calculate horizontal scale registers */
static int calculate_h_scale_registers(struct saa7146_dev *dev,
......@@ -208,7 +203,7 @@ static struct {
};
/* table of attenuation values for vertical scaling */
u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0};
static u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0};
/* calculate vertical scale registers */
static int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
......@@ -620,18 +615,6 @@ static void saa7146_set_output_format(struct saa7146_dev *dev, unsigned long pal
saa7146_write(dev, MC2, (MASK_05 | MASK_21));
}
void saa7146_set_picture_prop(struct saa7146_dev *dev, int brightness, int contrast, int colour)
{
u32 bcs_ctrl = 0;
calculate_bcs_ctrl_register(dev, brightness, contrast, colour, &bcs_ctrl);
saa7146_write(dev, BCS_CTRL, bcs_ctrl);
/* update the bcs register */
saa7146_write(dev, MC2, (MASK_06 | MASK_22));
}
/* select input-source */
void saa7146_set_hps_source_and_sync(struct saa7146_dev *dev, int source, int sync)
{
......
#include <linux/version.h>
#include <media/saa7146_vv.h>
u32 saa7146_i2c_func(struct i2c_adapter *adapter)
static u32 saa7146_i2c_func(struct i2c_adapter *adapter)
{
//fm DEB_I2C(("'%s'.\n", adapter->name));
......
......@@ -130,7 +130,7 @@ static int vbi_workaround(struct saa7146_dev *dev)
return 0;
}
void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next)
static void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next)
{
struct saa7146_vv *vv = dev->vv_data;
......
......@@ -2,7 +2,7 @@
static int max_memory = 32;
MODULE_PARM(max_memory,"i");
module_param(max_memory, int, 0644);
MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: 32Mb)");
#define IS_CAPTURE_ACTIVE(fh) \
......
......@@ -21,8 +21,6 @@ config DVB
source "drivers/media/dvb/dvb-core/Kconfig"
source "drivers/media/dvb/frontends/Kconfig"
comment "Supported SAA7146 based PCI Adapters"
depends on DVB_CORE && PCI
source "drivers/media/dvb/ttpci/Kconfig"
......@@ -42,5 +40,8 @@ comment "Supported BT878 Adapters"
depends on DVB_CORE && PCI
source "drivers/media/dvb/bt8xx/Kconfig"
endmenu
comment "Supported DVB Frontends"
depends on DVB_CORE
source "drivers/media/dvb/frontends/Kconfig"
endmenu
config DVB_B2C2_SKYSTAR
tristate "Technisat Skystar2 PCI"
depends on DVB_CORE && PCI
select DVB_STV0299
select DVB_MT352
help
Support for the Skystar2 PCI DVB card by Technisat, which
is equipped with the FlexCopII chipset by B2C2.
......
obj-$(CONFIG_DVB_B2C2_SKYSTAR) += skystar2.o
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
This diff is collapsed.
config DVB_BT8XX
tristate "Nebula/Pinnacle PCTV/Twinhan PCI cards"
depends on DVB_CORE && PCI && VIDEO_BT848
select DVB_MT352
select DVB_SP887X
help
Support for PCI cards based on the Bt8xx PCI bridge. Examples are
the Nebula cards, the Pinnacle PCTV cards and Twinhan DST cards.
......
obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o
obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video -Idrivers/media/dvb/frontends
......@@ -44,7 +44,7 @@
#include "dmxdev.h"
#include "dvbdev.h"
#include "bt878.h"
#include "dst-bt878.h"
#include "dst_priv.h"
/**************************************/
......@@ -559,22 +559,11 @@ static struct pci_driver bt878_pci_driver = {
static int bt878_pci_driver_registered = 0;
/* This will be used later by dvb-bt8xx to only use the audio
* dma of certain cards */
int bt878_find_audio_dma(void)
{
// pci_register_driver(&bt878_pci_driver);
bt878_pci_driver_registered = 1;
return 0;
}
EXPORT_SYMBOL(bt878_find_audio_dma);
/*******************************/
/* Module management functions */
/*******************************/
int bt878_init_module(void)
static int bt878_init_module(void)
{
bt878_num = 0;
bt878_pci_driver_registered = 0;
......@@ -586,13 +575,13 @@ int bt878_init_module(void)
/*
bt878_check_chipset();
*/
/* later we register inside of bt878_find_audio_dma
/* later we register inside of bt878_find_audio_dma()
* because we may want to ignore certain cards */
bt878_pci_driver_registered = 1;
return pci_module_init(&bt878_pci_driver);
}
void bt878_cleanup_module(void)
static void bt878_cleanup_module(void)
{
if (bt878_pci_driver_registered) {
bt878_pci_driver_registered = 0;
......@@ -601,12 +590,10 @@ void bt878_cleanup_module(void)
return;
}
EXPORT_SYMBOL(bt878_init_module);
EXPORT_SYMBOL(bt878_cleanup_module);
module_init(bt878_init_module);
module_exit(bt878_cleanup_module);
//MODULE_AUTHOR("XXX");
MODULE_LICENSE("GPL");
/*
......
/*
Frontend-driver for TwinHan DST Frontend
Copyright (C) 2003 Jamie Honan
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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef DST_H
#define DST_H
#include <linux/dvb/frontend.h>
#include <linux/device.h>
#include "bt878.h"
struct dst_config
{
/* the demodulator's i2c address */
u8 demod_address;
};
extern struct dvb_frontend* dst_attach(const struct dst_config* config,
struct i2c_adapter* i2c,
struct bt878 *bt);
#endif // DST_H
......@@ -30,7 +30,7 @@ union dst_gpio_packet {
#define DST_IG_READ 2
#define DST_IG_TS 3
struct bt878 ;
struct bt878;
int bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp);
......
This diff is collapsed.
......@@ -26,6 +26,10 @@
#include "dvbdev.h"
#include "dvb_net.h"
#include "bttv.h"
#include "mt352.h"
#include "sp887x.h"
#include "dst.h"
#include "nxt6000.h"
struct dvb_bt8xx_card {
struct semaphore lock;
......@@ -44,4 +48,5 @@ struct dvb_bt8xx_card {
struct i2c_adapter *i2c_adapter;
struct dvb_net dvbnet;
struct dvb_frontend* fe;
};
......@@ -23,8 +23,10 @@ config DVB_CINERGYT2_STREAM_URB_COUNT
depends on DVB_CINERGYT2_TUNING
default "32"
help
USB Request Blocks for Highspeed Stream transfers are queued in a
for the Host Controller. Usually the default value is a safe choice.
USB Request Blocks for Highspeed Stream transfers are scheduled in
a queue for the Host Controller.
Usually the default value is a safe choice.
You may increase this number if you are using this device in a
Server Environment with many high-traffic USB Highspeed devices
......@@ -44,6 +46,21 @@ config DVB_CINERGYT2_STREAM_BUF_SIZE
sharing the same USB bus.
config DVB_CINERGYT2_QUERY_INTERVAL
int "Status update interval [milliseconds]"
depends on DVB_CINERGYT2_TUNING
default "250"
help
This is the interval for status readouts from the demodulator.
You may try lower values if you need more responsive signal quality
measurements.
Please keep in mind that these updates cause traffic on the tuner
control bus and thus may or may not affect receiption sensitivity.
The default value should be a safe choice for common applications.
config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
bool "Register the onboard IR Remote Control Receiver as Input Device"
depends on DVB_CINERGYT2_TUNING
......@@ -57,3 +74,12 @@ config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
source code to find out how to add support for other controls.
config DVB_CINERGYT2_RC_QUERY_INTERVAL
int "Infrared Remote Controller update interval [milliseconds]"
depends on DVB_CINERGYT2_TUNING && DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
default "100"
help
If you have a very fast-repeating remote control you can try lower
values, for normal consumer receivers the default value should be
a safe choice.
This diff is collapsed.
config DVB_DIBUSB
tristate "DiBcom/Twinhan/KWorld/Hama/Artec/Compro USB DVB-T devices"
tristate "DiBcom USB DVB-T devices (see help for device list)"
depends on DVB_CORE && USB
select FW_LOADER
select DVB_DIB3000MB
help
Support for USB 1.1 DVB-T devices based on a reference design made by
Support for USB 1.1 and 2.0 DVB-T devices based on reference designs made by
DiBcom (http://www.dibcom.fr).
Devices supported by this driver:
......@@ -15,19 +16,35 @@ config DVB_DIBUSB
DiBcom reference device (non-public)
Ultima Electronic/Artec T1 USB TVBOX
Compro Videomate DVB-U2000 - DVB-T USB
Grandtec DVB-T USB
Avermedia AverTV DVBT USB
Yakumo DVB-T mobile USB2.0
The VP7041 seems to be identical to "CTS Portable" (Chinese
Television System).
These devices can be understood as budget ones, they "only" deliver
the MPEG data.
(a part of) the MPEG2 transport stream.
Currently all known copies of the DiBcom reference design have the DiBcom 3000-MB
frontend onboard. Please enable and load this one manually in order to use this
device.
A firmware is needed to use the device. See Documentation/dvb/README.dibusb
A firmware is needed to get the device working. See Documentation/dvb/README.dibusb
details.
Say Y if you own such a device and want to use it. You should build it as
a module.
config DVB_DIBUSB_MISDESIGNED_AN2235
bool "Enable support for some Artec T1 device, which identifies as AN2235"
depends on DVB_DIBUSB
help
Somehow Artec forgot to program the eeprom for some of their T1 devices. So
comes that they identify with the default Vendor and Product ID of the Cypress
CY7C64613 (AN2235).
Say Y if your Artec device has 0x0574 as Vendor ID and 0x2235 as Product ID.
config DVB_DIBCOM_DEBUG
bool "Enable extended debug support for DiBcom USB device"
depends on DVB_DIBUSB
help
Say Y if you want to enable debuging. See modinfo dvb-dibusb for
debug level.
obj-$(CONFIG_DVB_DIBUSB) += dvb-dibusb.o
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
This diff is collapsed.
This diff is collapsed.
......@@ -4,6 +4,6 @@
dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \
dvb_ca_en50221.o dvb_frontend.o \
dvb_net.o dvb_ksyms.o dvb_ringbuffer.o
dvb_net.o dvb_ringbuffer.o
obj-$(CONFIG_DVB_CORE) += dvb-core.o
obj-$(CONFIG_DVB_CORE) += crc32.o
......@@ -42,18 +42,12 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
#define dprintk if (debug) printk
inline struct dmxdev_filter *
static inline struct dmxdev_filter *
dvb_dmxdev_file_to_filter(struct file *file)
{
return (struct dmxdev_filter *) file->private_data;
}
inline struct dmxdev_dvr *
dvb_dmxdev_file_to_dvr(struct dmxdev *dmxdev, struct file *file)
{
return (struct dmxdev_dvr *) file->private_data;
}
static inline void dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer)
{
buffer->data=NULL;
......@@ -846,7 +840,7 @@ static ssize_t dvb_dmxdev_read_sec(struct dmxdev_filter *dfil,
}
ssize_t
static ssize_t
dvb_demux_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct dmxdev_filter *dmxdevfilter=dvb_dmxdev_file_to_filter(file);
......@@ -1122,6 +1116,7 @@ dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
return 0;
}
EXPORT_SYMBOL(dvb_dmxdev_init);
void
dvb_dmxdev_release(struct dmxdev *dmxdev)
......@@ -1138,5 +1133,5 @@ dvb_dmxdev_release(struct dmxdev *dmxdev)
}
dmxdev->demux->close(dmxdev->demux);
}
EXPORT_SYMBOL(dvb_dmxdev_release);
This diff is collapsed.
......@@ -42,6 +42,9 @@
/* Structure describing a CA interface */
struct dvb_ca_en50221 {
/* the module owning this structure */
struct module* owner;
/* NOTE: the read_*, write_* and poll_slot_status functions must use locks as
* they may be called from several threads at once */
......@@ -62,7 +65,7 @@ struct dvb_ca_en50221 {
* Poll slot status.
* Only necessary if DVB_CA_FLAG_EN50221_IRQ_CAMCHANGE is not set
*/
int (*poll_slot_status)(struct dvb_ca_en50221* ca, int slot);
int (*poll_slot_status)(struct dvb_ca_en50221* ca, int slot, int open);
/* private data, used by caller */
void* data;
......
......@@ -424,7 +424,7 @@ void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts, DMX_OK);
}
}
EXPORT_SYMBOL(dvb_dmx_swfilter_packet);
void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count)
{
......@@ -439,6 +439,7 @@ void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t cou
spin_unlock(&demux->lock);
}
EXPORT_SYMBOL(dvb_dmx_swfilter_packets);
void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count)
......@@ -478,6 +479,7 @@ void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count)
bailout:
spin_unlock(&demux->lock);
}
EXPORT_SYMBOL(dvb_dmx_swfilter);
void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count)
{
......@@ -522,6 +524,7 @@ void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count)
bailout:
spin_unlock(&demux->lock);
}
EXPORT_SYMBOL(dvb_dmx_swfilter_204);
static struct dvb_demux_filter * dvb_dmx_filter_alloc(struct dvb_demux *demux)
......@@ -1163,6 +1166,7 @@ int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *fronte
up(&dvbdemux->mutex);
return 0;
}
EXPORT_SYMBOL(dvbdmx_connect_frontend);
int dvbdmx_disconnect_frontend(struct dmx_demux *demux)
......@@ -1176,6 +1180,7 @@ int dvbdmx_disconnect_frontend(struct dmx_demux *demux)
up(&dvbdemux->mutex);
return 0;
}
EXPORT_SYMBOL(dvbdmx_disconnect_frontend);
static int dvbdmx_get_pes_pids(struct dmx_demux *demux, u16 *pids)
......@@ -1256,6 +1261,7 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux)
return 0;
}
EXPORT_SYMBOL(dvb_dmx_init);
int dvb_dmx_release(struct dvb_demux *dvbdemux)
......@@ -1269,3 +1275,5 @@ int dvb_dmx_release(struct dvb_demux *dvbdemux)
vfree(dvbdemux->feed);
return 0;
}
EXPORT_SYMBOL(dvb_dmx_release);
......@@ -3,19 +3,20 @@
#include <linux/string.h>
#include "dvb_filter.h"
unsigned int bitrates[3][16] =
#if 0
static unsigned int bitrates[3][16] =
{{0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0},
{0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,0},
{0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,0}};
#endif
u32 freq[4] = {441, 480, 320, 0};
static u32 freq[4] = {480, 441, 320, 0};
unsigned int ac3_bitrates[32] =
static unsigned int ac3_bitrates[32] =
{32,40,48,56,64,80,96,112,128,160,192,224,256,320,384,448,512,576,640,
0,0,0,0,0,0,0,0,0,0,0,0,0};
u32 ac3_freq[4] = {480, 441, 320, 0};
u32 ac3_frames[3][32] =
static u32 ac3_frames[3][32] =
{{64,80,96,112,128,160,192,224,256,320,384,448,512,640,768,896,1024,
1152,1280,0,0,0,0,0,0,0,0,0,0,0,0,0},
{69,87,104,121,139,174,208,243,278,348,417,487,557,696,835,975,1114,
......@@ -389,6 +390,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
return 0;
}
EXPORT_SYMBOL(dvb_filter_get_ac3info);
#if 0
......@@ -563,6 +565,7 @@ void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
p2ts->cb=cb;
p2ts->priv=priv;
}
EXPORT_SYMBOL(dvb_filter_pes2ts_init);
int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
int len, int payload_start)
......@@ -597,4 +600,5 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
memcpy(buf+5+rest, pes, len);
return p2ts->cb(p2ts->priv, buf);
}
EXPORT_SYMBOL(dvb_filter_pes2ts);
This diff is collapsed.
This diff is collapsed.
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
#include "dmxdev.h"
#include "dvb_demux.h"
#include "dvb_frontend.h"
#include "dvb_net.h"
#include "dvb_filter.h"
#include "dvb_ca_en50221.h"
EXPORT_SYMBOL(dvb_dmxdev_init);
EXPORT_SYMBOL(dvb_dmxdev_release);
EXPORT_SYMBOL(dvb_dmx_init);
EXPORT_SYMBOL(dvb_dmx_release);
EXPORT_SYMBOL(dvb_dmx_swfilter_packet);
EXPORT_SYMBOL(dvb_dmx_swfilter_packets);
EXPORT_SYMBOL(dvb_dmx_swfilter);
EXPORT_SYMBOL(dvb_dmx_swfilter_204);
EXPORT_SYMBOL(dvbdmx_connect_frontend);
EXPORT_SYMBOL(dvbdmx_disconnect_frontend);
EXPORT_SYMBOL(dvb_register_frontend);
EXPORT_SYMBOL(dvb_unregister_frontend);
EXPORT_SYMBOL(dvb_add_frontend_ioctls);
EXPORT_SYMBOL(dvb_remove_frontend_ioctls);
EXPORT_SYMBOL(dvb_add_frontend_notifier);
EXPORT_SYMBOL(dvb_remove_frontend_notifier);
EXPORT_SYMBOL(dvb_net_init);
EXPORT_SYMBOL(dvb_net_release);
EXPORT_SYMBOL(dvb_register_adapter);
EXPORT_SYMBOL(dvb_unregister_adapter);
EXPORT_SYMBOL(dvb_register_device);
EXPORT_SYMBOL(dvb_unregister_device);
EXPORT_SYMBOL(dvb_generic_ioctl);
EXPORT_SYMBOL(dvb_generic_open);
EXPORT_SYMBOL(dvb_generic_release);
EXPORT_SYMBOL(dvb_filter_pes2ts_init);
EXPORT_SYMBOL(dvb_filter_pes2ts);
EXPORT_SYMBOL(dvb_filter_get_ac3info);
EXPORT_SYMBOL(dvb_ca_en50221_init);
EXPORT_SYMBOL(dvb_ca_en50221_release);
EXPORT_SYMBOL(dvb_ca_en50221_frda_irq);
EXPORT_SYMBOL(dvb_ca_en50221_camchange_irq);
EXPORT_SYMBOL(dvb_ca_en50221_camready_irq);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment