Commit ea8924f7 authored by Johannes Stezenbach's avatar Johannes Stezenbach Committed by Linus Torvalds

[PATCH] DVB whitespace cleanup

This is the DVB whitespace cleanup patch (the big one ;-).

I checked the whitespace-onlyness:

linux-2.6.11-bk9$ find drivers/media/common drivers/media/dvb -name "*.o" | xargs size >/tmp/1
linux-2.6.11-bk9$ cd -
linux-2.6.11-bk9.patched
linux-2.6.11-bk9.patched$ find drivers/media/common drivers/media/dvb -name "*.o" | xargs size >/tmp/2
linux-2.6.11-bk9.patched$ less /tmp/1
linux-2.6.11-bk9.patched$ less /tmp/2
linux-2.6.11-bk9.patched$ diff -us /tmp/1 /tmp/2
Files /tmp/1 and /tmp/2 are identical

DVB whitespace cleanups:

 o sync kernel and linuxtv.org CVS wrt whitespace
 o repair indentation damage
 o remove whitespace at eol
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 83c6737c
......@@ -35,7 +35,7 @@ Some very frequently asked questions about linuxtv-dvb
Note: Only very recent versions of Mplayer and xine can decode.
MPEG2 transport streams (TS) directly. Then, run
'[sct]zap channelname -r' in one xterm, and keep it running,
and start 'mplayer - < /dev/dvb/adapter0/dvr0' or
and start 'mplayer - < /dev/dvb/adapter0/dvr0' or
'xine stdin://mpeg2 < /dev/dvb/adapter0/dvr0' in a second xterm.
That's all far from perfect, but it seems no one has written
a nice DVB application which includes a builtin software MPEG
......
......@@ -59,7 +59,7 @@ void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
/* read old register contents */
value = saa7146_read(dev, GPIO_CTRL );
value &= ~(0xff << (8*pin));
value |= (data << (8*pin));
......@@ -105,7 +105,7 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop)
* general helper functions
****************************************************************************/
/* this is videobuf_vmalloc_to_sg() from video-buf.c
/* this is videobuf_vmalloc_to_sg() from video-buf.c
make sure virt has been allocated with vmalloc_32(), otherwise the BUG()
may be triggered on highmem machines */
static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
......@@ -128,7 +128,7 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
sglist[i].length = PAGE_SIZE;
}
return sglist;
err:
kfree(sglist);
return NULL;
......@@ -158,7 +158,7 @@ char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa
vfree(mem);
return NULL;
}
slen = pci_map_sg(pci,pt->slist,pages,PCI_DMA_FROMDEVICE);
if (0 != saa7146_pgtable_build_single(pci, pt, pt->slist, slen)) {
return NULL;
......@@ -198,13 +198,13 @@ int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt,
struct scatterlist *list, int sglen )
{
u32 *ptr, fill;
u32 *ptr, fill;
int nr_pages = 0;
int i,p;
int i,p;
BUG_ON( 0 == sglen);
BUG_ON(0 == sglen);
BUG_ON(list->offset > PAGE_SIZE);
/* if we have a user buffer, the first page may not be
aligned to a page boundary. */
pt->offset = list->offset;
......@@ -322,10 +322,10 @@ 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)
{
struct saa7146_pci_extension_data *pci_ext = (struct saa7146_pci_extension_data *)ent->driver_data;
struct saa7146_extension* ext = pci_ext->ext;
struct saa7146_extension *ext = pci_ext->ext;
struct saa7146_dev *dev;
int err = -ENOMEM;
dev = kmalloc(sizeof(struct saa7146_dev), GFP_KERNEL);
if (!dev) {
ERR(("out of memory.\n"));
......@@ -394,7 +394,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
goto err_unmap;
}
err = -ENOMEM;
err = -ENOMEM;
/* get memory for various stuff */
dev->d_rps0.cpu_addr = pci_alloc_consistent(pci, SAA7146_RPS_MEM,
......@@ -423,7 +423,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
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);
pci_set_drvdata(pci, dev);
init_MUTEX(&dev->lock);
spin_lock_init(&dev->int_slock);
......@@ -435,11 +435,11 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
init_waitqueue_head(&dev->i2c_wq);
/* set some sane pci arbitrition values */
saa7146_write(dev, PCI_BT_V1, 0x1c00101f);
saa7146_write(dev, PCI_BT_V1, 0x1c00101f);
/* TODO: use the status code of the callback */
err = -ENODEV;
err = -ENODEV;
if (ext->probe && ext->probe(dev)) {
DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
......@@ -460,7 +460,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
return err;
err_unprobe:
pci_set_drvdata(pci,NULL);
pci_set_drvdata(pci, NULL);
err_free_i2c:
pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr,
dev->d_i2c.dma_handle);
......
......@@ -444,7 +444,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
memset(vv, 0x0, sizeof(*vv));
DEB_EE(("dev:%p\n",dev));
/* set default values for video parts of the saa7146 */
saa7146_write(dev, BCS_CTRL, 0x80400040);
......@@ -497,7 +497,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
struct video_device *vfd;
DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
// released by vfd->release
vfd = video_device_alloc();
if (vfd == NULL)
......
This diff is collapsed.
......@@ -12,7 +12,7 @@ static u32 saa7146_i2c_func(struct i2c_adapter *adapter)
}
/* this function returns the status-register of our i2c-device */
static inline u32 saa7146_i2c_status(struct saa7146_dev *dev)
static inline u32 saa7146_i2c_status(struct saa7146_dev *dev)
{
u32 iicsta = saa7146_read(dev, I2C_STATUS);
/*
......@@ -22,7 +22,7 @@ static inline u32 saa7146_i2c_status(struct saa7146_dev *dev)
}
/* this function runs through the i2c-messages and prepares the data to be
sent through the saa7146. have a look at the specifications p. 122 ff
sent through the saa7146. have a look at the specifications p. 122 ff
to understand this. it returns the number of u32s to send, or -1
in case of an error. */
static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op)
......@@ -56,7 +56,7 @@ static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op)
/* insert the address of the i2c-slave.
note: we get 7 bit i2c-addresses,
so we have to perform a translation */
addr = (m[i].addr*2) + ( (0 != (m[i].flags & I2C_M_RD)) ? 1 : 0);
addr = (m[i].addr*2) + ( (0 != (m[i].flags & I2C_M_RD)) ? 1 : 0);
h1 = op_count/3; h2 = op_count%3;
op[h1] |= ( (u8)addr << ((3-h2)*8));
op[h1] |= (SAA7146_I2C_START << ((3-h2)*2));
......@@ -70,8 +70,8 @@ static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op)
op[h1] |= ( SAA7146_I2C_CONT << ((3-h2)*2));
op_count++;
}
}
}
/* have a look at the last byte inserted:
if it was: ...CONT change it to ...STOP */
......@@ -81,7 +81,7 @@ static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op)
op[h1] |= (SAA7146_I2C_STOP << ((3-h2)*2));
}
/* return the number of u32s to send */
/* return the number of u32s to send */
return mem;
}
......@@ -106,16 +106,16 @@ static int saa7146_i2c_msg_cleanup(const struct i2c_msg *m, int num, u32 *op)
op_count++;
}
}
return 0;
}
/* this functions resets the i2c-device and returns 0 if everything was fine, otherwise -1 */
static int saa7146_i2c_reset(struct saa7146_dev *dev)
static int saa7146_i2c_reset(struct saa7146_dev *dev)
{
/* get current status */
u32 status = saa7146_i2c_status(dev);
/* clear registers for sure */
saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate);
saa7146_write(dev, I2C_TRANSFER, 0);
......@@ -135,7 +135,7 @@ static int saa7146_i2c_reset(struct saa7146_dev *dev)
saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate);
saa7146_write(dev, MC2, (MASK_00 | MASK_16));
msleep(SAA7146_I2C_DELAY);
}
}
/* check if any error is (still) present. (this can be necessary because p.123, note 1) */
status = saa7146_i2c_status(dev);
......@@ -160,7 +160,7 @@ static int saa7146_i2c_reset(struct saa7146_dev *dev)
saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate);
saa7146_write(dev, MC2, (MASK_00 | MASK_16));
msleep(SAA7146_I2C_DELAY);
}
}
/* if any error is still present, a fatal error has occured ... */
status = saa7146_i2c_status(dev);
......@@ -279,14 +279,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
int err = 0;
int address_err = 0;
int short_delay = 0;
if (down_interruptible (&dev->i2c_lock))
return -ERESTARTSYS;
for(i=0;i<num;i++) {
DEB_I2C(("msg:%d/%d\n",i+1,num));
}
/* prepare the message(s), get number of u32s to transfer */
count = saa7146_i2c_msg_prepare(msgs, num, buffer);
if ( 0 > count ) {
......@@ -296,14 +296,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
if ( count > 3 || 0 != (SAA7146_I2C_SHORT_DELAY & dev->ext->flags) )
short_delay = 1;
do {
/* reset the i2c-device if necessary */
err = saa7146_i2c_reset(dev);
if ( 0 > err ) {
DEB_I2C(("could not reset i2c-device.\n"));
goto out;
}
}
/* write out the u32s one after another */
for(i = 0; i < count; i++) {
......@@ -314,10 +314,10 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
thinks that an address error occured. in that case, the
transaction should be retrying, even if an address error
occured. analog saa7146 based cards extensively rely on
i2c address probing, however, and address errors indicate that a
i2c address probing, however, and address errors indicate that a
device is really *not* there. retrying in that case
increases the time the device needs to probe greatly, so
it should be avoided. because of the fact, that only
it should be avoided. because of the fact, that only
analog based cards use irq based i2c transactions (for dvb
cards, this screwes up other interrupt sources), we bail out
completely for analog cards after an address error and trust
......@@ -336,17 +336,17 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
err = num;
break;
}
/* delay a bit before retrying */
msleep(10);
} while (err != num && retries--);
/* if every retry had an address error, exit right away */
if (address_err == retries) {
goto out;
}
/* if any things had to be read, get the results */
if ( 0 != saa7146_i2c_msg_cleanup(msgs, num, buffer)) {
DEB_I2C(("could not cleanup i2c-message.\n"));
......@@ -358,7 +358,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
DEB_I2C(("transmission successful. (msg:%d).\n",err));
out:
/* another bug in revision 0: the i2c-registers get uploaded randomly by other
uploads, so we better clear them out before continueing */
uploads, so we better clear them out before continueing */
if( 0 == dev->revision ) {
u32 zero = 0;
saa7146_i2c_reset(dev);
......@@ -368,14 +368,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
}
up(&dev->i2c_lock);
return err;
return err;
}
/* utility functions */
static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num)
{
struct saa7146_dev* dev = i2c_get_adapdata(adapter);
/* use helper function to transfer data */
return saa7146_i2c_transfer(dev, msg, num, adapter->retries);
}
......@@ -396,7 +396,7 @@ static struct i2c_algorithm saa7146_algo = {
int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate)
{
DEB_EE(("bitrate: 0x%08x\n",bitrate));
/* enable i2c-port pins */
saa7146_write(dev, MC1, (MASK_08 | MASK_24));
......@@ -412,10 +412,10 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
#endif
i2c_adapter->algo = &saa7146_algo;
i2c_adapter->algo_data = NULL;
i2c_adapter->id = I2C_ALGO_SAA7146;
i2c_adapter->id = I2C_ALGO_SAA7146;
i2c_adapter->timeout = SAA7146_I2C_TIMEOUT;
i2c_adapter->retries = SAA7146_I2C_RETRIES;
}
return 0;
}
This diff is collapsed.
This diff is collapsed.
......@@ -8,13 +8,13 @@ config DVB
bool "DVB For Linux"
depends on NET && INET
---help---
Support Digital Video Broadcasting hardware. Enable this if you
own a DVB adapter and want to use it or if you compile Linux for
Support Digital Video Broadcasting hardware. Enable this if you
own a DVB adapter and want to use it or if you compile Linux for
a digital SetTopBox.
API specs and user tools are available from <http://www.linuxtv.org/>.
Please report problems regarding this driver to the LinuxDVB
Please report problems regarding this driver to the LinuxDVB
mailing list.
If unsure say N.
......
......@@ -141,7 +141,7 @@ static int dst_gpio_inb(struct dst_state *state, u8 * result)
}
#define DST_I2C_ENABLE 1
#define DST_8820 2
#define DST_8820 2
static int dst_reset8820(struct dst_state *state)
{
......@@ -1036,7 +1036,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = {
.frequency_tolerance = 29500,
.symbol_rate_min = 1000000,
.symbol_rate_max = 45000000,
/* . symbol_rate_tolerance = ???,*/
/* . symbol_rate_tolerance = ???,*/
.caps = FE_CAN_FEC_AUTO | FE_CAN_QPSK
},
......@@ -1066,7 +1066,7 @@ static struct dvb_frontend_ops dst_dvbc_ops = {
.frequency_max = 858000000,
.symbol_rate_min = 1000000,
.symbol_rate_max = 45000000,
/* . symbol_rate_tolerance = ???,*/
/* . symbol_rate_tolerance = ???,*/
.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO
},
......
/*
* Bt8xx based DVB adapter driver
* Bt8xx based DVB adapter driver
*
* Copyright (C) 2002,2003 Florian Schirmer <jolt@tuxbox.org>
*
......@@ -71,7 +71,7 @@ static int dvb_bt8xx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
int rc;
dprintk("dvb_bt8xx: start_feed\n");
if (!dvbdmx->dmx.frontend)
return -EINVAL;
......@@ -91,10 +91,10 @@ static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
struct dvb_bt8xx_card *card = dvbdmx->priv;
dprintk("dvb_bt8xx: stop_feed\n");
if (!dvbdmx->dmx.frontend)
return -EINVAL;
down(&card->lock);
card->nfeeds--;
if (card->nfeeds == 0)
......@@ -117,7 +117,7 @@ static int is_pci_slot_eq(struct pci_dev* adev, struct pci_dev* bdev)
static struct bt878 __init *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev)
{
unsigned int card_nr;
/* Hmm, n squared. Hope n is small */
for (card_nr = 0; card_nr < bt878_num; card_nr++) {
if (is_pci_slot_eq(bt878[card_nr].dev, bttv_pci_dev))
......@@ -167,9 +167,9 @@ static int thomson_dtt7579_pll_set(struct dvb_frontend* fe, struct dvb_frontend_
pllbuf[0] = 0xc0; // Note: non-linux standard PLL i2c address
pllbuf[1] = div >> 8;
pllbuf[2] = div & 0xff;
pllbuf[3] = cp;
pllbuf[4] = bs;
pllbuf[2] = div & 0xff;
pllbuf[3] = cp;
pllbuf[4] = bs;
return 0;
}
......@@ -184,25 +184,25 @@ static struct mt352_config thomson_dtt7579_config = {
static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
{
u32 freq = params->frequency;
int i, a, n, pump;
int i, a, n, pump;
u32 band, pll;
u32 osci[]={950000,1019000,1075000,1178000,1296000,1432000,
1576000,1718000,1856000,2036000,2150000};
u32 bandsel[]={0,0x00020000,0x00040000,0x00100800,0x00101000,
0x00102000,0x00104000,0x00108000,0x00110000,
0x00120000,0x00140000};
#define XTAL 1011100 /* Hz, really 1.0111 MHz and a /10 prescaler */
printk("cx24108 debug: entering SetTunerFreq, freq=%d\n",freq);
/* This is really the bit driving the tuner chip cx24108 */
if(freq<950000) freq=950000; /* kHz */
if(freq>2150000) freq=2150000; /* satellite IF is 950..2150MHz */
/* decide which VCO to use for the input frequency */
for(i=1;(i<sizeof(osci)/sizeof(osci[0]))&&(osci[i]<freq);i++);
printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq);
......@@ -210,7 +210,7 @@ static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_paramete
/* the gain values must be set by SetSymbolrate */
/* compute the pll divider needed, from Conexant data sheet,
resolved for (n*32+a), remember f(vco) is f(receive) *2 or *4,
depending on the divider bit. It is set to /4 on the 2 lowest
depending on the divider bit. It is set to /4 on the 2 lowest
bands */
n=((i<=2?2:1)*freq*10L)/(XTAL/100);
a=n%32; n/=32; if(a==0) n--;
......@@ -348,9 +348,9 @@ static int advbt771_samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct
pllbuf[0] = 0xc2; // Note: non-linux standard PLL i2c address
pllbuf[1] = div >> 8;
pllbuf[2] = div & 0xff;
pllbuf[3] = cp;
pllbuf[4] = bs;
pllbuf[2] = div & 0xff;
pllbuf[3] = cp;
pllbuf[4] = bs;
return 0;
}
......@@ -451,7 +451,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
break;
}
break;
case BTTV_PINNACLESAT:
card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter);
if (card->fe != NULL) {
......@@ -484,7 +484,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
THIS_MODULE)) < 0) {
printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result);
return result;
}
card->dvb_adapter->priv = card;
......@@ -500,7 +500,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
card->demux.start_feed = dvb_bt8xx_start_feed;
card->demux.stop_feed = dvb_bt8xx_stop_feed;
card->demux.write_to_decoder = NULL;
if ((result = dvb_dmx_init(&card->demux)) < 0) {
printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
......@@ -511,7 +511,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
card->dmxdev.filternum = 256;
card->dmxdev.demux = &card->demux.dmx;
card->dmxdev.capabilities = 0;
if ((result = dvb_dmxdev_init(&card->dmxdev, card->dvb_adapter)) < 0) {
printk("dvb_bt8xx: dvb_dmxdev_init failed (errno = %d)\n", result);
......@@ -530,7 +530,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
dvb_unregister_adapter(card->dvb_adapter);
return result;
}
card->fe_mem.source = DMX_MEMORY_FE;
if ((result = card->demux.dmx.add_frontend(&card->demux.dmx, &card->fe_mem)) < 0) {
......@@ -557,7 +557,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
dvb_net_init(card->dvb_adapter, &card->dvbnet, &card->demux.dmx);
tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
frontend_init(card, type);
return 0;
......@@ -588,17 +588,17 @@ static int dvb_bt8xx_probe(struct device *dev)
card->op_sync_orin = 0;
card->irq_err_ignore = 0;
break;
#ifdef BTTV_DVICO_DVBT_LITE
case BTTV_DVICO_DVBT_LITE:
#endif
card->gpio_mode = 0x0400C060;
card->op_sync_orin = 0;
card->irq_err_ignore = 0;
/* 26, 15, 14, 6, 5
/* 26, 15, 14, 6, 5
* A_PWRDN DA_DPM DA_SBR DA_IOM_DA
* DA_APP(parallel) */
break;
* DA_APP(parallel) */
break;
#ifdef BTTV_TWINHAN_VP3021
case BTTV_TWINHAN_VP3021:
......@@ -609,40 +609,40 @@ static int dvb_bt8xx_probe(struct device *dev)
card->gpio_mode = (1 << 26) | (1 << 14) | (1 << 5);
card->op_sync_orin = 0;
card->irq_err_ignore = 0;
/* A_PWRDN DA_SBR DA_APP (high speed serial) */
break;
/* A_PWRDN DA_SBR DA_APP (high speed serial) */
break;
case BTTV_AVDVBT_771: //case 0x07711461:
card->gpio_mode = 0x0400402B;
card->op_sync_orin = BT878_RISC_SYNC_MASK;
card->irq_err_ignore = 0;
/* A_PWRDN DA_SBR DA_APP[0] PKTP=10 RISC_ENABLE FIFO_ENABLE*/
break;
break;
case BTTV_TWINHAN_DST:
card->gpio_mode = 0x2204f2c;
card->op_sync_orin = BT878_RISC_SYNC_MASK;
card->irq_err_ignore = BT878_APABORT | BT878_ARIPERR |
BT878_APPERR | BT878_AFBUS;
/* 25,21,14,11,10,9,8,3,2 then
* 0x33 = 5,4,1,0
* A_SEL=SML, DA_MLB, DA_SBR,
* DA_SDR=f, fifo trigger = 32 DWORDS
* IOM = 0 == audio A/D
* DPM = 0 == digital audio mode
* == async data parallel port
* then 0x33 (13 is set by start_capture)
* DA_APP = async data parallel port,
* ACAP_EN = 1,
* RISC+FIFO ENABLE */
break;
default:
/* 25,21,14,11,10,9,8,3,2 then
* 0x33 = 5,4,1,0
* A_SEL=SML, DA_MLB, DA_SBR,
* DA_SDR=f, fifo trigger = 32 DWORDS
* IOM = 0 == audio A/D
* DPM = 0 == digital audio mode
* == async data parallel port
* then 0x33 (13 is set by start_capture)
* DA_APP = async data parallel port,
* ACAP_EN = 1,
* RISC+FIFO ENABLE */
break;
default:
printk(KERN_WARNING "dvb_bt8xx: Unknown bttv card type: %d.\n",
sub->core->type);
kfree(card);
return -ENODEV;
}
}
dprintk("dvb_bt8xx: identified card%d as %s\n", card->bttv_nr, card->card_name);
......@@ -661,7 +661,7 @@ static int dvb_bt8xx_probe(struct device *dev)
kfree(card);
return -EFAULT;
}
}
init_MUTEX(&card->bt->gpio_lock);
card->bt->bttv_nr = sub->core->nr;
......@@ -678,23 +678,23 @@ static int dvb_bt8xx_probe(struct device *dev)
static int dvb_bt8xx_remove(struct device *dev)
{
struct dvb_bt8xx_card *card = dev_get_drvdata(dev);
dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr);
bt878_stop(card->bt);
tasklet_kill(&card->bt->tasklet);
dvb_net_release(&card->dvbnet);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
dvb_dmxdev_release(&card->dmxdev);
dvb_dmx_release(&card->demux);
dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr);
bt878_stop(card->bt);
tasklet_kill(&card->bt->tasklet);
dvb_net_release(&card->dvbnet);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem);
card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
dvb_dmxdev_release(&card->dmxdev);
dvb_dmx_release(&card->demux);
if (card->fe) dvb_unregister_frontend(card->fe);
dvb_unregister_adapter(card->dvb_adapter);
kfree(card);
dvb_unregister_adapter(card->dvb_adapter);
kfree(card);
return 0;
}
}
static struct bttv_sub_driver driver = {
.drv = {
......@@ -721,7 +721,7 @@ static void __exit dvb_bt8xx_exit(void)
module_init(dvb_bt8xx_init);
module_exit(dvb_bt8xx_exit);
MODULE_DESCRIPTION("Bt8xx based DVB adapter driver");
MODULE_AUTHOR("Florian Schirmer <jolt@tuxbox.org>");
MODULE_LICENSE("GPL");
/*
* Bt8xx based DVB adapter driver
* Bt8xx based DVB adapter driver
*
* Copyright (C) 2002,2003 Florian Schirmer <jolt@tuxbox.org>
* Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de>
......@@ -51,7 +51,7 @@ struct dvb_bt8xx_card {
u32 irq_err_ignore;
struct i2c_adapter *i2c_adapter;
struct dvb_net dvbnet;
struct dvb_frontend* fe;
};
......
This diff is collapsed.
......@@ -113,7 +113,7 @@ struct dibusb_device_class {
int pipe_cmd; /* command pipe (read/write) */
int pipe_data; /* data pipe */
int urb_count; /* number of data URBs to be submitted */
int urb_buffer_size; /* the size of the buffer for each URB */
......@@ -149,7 +149,7 @@ struct usb_dibusb {
#define DIBUSB_STATE_INIT 0x000
#define DIBUSB_STATE_URB_LIST 0x001
#define DIBUSB_STATE_URB_BUF 0x002
#define DIBUSB_STATE_URB_SUBMIT 0x004
#define DIBUSB_STATE_URB_SUBMIT 0x004
#define DIBUSB_STATE_DVB 0x008
#define DIBUSB_STATE_I2C 0x010
#define DIBUSB_STATE_REMOTE 0x020
......@@ -175,7 +175,7 @@ struct usb_dibusb {
/* pid filtering */
spinlock_t pid_list_lock;
struct dibusb_pid *pid_list;
/* dvb */
struct dvb_adapter *adapter;
struct dmxdev dmxdev;
......@@ -206,7 +206,7 @@ int dibusb_remote_exit(struct usb_dibusb *dib);
int dibusb_remote_init(struct usb_dibusb *dib);
/* dvb-dibusb-fe-i2c.c */
int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr,
int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr,
u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen);
int dibusb_fe_init(struct usb_dibusb* dib);
int dibusb_fe_exit(struct usb_dibusb *dib);
......@@ -238,11 +238,11 @@ int dibusb_ctrl_pid(struct usb_dibusb *dib, struct dvb_demux_feed *dvbdmxfeed ,
/* i2c and transfer stuff */
#define DIBUSB_I2C_TIMEOUT 5000
/*
/*
* protocol of all dibusb related devices
*/
/*
/*
* bulk msg to/from endpoint 0x01
*
* general structure:
......@@ -252,23 +252,23 @@ int dibusb_ctrl_pid(struct usb_dibusb *dib, struct dvb_demux_feed *dvbdmxfeed ,
#define DIBUSB_REQ_START_READ 0x00
#define DIBUSB_REQ_START_DEMOD 0x01
/*
* i2c read
/*
* i2c read
* bulk write: 0x02 ((7bit i2c_addr << 1) & 0x01) register_bytes length_word
* bulk read: byte_buffer (length_word bytes)
*/
#define DIBUSB_REQ_I2C_READ 0x02
#define DIBUSB_REQ_I2C_READ 0x02
/*
* i2c write
* bulk write: 0x03 (7bit i2c_addr << 1) register_bytes value_bytes
*/
#define DIBUSB_REQ_I2C_WRITE 0x03
#define DIBUSB_REQ_I2C_WRITE 0x03
/*
* polling the value of the remote control
/*
* polling the value of the remote control
* bulk write: 0x04
* bulk read: byte_buffer (5 bytes)
* bulk read: byte_buffer (5 bytes)
*
* first byte of byte_buffer shows the status (0x00, 0x01, 0x02)
*/
......@@ -279,26 +279,26 @@ int dibusb_ctrl_pid(struct usb_dibusb *dib, struct dvb_demux_feed *dvbdmxfeed ,
#define DIBUSB_RC_NEC_KEY_REPEATED 0x02
/* streaming mode:
* bulk write: 0x05 mode_byte
* bulk write: 0x05 mode_byte
*
* mode_byte is mostly 0x00
*/
#define DIBUSB_REQ_SET_STREAMING_MODE 0x05
/* interrupt the internal read loop, when blocking */
#define DIBUSB_REQ_INTR_READ 0x06
#define DIBUSB_REQ_INTR_READ 0x06
/* io control
* 0x07 cmd_byte param_bytes
*
* param_bytes can be up to 32 bytes
*
* cmd_byte function parameter name
* cmd_byte function parameter name
* 0x00 power mode
* 0x00 sleep
* 0x01 wakeup
*
* 0x01 enable streaming
* 0x01 enable streaming
* 0x02 disable streaming
*
*
......
This diff is collapsed.
This diff is collapsed.
/*
/*
* dmxdev.h
*
* Copyright (C) 2000 Ralph Metzler & Marcus Metzler
......
This diff is collapsed.
This diff is collapsed.
/*
/*
* dvb_demux.h: DVB kernel demux API
*
* Copyright (C) 2000-2001 Marcus Metzler & Ralph Metzler
......@@ -45,10 +45,10 @@
struct dvb_demux_filter {
struct dmx_section_filter filter;
u8 maskandmode [DMX_MAX_FILTER_SIZE];
u8 maskandnotmode [DMX_MAX_FILTER_SIZE];
u8 maskandmode [DMX_MAX_FILTER_SIZE];
u8 maskandnotmode [DMX_MAX_FILTER_SIZE];
int doneq;
struct dvb_demux_filter *next;
struct dvb_demux_feed *feed;
int index;
......@@ -85,10 +85,10 @@ struct dvb_demux_feed {
int buffer_size;
int descramble;
struct timespec timeout;
struct timespec timeout;
struct dvb_demux_filter *filter;
int cb_length;
int ts_type;
enum dmx_ts_pes pes_type;
......@@ -113,7 +113,7 @@ struct dvb_demux {
const u8 *buf, size_t len);
void (*memcopy) (struct dvb_demux_feed *feed, u8 *dst,
const u8 *src, size_t len);
int users;
#define MAX_DVB_DEMUX_USERS 10
struct dvb_demux_filter *filter;
......@@ -123,8 +123,8 @@ struct dvb_demux {
struct dvb_demux_feed *pesfilter[DMX_TS_PES_OTHER];
u16 pids[DMX_TS_PES_OTHER];
int playing;
int recording;
int playing;
int recording;
#define DMX_MAX_PID 0x2000
struct list_head feed_list;
......@@ -147,4 +147,3 @@ int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *fronte
int dvbdmx_disconnect_frontend(struct dmx_demux *demux);
#endif /* _DVB_DEMUX_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
/*
* dvb_frontend.h
*
* Copyright (C) 2001 convergence integrated media GmbH
......
This diff is collapsed.
/*
/*
* dvb_net.h
*
* Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH
......@@ -44,4 +44,3 @@ void dvb_net_release(struct dvb_net *);
int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
/*
* dvbdev.h
*
* Copyright (C) 2000 Ralph Metzler & Marcus Metzler
......@@ -58,9 +58,6 @@ struct dvb_adapter {
struct dvb_device {
struct list_head list_head;
struct file_operations *fops;
struct dvb_adapter *adapter;
int type;
u32 id;
......@@ -83,7 +80,7 @@ extern int dvb_register_adapter (struct dvb_adapter **padap, const char *name, s
extern int dvb_unregister_adapter (struct dvb_adapter *adap);
extern int dvb_register_device (struct dvb_adapter *adap,
struct dvb_device **pdvbdev,
struct dvb_device **pdvbdev,
const struct dvb_device *template,
void *priv,
int type);
......@@ -105,4 +102,3 @@ extern int dvb_usercopy(struct inode *inode, struct file *file,
unsigned int cmd, void *arg));
#endif /* #ifndef _DVBDEV_H_ */
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.
/*
/*
Driver for Zarlink MT312 Satellite Channel Decoder
Copyright (C) 2003 Andreas Oberritter <obi@linuxtv.org>
......
This diff is collapsed.
This diff is collapsed.
......@@ -18,6 +18,6 @@ struct nxt2002_config
};
extern struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config,
struct i2c_adapter* i2c);
struct i2c_adapter* i2c);
#endif // NXT2002_H
This diff is collapsed.
......@@ -130,7 +130,7 @@ static int sp8870_firmware_upload (struct sp8870_state* state, const struct firm
msg.flags = 0;
msg.buf = tx_buf;
msg.len = tx_len + 2;
if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
printk("%s: firmware upload failed!\n", __FUNCTION__);
printk ("%s: i2c error (err == %i)\n", __FUNCTION__, err);
return err;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -37,7 +37,6 @@ struct tda10021_config
};
extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
struct i2c_adapter* i2c,
u8 pwm);
struct i2c_adapter* i2c, u8 pwm);
#endif // TDA10021_H
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