From dfb24e8039e0a173886ee48d1259d9d3925a1ca8 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 15 Feb 2006 02:18:52 -0500 Subject: Add support for Kworld ATSC110 From: Andrew Burri Signed-off-by: Andrew Burri Signed-off-by: Michael Krufky --- linux/drivers/media/video/saa7134/saa7134-cards.c | 42 +++++++++++++++++++++++ linux/drivers/media/video/saa7134/saa7134-dvb.c | 9 +++++ linux/drivers/media/video/saa7134/saa7134.h | 1 + 3 files changed, 52 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 79bf007db..88c203fbe 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -2736,6 +2736,42 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE1, }, }, + [SAA7134_BOARD_KWORLD_ATSC110] = { + .name = "KWORLD ATSC110", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_TUV1236D, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .tda9887_conf = TDA9887_PRESENT, + .mpeg = SAA7134_MPEG_DVB, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = TV, + .tv = 1, +#if 0 + /* these inputs are untested */ + },{ + .name = name_comp1, /* not yet verified */ + .vmux = 4, /* a later patch by + * Curt Meyers + * uses .vmux = 3, + */ + .amux = LINE2, + },{ + .name = name_svideo, /* not yet verified */ + .vmux = 8, + .amux = LINE2, +#endif + }}, +#if 0 + .radio = { + .name = name_radio, + .amux = LINE1, + }, +#endif + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -3236,6 +3272,12 @@ struct pci_device_id saa7134_pci_tbl[] = { .subvendor = 0x17de, .subdevice = 0x7201, .driver_data = SAA7134_BOARD_TEVION_DVBT_220RF, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, /* SAA7135HL */ + .subvendor = 0x17de, + .subdevice = 0x7350, + .driver_data = SAA7134_BOARD_KWORLD_ATSC110, },{ /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 909b82f19..d405b954d 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -929,6 +929,12 @@ static struct nxt200x_config avertvhda180 = { .pll_address = 0x61, .pll_desc = &dvb_pll_tdhu2, }; + +static struct nxt200x_config kworldatsc110 = { + .demod_address = 0x0a, + .pll_address = 0x61, + .pll_desc = &dvb_pll_tuv1236d, +}; #endif /* ------------------------------------------------------------------ */ @@ -1014,6 +1020,9 @@ static int dvb_init(struct saa7134_dev *dev) case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: dev->dvb.frontend = nxt200x_attach(&avertvhda180, &dev->i2c_adap); break; + case SAA7134_BOARD_KWORLD_ATSC110: + dev->dvb.frontend = nxt200x_attach(&kworldatsc110, &dev->i2c_adap); + break; #endif default: printk("%s: Huh? unknown DVB card?\n",dev->name); diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 638c88ba6..b72306e59 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -227,6 +227,7 @@ struct saa7134_format { #define SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331 87 #define SAA7134_BOARD_TEVION_DVBT_220RF 88 #define SAA7134_BOARD_ELSA_700TV 89 +#define SAA7134_BOARD_KWORLD_ATSC110 90 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 -- cgit v1.2.3 From d43a1962bbd1dacaf9925f2ec777dfd9f1513d17 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 15 Feb 2006 02:19:47 -0500 Subject: KWorld ATSC110: implement set_pll_input From: Curt Meyers - When tuning VSB, use ANT input - When tuning QAM, use CABLE input Signed-off-by: Curt Meyers Signed-off-by: Michael Krufky --- linux/drivers/media/video/saa7134/saa7134-dvb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index d405b954d..d1f88d974 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -930,10 +930,20 @@ static struct nxt200x_config avertvhda180 = { .pll_desc = &dvb_pll_tdhu2, }; +static int nxt200x_set_pll_input(u8 *buf, int input) +{ + if (input) + buf[3] |= 0x08; + else + buf[3] &= ~0x08; + return 0; +} + static struct nxt200x_config kworldatsc110 = { .demod_address = 0x0a, .pll_address = 0x61, .pll_desc = &dvb_pll_tuv1236d, + .set_pll_input = nxt200x_set_pll_input, }; #endif -- cgit v1.2.3 From 0743c722c4c56cd4eef189baf8c488701598b838 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 15 Feb 2006 08:03:43 -0500 Subject: Kworld ATSC110: enable composite and svideo inputs From: Curt Meyers - corrected composite input. - verified s-video input. Signed-off-by: Curt Meyers Signed-off-by: Michael Krufky --- linux/drivers/media/video/saa7134/saa7134-cards.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 88c203fbe..5abce5571 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -2750,20 +2750,14 @@ struct saa7134_board saa7134_boards[] = { .vmux = 1, .amux = TV, .tv = 1, -#if 0 - /* these inputs are untested */ },{ - .name = name_comp1, /* not yet verified */ - .vmux = 4, /* a later patch by - * Curt Meyers - * uses .vmux = 3, - */ + .name = name_comp1, + .vmux = 3, .amux = LINE2, },{ - .name = name_svideo, /* not yet verified */ + .name = name_svideo, .vmux = 8, .amux = LINE2, -#endif }}, #if 0 .radio = { -- cgit v1.2.3 From 0741e0581d98ea09dea78b52258f25aa0ce6bcea Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 16 Feb 2006 13:32:52 -0500 Subject: Kworld ATSC110: cleanups From: Michael Krufky - There is no radio with this tuner card... Thanks-to: Dwaine Garden - fixed capitalization in card name. Signed-off-by: Michael Krufky --- linux/drivers/media/video/saa7134/saa7134-cards.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 5abce5571..bb5f62076 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -2737,7 +2737,7 @@ struct saa7134_board saa7134_boards[] = { }, }, [SAA7134_BOARD_KWORLD_ATSC110] = { - .name = "KWORLD ATSC110", + .name = "Kworld ATSC110", .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_TUV1236D, .radio_type = UNSET, @@ -2759,12 +2759,6 @@ struct saa7134_board saa7134_boards[] = { .vmux = 8, .amux = LINE2, }}, -#if 0 - .radio = { - .name = name_radio, - .amux = LINE1, - }, -#endif }, }; -- cgit v1.2.3 From 32610a343e2447dca344c6e61f4eea03bfb5acc5 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Fri, 17 Feb 2006 08:07:09 -0500 Subject: Kworld ATSC110: initialize the tuner for analog mode on module load From: Curt Meyers - Enable the tuv1236 tuner on the Kworld-ATSC110 card so that the tuner can be identified when tuners.ko loads. - With this change it is no longer necessary to remove and reload the tuner module in order to get the tuv1236 identified. - This code was copied from the ATI HDTV Wonder init routine (in cx88-cards.c) which also uses the TUV1236D. Signed-off-by: Curt Meyers Signed-off-by: Michael Krufky --- linux/drivers/media/video/saa7134/saa7134-cards.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index bb5f62076..bfd55845b 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -3591,6 +3591,18 @@ int saa7134_board_init2(struct saa7134_dev *dev) i2c_transfer(&dev->i2c_adap, &msg, 1); } break; + case SAA7134_BOARD_KWORLD_ATSC110: + { + /* enable tuner */ + int i; + u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 }; + dev->i2c_client.addr = 0x0a; + for (i = 0; i < 5; i++) + if (2 != i2c_master_send(&dev->i2c_client,&buffer[i*2],2)) + printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n", + dev->name, i); + } + break; } return 0; } -- cgit v1.2.3