diff options
author | Andrew de Quincy <devnull@localhost> | 2004-04-18 13:32:34 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-04-18 13:32:34 +0000 |
commit | 20458877cac8296bdd4af49a7c9ad467a5fe6a2a (patch) | |
tree | 916f84d807f07e0a1a504b6565577b3341cb7efe /linux/drivers/media/dvb/ttpci | |
parent | 36fe527c52e1f369f11f40a30c4d2f03b5acda65 (diff) | |
download | mediapointer-dvb-s2-20458877cac8296bdd4af49a7c9ad467a5fe6a2a.tar.gz mediapointer-dvb-s2-20458877cac8296bdd4af49a7c9ad467a5fe6a2a.tar.bz2 |
Set D1_A and D1_B video handling properly
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-core.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index a42310430..de3100d0e 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -7,7 +7,7 @@ * * Copyright (C) 1999-2002 Ralph Metzler * & Marcus Metzler for convergence integrated media GmbH - * + * * 26feb2004 Support for FS Activy Card (Grundig tuner) by * Michael Dreher <michael@5dot1.de>, * Oliver Endriss <o.endriss@gmx.de>, @@ -62,7 +62,7 @@ static int start_ts_capture (struct budget *budget) DEB_EE(("budget: %p\n",budget)); - if (budget->feeding) + if (budget->feeding) return ++budget->feeding; saa7146_write(dev, MC1, MASK_20); // DMA3 off @@ -77,18 +77,18 @@ static int start_ts_capture (struct budget *budget) /* * Signal path on the Activy: - * + * * tuner -> SAA7146 port A -> SAA7146 BRS -> SAA7146 DMA3 -> memory * * Since the tuner feeds 204 bytes packets into the SAA7146, * DMA3 is configured to strip the trailing 16 FEC bytes: * Pitch: 188, NumBytes3: 188, NumLines3: 1024 */ - + if (budget->card->type == BUDGET_FS_ACTIVY) { saa7146_write(dev, DD1_INIT, 0x04000000); saa7146_write(dev, MC2, (MASK_09 | MASK_25)); - saa7146_write(dev, BRS_CTRL, 0x00000000); + saa7146_write(dev, BRS_CTRL, 0x00000000); } else { if (!budget->ci_present) { saa7146_write(dev, DD1_INIT, 0x02000600); @@ -106,7 +106,7 @@ static int start_ts_capture (struct budget *budget) saa7146_write(dev, BASE_ODD3, 0); saa7146_write(dev, BASE_EVEN3, 0); - saa7146_write(dev, PROT_ADDR3, TS_WIDTH*TS_HEIGHT); + saa7146_write(dev, PROT_ADDR3, TS_WIDTH*TS_HEIGHT); saa7146_write(dev, BASE_PAGE3, budget->pt.dma |ME1|0x90); if (budget->card->type == BUDGET_FS_ACTIVY) { @@ -140,12 +140,12 @@ static void vpeirq (unsigned long data) return; budget->ttbp = newdma; - + if(budget->feeding == 0 || newdma == olddma) return; if (newdma > olddma) { /* no wraparound, dump olddma..newdma */ - dvb_dmx_swfilter_packets(&budget->demux, + dvb_dmx_swfilter_packets(&budget->demux, mem+olddma, (newdma-olddma) / 188); } else { /* wraparound, dump olddma..buflen and 0..newdma */ dvb_dmx_swfilter_packets(&budget->demux, @@ -170,7 +170,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed) if (!demux->dmx.frontend) return -EINVAL; - return start_ts_capture (budget); + return start_ts_capture (budget); } static int budget_stop_feed(struct dvb_demux_feed *feed) @@ -180,7 +180,7 @@ static int budget_stop_feed(struct dvb_demux_feed *feed) DEB_EE(("budget: %p\n",budget)); - return stop_ts_capture (budget); + return stop_ts_capture (budget); } @@ -216,14 +216,14 @@ static int budget_register(struct budget *budget) if (ret < 0) return ret; - + budget->mem_frontend.source = DMX_MEMORY_FE; - ret=dvbdemux->dmx.add_frontend (&dvbdemux->dmx, + ret=dvbdemux->dmx.add_frontend (&dvbdemux->dmx, &budget->mem_frontend); if (ret<0) return ret; - - ret=dvbdemux->dmx.connect_frontend (&dvbdemux->dmx, + + ret=dvbdemux->dmx.connect_frontend (&dvbdemux->dmx, &budget->hw_frontend); if (ret < 0) return ret; @@ -277,6 +277,8 @@ int ttpci_budget_init (struct budget *budget, /* set dd1 stream a & b */ saa7146_write(dev, DD1_STREAM_B, 0x00000000); + saa7146_write(dev, MC2, (MASK_09 | MASK_25)); + saa7146_write(dev, MC2, (MASK_10 | MASK_26)); saa7146_write(dev, DD1_INIT, 0x02000000); saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); @@ -284,7 +286,7 @@ int ttpci_budget_init (struct budget *budget, get recognized before the main driver is loaded */ if (bi->type != BUDGET_FS_ACTIVY) saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */ - + saa7146_i2c_adapter_prepare(dev, NULL, 0, SAA7146_I2C_BUS_BIT_RATE_120); budget->i2c_bus = dvb_register_i2c_bus (master_xfer, dev, @@ -352,7 +354,7 @@ int ttpci_budget_deinit (struct budget *budget) return 0; } -void ttpci_budget_irq10_handler (struct saa7146_dev* dev, u32 *isr) +void ttpci_budget_irq10_handler (struct saa7146_dev* dev, u32 *isr) { struct budget *budget = (struct budget*)dev->ext_priv; |