diff options
author | Gerd Knorr <devnull@localhost> | 2004-05-26 14:05:16 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-05-26 14:05:16 +0000 |
commit | 4224844ed78c838d638e01c957d846eb36e2095f (patch) | |
tree | 0881a3a089ed6b20e91cd8f330c03da25d00166d /linux/drivers | |
parent | ca5d6f2f8ef97f924e7906f278170645c27dc875 (diff) | |
download | mediapointer-dvb-s2-4224844ed78c838d638e01c957d846eb36e2095f.tar.gz mediapointer-dvb-s2-4224844ed78c838d638e01c957d846eb36e2095f.tar.bz2 |
- saa7134: add Items MuchTV card by Norman Jonas.
- saa7134: make ts buffer size configurable by Andrew de Quincey.
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/ir-kbd-gpio.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa6752hs.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa6752hs.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 24 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-ts.c | 25 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 1 |
6 files changed, 42 insertions, 11 deletions
diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c index 09134cecf..c853e4581 100644 --- a/linux/drivers/media/video/ir-kbd-gpio.c +++ b/linux/drivers/media/video/ir-kbd-gpio.c @@ -1,3 +1,4 @@ + /* * Copyright (c) 2003 Gerd Knorr * Copyright (c) 2003 Pavel Machek diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c index 78273dbc3..2b707f50a 100644 --- a/linux/drivers/media/video/saa6752hs.c +++ b/linux/drivers/media/video/saa6752hs.c @@ -362,7 +362,6 @@ static int saa6752hs_probe(struct i2c_adapter *adap) break; } #endif - return 0; } diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 78273dbc3..2b707f50a 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -362,7 +362,6 @@ static int saa6752hs_probe(struct i2c_adapter *adap) break; } #endif - return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index e1d9324fc..5bb99d716 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1001,6 +1001,30 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE1, }}, }, + [SAA7134_BOARD_ITEMS_MTV005] = { + /* Norman Jonas <normanjonas@arcor.de> */ + .name = "Items MuchTV Plus / IT-005", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_PAL, + .inputs = {{ + .name = name_tv, + .vmux = 3, + .amux = TV, + .tv = 1, + },{ + .name = name_comp1, + .vmux = 1, + .amux = LINE1, + },{ + .name = name_svideo, + .vmux = 8, + .amux = LINE1, + }}, + .radio = { + .name = name_radio, + .amux = LINE2, + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c index 6574793fe..a7b62c2e1 100644 --- a/linux/drivers/media/video/saa7134/saa7134-ts.c +++ b/linux/drivers/media/video/saa7134/saa7134-ts.c @@ -37,6 +37,8 @@ /* ------------------------------------------------------------------ */ +#define TS_PACKET_SIZE 188 /* TS packets 188 bytes */ + static unsigned int ts_debug = 0; MODULE_PARM(ts_debug,"i"); MODULE_PARM_DESC(ts_debug,"enable debug messages [ts]"); @@ -45,8 +47,9 @@ static unsigned int tsbufs = 4; MODULE_PARM(tsbufs,"i"); MODULE_PARM_DESC(tsbufs,"number of ts buffers, range 2-32"); -#define TS_PACKET_SIZE 188 /* TS packets 188 bytes */ -#define TS_NR_PACKETS 312 +static unsigned int ts_nr_packets = 30; +MODULE_PARM(ts_nr_packets,"i"); +MODULE_PARM_DESC(ts_nr_packets,"size of a ts buffers (in ts packets)"); #define dprintk(fmt, arg...) if (ts_debug) \ printk(KERN_DEBUG "%s/ts: " fmt, dev->name , ## arg) @@ -100,7 +103,7 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]); llength = TS_PACKET_SIZE; - lines = TS_NR_PACKETS; + lines = ts_nr_packets; size = lines * llength; if (0 != buf->vb.baddr && buf->vb.bsize < size) @@ -139,7 +142,7 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size) { - *size = TS_PACKET_SIZE * TS_NR_PACKETS; + *size = TS_PACKET_SIZE * ts_nr_packets; if (0 == *count) *count = tsbufs; *count = saa7134_buffer_count(*size,*count); @@ -357,7 +360,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, f->fmt.pix.width = 720; /* D1 */ f->fmt.pix.height = 576; f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; - f->fmt.pix.sizeimage = TS_PACKET_SIZE*TS_NR_PACKETS; + f->fmt.pix.sizeimage = TS_PACKET_SIZE*ts_nr_packets; return 0; } @@ -383,7 +386,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, f->fmt.pix.width = 720; /* D1 */ f->fmt.pix.height = 576; f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; - f->fmt.pix.sizeimage = TS_PACKET_SIZE*TS_NR_PACKETS; + f->fmt.pix.sizeimage = TS_PACKET_SIZE*ts_nr_packets; return 0; } @@ -459,6 +462,10 @@ int saa7134_ts_init1(struct saa7134_dev *dev) tsbufs = 2; if (tsbufs > VIDEO_MAX_FRAME) tsbufs = VIDEO_MAX_FRAME; + if (ts_nr_packets < 4) + ts_nr_packets = 4; + if (ts_nr_packets > 312) + ts_nr_packets = 312; INIT_LIST_HEAD(&dev->ts_q.queue); init_timer(&dev->ts_q.timeout); @@ -476,9 +483,9 @@ int saa7134_ts_init1(struct saa7134_dev *dev) saa_writeb(SAA7134_TS_SERIAL1, 0x00); /* deactivate TS softreset */ saa_writeb(SAA7134_TS_PARALLEL, 0xec); /* TSSOP high active, TSVAL high active, TSLOCK ignored */ saa_writeb(SAA7134_TS_PARALLEL_SERIAL, (TS_PACKET_SIZE-1)); - saa_writeb(SAA7134_TS_DMA0, ((TS_NR_PACKETS-1)&0xff)); - saa_writeb(SAA7134_TS_DMA1, (((TS_NR_PACKETS-1)>>8)&0xff)); - saa_writeb(SAA7134_TS_DMA2, ((((TS_NR_PACKETS-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */ + saa_writeb(SAA7134_TS_DMA0, ((ts_nr_packets-1)&0xff)); + saa_writeb(SAA7134_TS_DMA1, (((ts_nr_packets-1)>>8)&0xff)); + saa_writeb(SAA7134_TS_DMA2, ((((ts_nr_packets-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */ return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 831cd283e..044c0797c 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -183,6 +183,7 @@ struct saa7134_format { #define SAA7134_BOARD_NOVAC_PRIMETV7133 34 #define SAA7134_BOARD_AVERMEDIA_305 35 #define SAA7133_BOARD_UPMOST_PURPLE_TV 36 +#define SAA7134_BOARD_ITEMS_MTV005 37 #define SAA7134_INPUT_MAX 8 |