diff options
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index 241c43b38..4d496f5c9 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -52,7 +52,7 @@ #include "ivtv-ioctl.h" #include "ivtv-cards.h" #include "ivtv-vbi.h" -#include "ivtv-audio.h" +#include "ivtv-routing.h" #include "ivtv-gpio.h" #include "ivtv-yuv.h" @@ -87,13 +87,6 @@ static struct pci_device_id ivtv_pci_tbl[] __devinitdata = { MODULE_DEVICE_TABLE(pci,ivtv_pci_tbl); -const u32 yuv_offset[4] = { - IVTV_YUV_BUFFER_OFFSET, - IVTV_YUV_BUFFER_OFFSET_1, - IVTV_YUV_BUFFER_OFFSET_2, - IVTV_YUV_BUFFER_OFFSET_3 -}; - /* Parameter declarations */ static int cardtype[IVTV_MAX_CARDS]; static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, @@ -113,6 +106,18 @@ static char secam[] = "--"; static char ntsc[] = "-"; /* Buffers */ + +/* DMA Buffers, Default size in MB allocated */ +#define IVTV_DEFAULT_ENC_MPG_BUFFERS 4 +#define IVTV_DEFAULT_ENC_YUV_BUFFERS 2 +#define IVTV_DEFAULT_ENC_VBI_BUFFERS 1 +/* Exception: size in kB for this stream (MB is overkill) */ +#define IVTV_DEFAULT_ENC_PCM_BUFFERS 320 +#define IVTV_DEFAULT_DEC_MPG_BUFFERS 1 +#define IVTV_DEFAULT_DEC_YUV_BUFFERS 1 +/* Exception: size in kB for this stream (MB is way overkill) */ +#define IVTV_DEFAULT_DEC_VBI_BUFFERS 64 + static int enc_mpg_buffers = IVTV_DEFAULT_ENC_MPG_BUFFERS; static int enc_yuv_buffers = IVTV_DEFAULT_ENC_YUV_BUFFERS; static int enc_vbi_buffers = IVTV_DEFAULT_ENC_VBI_BUFFERS; @@ -666,7 +671,7 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv) cx2341x_fill_defaults(&itv->params); itv->params.port = CX2341X_PORT_MEMORY; itv->params.capabilities = CX2341X_CAP_HAS_SLICED_VBI; - init_waitqueue_head(&itv->cap_w); + init_waitqueue_head(&itv->eos_waitq); init_waitqueue_head(&itv->event_waitq); init_waitqueue_head(&itv->vsync_waitq); init_waitqueue_head(&itv->dma_waitq); @@ -712,14 +717,6 @@ static void __devinit ivtv_init_struct2(struct ivtv *itv) break; itv->nof_audio_inputs = i; - /* 0x00EF = saa7114(239) 0x00F0 = saa7115(240) 0x0106 = micro */ - if (itv->card->hw_all & (IVTV_HW_SAA7115 | IVTV_HW_SAA717X)) - itv->digitizer = 0xF1; - else if (itv->card->hw_all & IVTV_HW_SAA7114) - itv->digitizer = 0xEF; - else /* cx25840 */ - itv->digitizer = 0x140; - if (itv->card->hw_all & IVTV_HW_CX25840) { itv->vbi.sliced_size = 288; /* multiple of 16, real size = 284 */ } else { @@ -748,6 +745,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, const struct pci_device_id *pci_id) { u16 cmd; + u8 card_rev; unsigned char pci_latency; IVTV_DEBUG_INFO("Enabling pci device\n"); @@ -794,7 +792,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, } IVTV_DEBUG_INFO("Bus Mastering Enabled.\n"); - pci_read_config_byte(dev, PCI_CLASS_REVISION, &itv->card_rev); + pci_read_config_byte(dev, PCI_CLASS_REVISION, &card_rev); pci_read_config_byte(dev, PCI_LATENCY_TIMER, &pci_latency); if (pci_latency < 64 && ivtv_pci_latency) { @@ -811,7 +809,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " "irq: %d, latency: %d, memory: 0x%lx\n", - itv->dev->device, itv->card_rev, dev->bus->number, + itv->dev->device, card_rev, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), itv->dev->irq, pci_latency, (unsigned long)itv->base_addr); |