aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-cards.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:35:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:35:11 -0400
commit0851668fdd97e526b2a41f794b785c204dd3d3e0 (patch)
tree4ef7c20a8be8393006c6fe9627eb29dd30877d61 /drivers/media/video/cx88/cx88-cards.c
parent00ebb6382b8d9c7c15b5f8ad230670d8161d38dd (diff)
parent7655e594945289b418af39f6669fea4666a7b520 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index e8416b76da67..b26fcba8600c 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -970,15 +970,22 @@ static const struct cx88_board cx88_boards[] = {
970 .radio_type = UNSET, 970 .radio_type = UNSET,
971 .tuner_addr = ADDR_UNSET, 971 .tuner_addr = ADDR_UNSET,
972 .radio_addr = ADDR_UNSET, 972 .radio_addr = ADDR_UNSET,
973 .audio_chip = V4L2_IDENT_WM8775,
973 .input = {{ 974 .input = {{
974 .type = CX88_VMUX_DVB, 975 .type = CX88_VMUX_DVB,
975 .vmux = 0, 976 .vmux = 0,
977 /* 2: Line-In */
978 .audioroute = 2,
976 },{ 979 },{
977 .type = CX88_VMUX_COMPOSITE1, 980 .type = CX88_VMUX_COMPOSITE1,
978 .vmux = 1, 981 .vmux = 1,
982 /* 2: Line-In */
983 .audioroute = 2,
979 },{ 984 },{
980 .type = CX88_VMUX_SVIDEO, 985 .type = CX88_VMUX_SVIDEO,
981 .vmux = 2, 986 .vmux = 2,
987 /* 2: Line-In */
988 .audioroute = 2,
982 }}, 989 }},
983 .mpeg = CX88_MPEG_DVB, 990 .mpeg = CX88_MPEG_DVB,
984 }, 991 },
@@ -2104,6 +2111,18 @@ static const struct cx88_board cx88_boards[] = {
2104 } }, 2111 } },
2105 .mpeg = CX88_MPEG_DVB, 2112 .mpeg = CX88_MPEG_DVB,
2106 }, 2113 },
2114 [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
2115 .name = "Twinhan VP-1027 DVB-S",
2116 .tuner_type = TUNER_ABSENT,
2117 .radio_type = UNSET,
2118 .tuner_addr = ADDR_UNSET,
2119 .radio_addr = ADDR_UNSET,
2120 .input = {{
2121 .type = CX88_VMUX_DVB,
2122 .vmux = 0,
2123 } },
2124 .mpeg = CX88_MPEG_DVB,
2125 },
2107}; 2126};
2108 2127
2109/* ------------------------------------------------------------------ */ 2128/* ------------------------------------------------------------------ */
@@ -2576,6 +2595,10 @@ static const struct cx88_subid cx88_subids[] = {
2576 .subvendor = 0xb034, 2595 .subvendor = 0xb034,
2577 .subdevice = 0x3034, 2596 .subdevice = 0x3034,
2578 .card = CX88_BOARD_PROF_7301, 2597 .card = CX88_BOARD_PROF_7301,
2598 }, {
2599 .subvendor = 0x1822,
2600 .subdevice = 0x0023,
2601 .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
2579 }, 2602 },
2580}; 2603};
2581 2604
@@ -2673,10 +2696,10 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2673/* ----------------------------------------------------------------------- */ 2696/* ----------------------------------------------------------------------- */
2674/* some GDI (was: Modular Technology) specific stuff */ 2697/* some GDI (was: Modular Technology) specific stuff */
2675 2698
2676static struct { 2699static const struct {
2677 int id; 2700 int id;
2678 int fm; 2701 int fm;
2679 char *name; 2702 const char *name;
2680} gdi_tuner[] = { 2703} gdi_tuner[] = {
2681 [ 0x01 ] = { .id = TUNER_ABSENT, 2704 [ 0x01 ] = { .id = TUNER_ABSENT,
2682 .name = "NTSC_M" }, 2705 .name = "NTSC_M" },
@@ -2710,7 +2733,7 @@ static struct {
2710 2733
2711static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data) 2734static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2712{ 2735{
2713 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner)) 2736 const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2714 ? gdi_tuner[eeprom_data[0x0d]].name : NULL; 2737 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2715 2738
2716 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown"); 2739 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
@@ -3070,6 +3093,13 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core)
3070 cx_set(MO_GP1_IO, 0x10); 3093 cx_set(MO_GP1_IO, 0x10);
3071 mdelay(50); 3094 mdelay(50);
3072 break; 3095 break;
3096
3097 case CX88_BOARD_TWINHAN_VP1027_DVBS:
3098 cx_write(MO_GP0_IO, 0x00003230);
3099 cx_write(MO_GP0_IO, 0x00003210);
3100 msleep(1);
3101 cx_write(MO_GP0_IO, 0x00001230);
3102 break;
3073 } 3103 }
3074} 3104}
3075 3105
@@ -3485,19 +3515,19 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3485 later code configures a tea5767. 3515 later code configures a tea5767.
3486 */ 3516 */
3487 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, 3517 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
3488 "tuner", "tuner", 3518 NULL, "tuner",
3489 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); 3519 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3490 if (has_demod) 3520 if (has_demod)
3491 v4l2_i2c_new_subdev(&core->v4l2_dev, 3521 v4l2_i2c_new_subdev(&core->v4l2_dev,
3492 &core->i2c_adap, "tuner", "tuner", 3522 &core->i2c_adap, NULL, "tuner",
3493 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); 3523 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3494 if (core->board.tuner_addr == ADDR_UNSET) { 3524 if (core->board.tuner_addr == ADDR_UNSET) {
3495 v4l2_i2c_new_subdev(&core->v4l2_dev, 3525 v4l2_i2c_new_subdev(&core->v4l2_dev,
3496 &core->i2c_adap, "tuner", "tuner", 3526 &core->i2c_adap, NULL, "tuner",
3497 0, has_demod ? tv_addrs + 4 : tv_addrs); 3527 0, has_demod ? tv_addrs + 4 : tv_addrs);
3498 } else { 3528 } else {
3499 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, 3529 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
3500 "tuner", "tuner", core->board.tuner_addr, NULL); 3530 NULL, "tuner", core->board.tuner_addr, NULL);
3501 } 3531 }
3502 } 3532 }
3503 3533