diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2010-01-22 02:55:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:52 -0500 |
commit | 0b32d65cd7938d31eebd9c62aab6a59a3c4cf0f8 (patch) | |
tree | c6e700cc5fc745c4a60cb25ec13c0181183fc5e5 /drivers/media/video | |
parent | b38aa09df33d931defe4958582e826db59a9731c (diff) |
V4L/DVB: cx23885: Add support for LEADTEK WinFast PxTV1200
I tested only tv and composite. Video works fine but no audio.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 32 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 13 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 1 |
3 files changed, 46 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 1ec48169277d..d639186f645d 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -274,6 +274,31 @@ struct cx23885_board cx23885_boards[] = { | |||
274 | .portb = CX23885_MPEG_DVB, | 274 | .portb = CX23885_MPEG_DVB, |
275 | .portc = CX23885_MPEG_DVB, | 275 | .portc = CX23885_MPEG_DVB, |
276 | }, | 276 | }, |
277 | [CX23885_BOARD_LEADTEK_WINFAST_PXTV1200] = { | ||
278 | .name = "LEADTEK WinFast PxTV1200", | ||
279 | .porta = CX23885_ANALOG_VIDEO, | ||
280 | .tuner_type = TUNER_XC2028, | ||
281 | .tuner_addr = 0x61, | ||
282 | .input = {{ | ||
283 | .type = CX23885_VMUX_TELEVISION, | ||
284 | .vmux = CX25840_VIN2_CH1 | | ||
285 | CX25840_VIN5_CH2 | | ||
286 | CX25840_NONE0_CH3, | ||
287 | }, { | ||
288 | .type = CX23885_VMUX_COMPOSITE1, | ||
289 | .vmux = CX25840_COMPOSITE1, | ||
290 | }, { | ||
291 | .type = CX23885_VMUX_SVIDEO, | ||
292 | .vmux = CX25840_SVIDEO_LUMA3 | | ||
293 | CX25840_SVIDEO_CHROMA4, | ||
294 | }, { | ||
295 | .type = CX23885_VMUX_COMPONENT, | ||
296 | .vmux = CX25840_VIN7_CH1 | | ||
297 | CX25840_VIN6_CH2 | | ||
298 | CX25840_VIN8_CH3 | | ||
299 | CX25840_COMPONENT_ON, | ||
300 | } }, | ||
301 | }, | ||
277 | }; | 302 | }; |
278 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 303 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
279 | 304 | ||
@@ -417,6 +442,10 @@ struct cx23885_subid cx23885_subids[] = { | |||
417 | .subvendor = 0x14f1, | 442 | .subvendor = 0x14f1, |
418 | .subdevice = 0x8578, | 443 | .subdevice = 0x8578, |
419 | .card = CX23885_BOARD_MYGICA_X8558PRO, | 444 | .card = CX23885_BOARD_MYGICA_X8558PRO, |
445 | }, { | ||
446 | .subvendor = 0x107d, | ||
447 | .subdevice = 0x6f22, | ||
448 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXTV1200, | ||
420 | }, | 449 | }, |
421 | }; | 450 | }; |
422 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 451 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -617,6 +646,7 @@ int cx23885_tuner_callback(void *priv, int component, int command, int arg) | |||
617 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | 646 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
618 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: | 647 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
619 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: | 648 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
649 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: | ||
620 | /* Tuner Reset Command */ | 650 | /* Tuner Reset Command */ |
621 | bitmask = 0x04; | 651 | bitmask = 0x04; |
622 | break; | 652 | break; |
@@ -769,6 +799,7 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
769 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | 799 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
770 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: | 800 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
771 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: | 801 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
802 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: | ||
772 | /* GPIO-2 xc3028 tuner reset */ | 803 | /* GPIO-2 xc3028 tuner reset */ |
773 | 804 | ||
774 | /* The following GPIO's are on the internal AVCore (cx25840) */ | 805 | /* The following GPIO's are on the internal AVCore (cx25840) */ |
@@ -1076,6 +1107,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
1076 | case CX23885_BOARD_MYGICA_X8506: | 1107 | case CX23885_BOARD_MYGICA_X8506: |
1077 | case CX23885_BOARD_MAGICPRO_PROHDTVE2: | 1108 | case CX23885_BOARD_MAGICPRO_PROHDTVE2: |
1078 | case CX23885_BOARD_HAUPPAUGE_HVR1290: | 1109 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
1110 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: | ||
1079 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 1111 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1080 | &dev->i2c_bus[2].i2c_adap, | 1112 | &dev->i2c_bus[2].i2c_adap, |
1081 | "cx25840", "cx25840", 0x88 >> 1, NULL); | 1113 | "cx25840", "cx25840", 0x88 >> 1, NULL); |
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 8934d61cf660..2d3ac8b83dc3 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ioctl.h> | 37 | #include <media/v4l2-ioctl.h> |
38 | #include "cx23885-ioctl.h" | 38 | #include "cx23885-ioctl.h" |
39 | #include "tuner-xc2028.h" | ||
39 | 40 | ||
40 | MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards"); | 41 | MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards"); |
41 | MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>"); | 42 | MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>"); |
@@ -1505,6 +1506,18 @@ int cx23885_video_register(struct cx23885_dev *dev) | |||
1505 | tun_setup.tuner_callback = cx23885_tuner_callback; | 1506 | tun_setup.tuner_callback = cx23885_tuner_callback; |
1506 | 1507 | ||
1507 | v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup); | 1508 | v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup); |
1509 | |||
1510 | if (dev->board == CX23885_BOARD_LEADTEK_WINFAST_PXTV1200) { | ||
1511 | struct xc2028_ctrl ctrl = { | ||
1512 | .fname = XC2028_DEFAULT_FIRMWARE, | ||
1513 | .max_len = 64 | ||
1514 | }; | ||
1515 | struct v4l2_priv_tun_config cfg = { | ||
1516 | .tuner = dev->tuner_type, | ||
1517 | .priv = &ctrl | ||
1518 | }; | ||
1519 | v4l2_subdev_call(sd, tuner, s_config, &cfg); | ||
1520 | } | ||
1508 | } | 1521 | } |
1509 | } | 1522 | } |
1510 | 1523 | ||
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 08b3f6b136a0..0e3a98d243c5 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -81,6 +81,7 @@ | |||
81 | #define CX23885_BOARD_COMPRO_VIDEOMATE_E800 25 | 81 | #define CX23885_BOARD_COMPRO_VIDEOMATE_E800 25 |
82 | #define CX23885_BOARD_HAUPPAUGE_HVR1290 26 | 82 | #define CX23885_BOARD_HAUPPAUGE_HVR1290 26 |
83 | #define CX23885_BOARD_MYGICA_X8558PRO 27 | 83 | #define CX23885_BOARD_MYGICA_X8558PRO 27 |
84 | #define CX23885_BOARD_LEADTEK_WINFAST_PXTV1200 28 | ||
84 | 85 | ||
85 | #define GPIO_0 0x00000001 | 86 | #define GPIO_0 0x00000001 |
86 | #define GPIO_1 0x00000002 | 87 | #define GPIO_1 0x00000002 |