diff options
author | Mike Isely <isely@pobox.com> | 2006-03-30 22:46:49 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2006-03-30 22:46:49 -0600 |
commit | 4a70d7bbda936a5e93a2d6f6061800327491cc69 (patch) | |
tree | e7734e7cfedf5a03d71471826f116e45df37272d /linux/drivers/media/dvb/ttpci/budget-patch.c | |
parent | 012c447c3dd586921468215450cb6cce65052a3c (diff) | |
parent | b03dad0db6b312169fd2e16c18187703b23ecd38 (diff) | |
download | mediapointer-dvb-s2-4a70d7bbda936a5e93a2d6f6061800327491cc69.tar.gz mediapointer-dvb-s2-4a70d7bbda936a5e93a2d6f6061800327491cc69.tar.bz2 |
Merge from master
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/budget-patch.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-patch.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c index 5ea95da4f..25e40fc1f 100644 --- a/linux/drivers/media/dvb/ttpci/budget-patch.c +++ b/linux/drivers/media/dvb/ttpci/budget-patch.c @@ -577,6 +577,17 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // Set RPS1 Address register to point to RPS code (r108 p42) saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); + + if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) + return -ENOMEM; + + dprintk(2, "budget: %p\n", budget); + + if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { + kfree (budget); + return err; + } + // Set Source Line Counter Threshold, using BRS (rCC p43) // It generates HS event every TS_HEIGHT lines // this is related to TS_WIDTH set in register @@ -585,24 +596,13 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte //,then RPS_THRESH1 // should be set to trigger every TS_HEIGHT (512) lines. // - saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 ); + saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 ); // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); // Enable RPS1 (rFC p33) saa7146_write(dev, MC1, (MASK_13 | MASK_29)); - if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) - return -ENOMEM; - - dprintk(2, "budget: %p\n", budget); - - if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { - kfree (budget); - return err; - } - - dev->ext_priv = budget; budget->dvb_adapter.priv = budget; |