diff options
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 30 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-types.c | 23 | ||||
-rw-r--r-- | linux/drivers/media/video/tvp5150.c | 2 | ||||
-rw-r--r-- | v4l/Make.config | 3 | ||||
-rw-r--r-- | v4l/Makefile | 9 | ||||
-rwxr-xr-x | v4l/scripts/gentree.pl | 8 | ||||
-rw-r--r-- | v4l_experimental/xc3028/convert.c | 3 |
9 files changed, 58 insertions, 23 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 3e84ec7c0..de6d61d3c 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -155,6 +155,7 @@ struct em28xx_board em28xx_boards[] = { .amux = 1, }}, }, +#ifdef CONFIG_XC3028 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { .name = "Hauppauge WinTV HVR 900", .vchannels = 3, @@ -199,6 +200,31 @@ struct em28xx_board em28xx_boards[] = { .amux = 1, }}, }, + /* maybe there's a reason behind it why Terratec sells the Hybrid XS as Prodigy XS with a + * different PID, let's keep it separated for now maybe we'll need it lateron */ + [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { + .name = "Terratec Prodigy XS", + .vchannels = 3, + .norm = VIDEO_MODE_PAL, + .tda9887_conf = TDA9887_PRESENT, + .has_tuner = 1, + .tuner_type = TUNER_XCEIVE_XC3028, + .decoder = EM28XX_TVP5150, + .input = {{ + .type = EM28XX_VMUX_TELEVISION, + .vmux = 0, + .amux = 0, + },{ + .type = EM28XX_VMUX_COMPOSITE1, + .vmux = 2, + .amux = 1, + },{ + .type = EM28XX_VMUX_SVIDEO, + .vmux = 9, + .amux = 1, + }}, + }, +#endif [EM2820_BOARD_MSI_VOX_USB_2] = { .name = "MSI VOX USB 2.0", .vchannels = 3, @@ -317,8 +343,11 @@ struct usb_device_id em28xx_id_table [] = { { USB_DEVICE(0x2304, 0x0208), .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, { USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, { USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, +#ifdef CONFIG_XC3028 { USB_DEVICE(0x2040, 0x6500), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, { USB_DEVICE(0x0ccd, 0x0042), .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, + { USB_DEVICE(0x0ccd, 0x0047), .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, +#endif { }, }; @@ -326,6 +355,7 @@ void em28xx_pre_card_setup(struct em28xx *dev) { /* request some modules */ switch(dev->model){ + case EM2880_BOARD_TERRATEC_PRODIGY_XS: case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: case EM2880_BOARD_TERRATEC_HYBRID_XS: { diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index ab9ff4672..c560ab329 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -48,6 +48,7 @@ #define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 10 #define EM2880_BOARD_TERRATEC_HYBRID_XS 11 #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 +#define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 #define UNSET -1 diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 007a3a8b4..553d80394 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -245,9 +245,11 @@ static void set_type(struct i2c_client *c, unsigned int type, i2c_master_send(c,buffer,4); default_tuner_init(c); break; +#ifdef CONFIG_XC3028 case TUNER_XCEIVE_XC3028: xc3028_init(c); break; +#endif default: default_tuner_init(c); break; diff --git a/linux/drivers/media/video/tuner-types.c b/linux/drivers/media/video/tuner-types.c index d9ac7ed77..c66a55e81 100644 --- a/linux/drivers/media/video/tuner-types.c +++ b/linux/drivers/media/video/tuner-types.c @@ -1019,8 +1019,8 @@ static struct tuner_params tuner_tnf_5335mf_params[] = { /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { - { 16 * 175.75 /*MHz*/, 0xce, 0x01, }, - { 16 * 410.25 /*MHz*/, 0xce, 0x02, }, + { 16 * 130.00 /*MHz*/, 0xce, 0x01, }, + { 16 * 364.50 /*MHz*/, 0xce, 0x02, }, { 16 * 999.99 , 0xce, 0x08, }, }; @@ -1032,23 +1032,6 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { }, }; -/* ------------ TUNER_XCEIVE_XC3028 - Xceive xc3028 ------------ */ - -static struct tuner_range tuner_xceive_xc3028_ranges[] = { - { 16 * 140.25 /*MHz*/, 0x02, }, - { 16 * 463.25 /*MHz*/, 0x04, }, - { 16 * 999.99 , 0x01, }, -}; - -static struct tuner_params tuner_xceive_xc3028_params[] = { - { - .type = TUNER_XCEIVE_XC3028, - .ranges = tuner_xceive_xc3028_ranges, - .count = ARRAY_SIZE(tuner_xceive_xc3028_ranges), - }, -}; - - /* --------------------------------------------------------------------- */ struct tunertype tuners[] = { @@ -1418,7 +1401,7 @@ struct tunertype tuners[] = { }, [TUNER_XCEIVE_XC3028] = { /* Xceive 3028 */ .name = "Xceive xc3028", - .params = tuner_xceive_xc3028_params, + /* see xc3028.c for details */ }, }; diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index d3b64130e..571ed11dd 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -1286,7 +1286,7 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, return rv; } -// if (debug > 1) + if (debug > 1) dump_reg(c); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) MOD_INC_USE_COUNT; diff --git a/v4l/Make.config b/v4l/Make.config index d51f77db6..1f19b37ed 100644 --- a/v4l/Make.config +++ b/v4l/Make.config @@ -11,6 +11,9 @@ CONFIG_VIDEO_CX88 := m CONFIG_TVP5150 := m CONFIG_SAA711X := m +#enable experimental support for xc3028 tuner +CONFIG_XC3028 := m + CONFIG_VIDEO_DECODER := m CONFIG_VIDEO_ALSA := y diff --git a/v4l/Makefile b/v4l/Makefile index 889e1581c..e637d2617 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -30,7 +30,10 @@ cx88xx-objs := cx88-cards.o cx88-core.o cx88-i2c.o cx88-tvaudio.o \ cx88-input.o cx8800-objs := cx88-video.o cx88-vbi.o cx8802-objs := cx88-mpeg.o -tuner-objs := tuner-core.o tuner-types.o tuner-simple.o mt20xx.o tda8290.o tea5767.o xc3028.o +tuner-objs := tuner-core.o tuner-types.o tuner-simple.o mt20xx.o tda8290.o tea5767.o +ifeq ($(CONFIG_XC3028),m) +tuner-objs += xc3028.o +endif msp3400-objs := msp3400-driver.o msp3400-kthreads.o list-multi := bttv.o saa7134.o cx88xx.o cx8800.o cx88-alsa.o cx8802.o em28xx-objs := em28xx-video.o em28xx-i2c.o em28xx-cards.o em28xx-core.o \ @@ -158,6 +161,10 @@ ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y) EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1 endif +ifeq ($(CONFIG_XC3028),m) + EXTRA_CFLAGS += -DCONFIG_XC3028=1 +endif + # for DVB EXTRA_CFLAGS += -DDVB_CVS=1 EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/ diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl index 4885b08ad..0ae296b93 100755 --- a/v4l/scripts/gentree.pl +++ b/v4l/scripts/gentree.pl @@ -146,6 +146,14 @@ sub filter_source ($$) { $level++; next; } + if ($line =~ /^#if.*CONFIG_XC3028/) { + chomp($line); + $state{$level} = "if"; + $if{$level} = 0; + print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level$ + $level++; + next; + } if ($line =~ /^#if.*BTTV_VERSION_CODE/) { chomp($line); $line =~ s@^#if\s*@@; diff --git a/v4l_experimental/xc3028/convert.c b/v4l_experimental/xc3028/convert.c index 2559bba5e..ca765f269 100644 --- a/v4l_experimental/xc3028/convert.c +++ b/v4l_experimental/xc3028/convert.c @@ -11,7 +11,8 @@ struct{ int length1; int length2; } xc_firmware[]={{"Terratec","\x2a\x03\xe5\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xbc\xe0\x00\x07\xb0\xf1\x05\x01\x67\x82\x02\x82",2480,3890}, - {"Hauppauge","\x2a\x03\xcc\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xbe\xe0\x00\x07\xb9\xf1\x05\x01\x69\x82\x02\x82",2532,3886}}; + {"Terratec 2006-02-08","\x2a\x03\x9a\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xcf\xe0\x00\x07\xb0\xf1\x05\x01\x78\x82\x02\x82",2632,3852}, + {"Hauppauge","\x2a\x03\xcc\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xbe\xe0\x00\x07\xb9\xf1\x05\x01\x69\x82\x02\x82",2532,3886}}; int main(int argc, char **argv){ FILE *file; |