summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorDavor Emard <devnull@localhost>2003-02-13 12:10:29 +0000
committerDavor Emard <devnull@localhost>2003-02-13 12:10:29 +0000
commit8ba93439e4fc296db4f806d7163148af5bb7c0e4 (patch)
tree173032ace54fae550eda73a0f90c77555a339e4f /linux/drivers/media/dvb
parent8a41c9688c1224f01bfebc06e796e973f79eaf29 (diff)
downloadmediapointer-dvb-s2-8ba93439e4fc296db4f806d7163148af5bb7c0e4.tar.gz
mediapointer-dvb-s2-8ba93439e4fc296db4f806d7163148af5bb7c0e4.tar.bz2
fidbirq() is obsolete. Here is removal of saa7146 interrupt
enable bits for fidbirq, tasklet code and some defines that belong to fidbirq
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/ttpci-budget/budget-core.c83
-rw-r--r--linux/drivers/media/dvb/ttpci-budget/budget.c2
-rw-r--r--linux/drivers/media/dvb/ttpci-budget/budget.h5
3 files changed, 4 insertions, 86 deletions
diff --git a/linux/drivers/media/dvb/ttpci-budget/budget-core.c b/linux/drivers/media/dvb/ttpci-budget/budget-core.c
index 87642fc3f..c656bd561 100644
--- a/linux/drivers/media/dvb/ttpci-budget/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci-budget/budget-core.c
@@ -58,7 +58,7 @@ TTBStop(struct budget_s *budget)
return budget->feeding;
saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off
- IER_DISABLE(budget->dev, MASK_07|MASK_10);
+ IER_DISABLE(budget->dev, MASK_10);
return 0;
}
@@ -98,7 +98,7 @@ TTBStart(struct budget_s *budget)
saa7146_write(dev, MC2, (MASK_04 | MASK_20));
saa7146_write(dev, MC1, (MASK_04 | MASK_20)); // DMA3 on
- IER_ENABLE(budget->dev, MASK_07|MASK_10); // FIDB + VPE
+ IER_ENABLE(budget->dev, MASK_10); // VPE
return ++budget->feeding;
}
@@ -135,82 +135,6 @@ static void vpeirq (unsigned long data)
}
}
-/* TS_PACKETS is minumum number of accumulated 188-byte packets
-** (TS_SIZE=188) that is considered 'complete' and can
-** be delivered to the sw_demux in one 'quantum'.
-** TS_QUANTUM is size in bytes of TS_PACKETS
-** TS_MAX_PACKETS is number of TS_PACKETS in one DMA window
-** TS_BUFLEN is 1024*188
-*/
-static
-void fidbirq (unsigned long data)
-{
- struct budget_s *budget = (struct budget_s*) data;
- u8 *mem=(u8 *)(budget->grabbing);
- u8 oldtsf = budget->tsf;
- u8 newtsf = 0x80 & saa7146_read(budget->dev, PSR);
- u16 oldpkt = budget->ttbp;
- u16 newpkt = saa7146_read(budget->dev, PCI_VDP3)/TS_QUANTUM; /* PCI_VDP3 = 0..TS_BUFLEN-1 */
- u8 *olddma = mem + oldpkt*TS_QUANTUM; /* rounded to first complete packet */
-
- DEB_EE(("budget: %p\n", budget));
-
- /* Zero-Packet-Loss fidbirq by EMARD */
-
- budget->ttbp = newpkt;
- budget->tsf = newtsf;
-
- /* exit immediately when the card is not set for feeding
- ** or when values are out of expected boundaries
- */
- if(budget->feeding == 0 ||
- oldpkt >= TS_MAX_PACKETS || newpkt >= TS_MAX_PACKETS)
- return;
-
- /* use heuristic methods for recovering from lost interrupt
- */
- if(oldtsf == newtsf)
- {
- /* interrupt is probably lost, some data can't be
- ** retrieved because of DMA overwriting, but let's
- ** try to save what is left of good data in the DMA
- ** window.
- */
- if(newpkt != oldpkt)
- { /* DMA is probably in progress right now,
- ** overwriting data. Shift oldpkt 1 packets
- ** forward from newpkt as a gap for racing with
- ** ongoing DMA transfer. Consider TS_MAX_PACKETS-1 packets
- ** are still valid in DMA window.
- */
- oldpkt = (newpkt + 1) % TS_MAX_PACKETS;
- olddma = mem + oldpkt*TS_QUANTUM;
- /* from now on, proceed as usual */
- }
- }
-
- if(oldpkt < newpkt)
- { /* no wraparound - dump linear data
- ** from olddma to newdma
- */
- if(*olddma == 0x47)
- dvb_dmx_swfilter_packets(&budget->demux, olddma,
- TS_PACKETS*(newpkt-oldpkt));
- }
- else
- { /* wraparound - dump in two chunks,
- ** from olddma to end of DMA window
- ** and from begin of DMA window to newdma
- */
- if(*olddma == 0x47)
- dvb_dmx_swfilter_packets(&budget->demux, olddma,
- TS_PACKETS*(TS_MAX_PACKETS - oldpkt));
- if(*mem == 0x47 && newpkt > 0)
- dvb_dmx_swfilter_packets(&budget->demux, mem,
- TS_PACKETS*newpkt);
- }
-}
-
inline static void
Set22K(struct budget_s *budget, int state)
{
@@ -574,7 +498,6 @@ int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *i
/* upload all */
saa7146_write(dev, GPIO_CTRL, 0x000000);
- tasklet_init (&budget->fidb_tasklet, fidbirq, (unsigned long) budget);
tasklet_init (&budget->vpe_tasklet, vpeirq, (unsigned long) budget);
saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI); /* frontend power on */
@@ -619,8 +542,6 @@ void budget_irq(struct saa7146_dev* dev, u32 *isr)
DEB_EE(("dev: %p, budget: %p\n",dev,budget));
- if (*isr & MASK_07)
- tasklet_schedule (&budget->fidb_tasklet);
if (*isr & MASK_10)
tasklet_schedule (&budget->vpe_tasklet);
}
diff --git a/linux/drivers/media/dvb/ttpci-budget/budget.c b/linux/drivers/media/dvb/ttpci-budget/budget.c
index 4d0207476..e08a50134 100644
--- a/linux/drivers/media/dvb/ttpci-budget/budget.c
+++ b/linux/drivers/media/dvb/ttpci-budget/budget.c
@@ -86,7 +86,7 @@ struct saa7146_extension budget_extension = {
.attach = this_budget_attach,
.detach = budget_detach,
- .irq_mask = MASK_07|MASK_10,
+ .irq_mask = MASK_10,
.irq_func = budget_irq,
};
diff --git a/linux/drivers/media/dvb/ttpci-budget/budget.h b/linux/drivers/media/dvb/ttpci-budget/budget.h
index 47c5b6225..825ed4581 100644
--- a/linux/drivers/media/dvb/ttpci-budget/budget.h
+++ b/linux/drivers/media/dvb/ttpci-budget/budget.h
@@ -68,10 +68,7 @@ static struct saa7146_pci_extension_data x_var = { \
#define TS_WIDTH (4*188)
#define TS_HEIGHT (1024/4)
#define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
-
-#define TS_PACKETS 1
-#define TS_QUANTUM (TS_PACKETS*TS_SIZE)
-#define TS_MAX_PACKETS (TS_BUFLEN/TS_QUANTUM)
+#define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
#define BUDGET_TT 0
#define BUDGET_TT_HW_DISEQC 1