aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorDmitri Belimov <d.belimov@gmail.com>2009-08-26 00:01:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:19:42 -0400
commit2012c87f8346ebf322826c3de5126d917ed75281 (patch)
tree3b0551ee3da9b0f59a91668e774360048fc9ca96 /drivers/media/video/saa7134
parent736dadaa17218b6e516053ee896dbb075eadba4b (diff)
V4L/DVB (12587): Add support BeholdTV X7 card
Add support our new TV card based on xc5000 and saa7134. Analog TV works well. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c64
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c1
-rw-r--r--drivers/media/video/saa7134/saa7134.h1
3 files changed, 66 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index fbc55616fafb..a433a9b7f1ee 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -32,6 +32,7 @@
32#include <media/tveeprom.h> 32#include <media/tveeprom.h>
33#include "tea5767.h" 33#include "tea5767.h"
34#include "tda18271.h" 34#include "tda18271.h"
35#include "xc5000.h"
35 36
36/* commly used strings */ 37/* commly used strings */
37static char name_mute[] = "mute"; 38static char name_mute[] = "mute";
@@ -5179,6 +5180,34 @@ struct saa7134_board saa7134_boards[] = {
5179 .amux = LINE1 5180 .amux = LINE1
5180 } }, 5181 } },
5181 }, 5182 },
5183 [SAA7134_BOARD_BEHOLD_X7] = {
5184 /* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
5185 .name = "Beholder BeholdTV X7",
5186 .audio_clock = 0x00187de7,
5187 .tuner_type = TUNER_XC5000,
5188 .radio_type = UNSET,
5189 .tuner_addr = ADDR_UNSET,
5190 .radio_addr = ADDR_UNSET,
5191 .inputs = { {
5192 .name = name_tv,
5193 .vmux = 2,
5194 .amux = TV,
5195 .tv = 1,
5196 }, {
5197 .name = name_comp1,
5198 .vmux = 0,
5199 .amux = LINE1,
5200 }, {
5201 .name = name_svideo,
5202 .vmux = 9,
5203 .amux = LINE1,
5204 } },
5205 .radio = {
5206 .name = name_radio,
5207 .amux = TV,
5208 },
5209 },
5210
5182}; 5211};
5183 5212
5184const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); 5213const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -6299,6 +6328,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
6299 .subdevice = 0xc900, 6328 .subdevice = 0xc900,
6300 .driver_data = SAA7134_BOARD_VIDEOMATE_S350, 6329 .driver_data = SAA7134_BOARD_VIDEOMATE_S350,
6301 }, { 6330 }, {
6331 .vendor = PCI_VENDOR_ID_PHILIPS,
6332 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
6333 .subvendor = 0x5ace, /* Beholder Intl. Ltd. */
6334 .subdevice = 0x7595,
6335 .driver_data = SAA7134_BOARD_BEHOLD_X7,
6336 }, {
6302 /* --- boards without eeprom + subsystem ID --- */ 6337 /* --- boards without eeprom + subsystem ID --- */
6303 .vendor = PCI_VENDOR_ID_PHILIPS, 6338 .vendor = PCI_VENDOR_ID_PHILIPS,
6304 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, 6339 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -6384,6 +6419,32 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev,
6384 return -EINVAL; 6419 return -EINVAL;
6385} 6420}
6386 6421
6422static int saa7134_xc5000_callback(struct saa7134_dev *dev,
6423 int command, int arg)
6424{
6425 switch (dev->board) {
6426 case SAA7134_BOARD_BEHOLD_X7:
6427 if (command == XC5000_TUNER_RESET) {
6428 /* Down and UP pheripherial RESET pin for reset all chips */
6429 saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
6430 msleep(10);
6431 saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
6432 msleep(10);
6433 }
6434 break;
6435 default:
6436 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x06e20000, 0x06e20000);
6437 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x06a20000, 0x06a20000);
6438 saa_andorl(SAA7133_ANALOG_IO_SELECT >> 2, 0x02, 0x02);
6439 saa_andorl(SAA7134_ANALOG_IN_CTRL1 >> 2, 0x81, 0x81);
6440 saa_andorl(SAA7134_AUDIO_CLOCK0 >> 2, 0x03187de7, 0x03187de7);
6441 saa_andorl(SAA7134_AUDIO_PLL_CTRL >> 2, 0x03, 0x03);
6442 saa_andorl(SAA7134_AUDIO_CLOCKS_PER_FIELD0 >> 2,
6443 0x0001e000, 0x0001e000);
6444 break;
6445 }
6446 return 0;
6447}
6387 6448
6388static int saa7134_tda8290_827x_callback(struct saa7134_dev *dev, 6449static int saa7134_tda8290_827x_callback(struct saa7134_dev *dev,
6389 int command, int arg) 6450 int command, int arg)
@@ -6480,6 +6541,8 @@ int saa7134_tuner_callback(void *priv, int component, int command, int arg)
6480 return saa7134_tda8290_callback(dev, command, arg); 6541 return saa7134_tda8290_callback(dev, command, arg);
6481 case TUNER_XC2028: 6542 case TUNER_XC2028:
6482 return saa7134_xc2028_callback(dev, command, arg); 6543 return saa7134_xc2028_callback(dev, command, arg);
6544 case TUNER_XC5000:
6545 return saa7134_xc5000_callback(dev, command, arg);
6483 } 6546 }
6484 } else { 6547 } else {
6485 printk(KERN_ERR "saa7134: Error - device struct undefined.\n"); 6548 printk(KERN_ERR "saa7134: Error - device struct undefined.\n");
@@ -6728,6 +6791,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
6728 case SAA7134_BOARD_BEHOLD_M63: 6791 case SAA7134_BOARD_BEHOLD_M63:
6729 case SAA7134_BOARD_BEHOLD_M6_EXTRA: 6792 case SAA7134_BOARD_BEHOLD_M6_EXTRA:
6730 case SAA7134_BOARD_BEHOLD_H6: 6793 case SAA7134_BOARD_BEHOLD_H6:
6794 case SAA7134_BOARD_BEHOLD_X7:
6731 dev->has_remote = SAA7134_REMOTE_I2C; 6795 dev->has_remote = SAA7134_REMOTE_I2C;
6732 break; 6796 break;
6733 case SAA7134_BOARD_AVERMEDIA_A169_B: 6797 case SAA7134_BOARD_AVERMEDIA_A169_B:
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index bfdecb953f96..355fd247c4bd 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -765,6 +765,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
765 case SAA7134_BOARD_BEHOLD_M63: 765 case SAA7134_BOARD_BEHOLD_M63:
766 case SAA7134_BOARD_BEHOLD_M6_EXTRA: 766 case SAA7134_BOARD_BEHOLD_M6_EXTRA:
767 case SAA7134_BOARD_BEHOLD_H6: 767 case SAA7134_BOARD_BEHOLD_H6:
768 case SAA7134_BOARD_BEHOLD_X7:
768 init_data.name = "BeholdTV"; 769 init_data.name = "BeholdTV";
769 init_data.get_key = get_key_beholdm6xx; 770 init_data.get_key = get_key_beholdm6xx;
770 init_data.ir_codes = ir_codes_behold; 771 init_data.ir_codes = ir_codes_behold;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 7bba44688bf9..caefbf07d6f8 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -294,6 +294,7 @@ struct saa7134_format {
294#define SAA7134_BOARD_BEHOLD_609RDS_MK5 168 294#define SAA7134_BOARD_BEHOLD_609RDS_MK5 168
295#define SAA7134_BOARD_VIDEOMATE_S350 169 295#define SAA7134_BOARD_VIDEOMATE_S350 169
296#define SAA7134_BOARD_AVERMEDIA_STUDIO_505 170 296#define SAA7134_BOARD_AVERMEDIA_STUDIO_505 170
297#define SAA7134_BOARD_BEHOLD_X7 171
297 298
298#define SAA7134_MAXBOARDS 32 299#define SAA7134_MAXBOARDS 32
299#define SAA7134_INPUT_MAX 8 300#define SAA7134_INPUT_MAX 8