diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-10-30 04:50:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:01:50 -0500 |
commit | e2a1774d9c8b866db65853fd1a17e5f472dd5cf2 (patch) | |
tree | b1269a546476bb6102b0b14c577b31ba5367df19 /drivers/media | |
parent | 05e997197e459a03df577ba49c34c1820957ee4a (diff) |
V4L/DVB (6488): ivtv: add ASUS Falcon2 support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/ivtv/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-cards.c | 40 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-cards.h | 7 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 5 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-routing.c | 25 |
6 files changed, 66 insertions, 15 deletions
diff --git a/drivers/media/video/ivtv/Kconfig b/drivers/media/video/ivtv/Kconfig index 854cc9c30ca9..6e5eed5e2438 100644 --- a/drivers/media/video/ivtv/Kconfig +++ b/drivers/media/video/ivtv/Kconfig | |||
@@ -12,6 +12,7 @@ config VIDEO_IVTV | |||
12 | select VIDEO_SAA7127 | 12 | select VIDEO_SAA7127 |
13 | select VIDEO_TVAUDIO | 13 | select VIDEO_TVAUDIO |
14 | select VIDEO_CS53L32A | 14 | select VIDEO_CS53L32A |
15 | select VIDEO_M52790 | ||
15 | select VIDEO_WM8775 | 16 | select VIDEO_WM8775 |
16 | select VIDEO_WM8739 | 17 | select VIDEO_WM8739 |
17 | select VIDEO_VP27SMPX | 18 | select VIDEO_VP27SMPX |
diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c index aaa114b5c268..3211809fe0c8 100644 --- a/drivers/media/video/ivtv/ivtv-cards.c +++ b/drivers/media/video/ivtv/ivtv-cards.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "ivtv-i2c.h" | 23 | #include "ivtv-i2c.h" |
24 | 24 | ||
25 | #include <media/msp3400.h> | 25 | #include <media/msp3400.h> |
26 | #include <media/m52790.h> | ||
26 | #include <media/wm8775.h> | 27 | #include <media/wm8775.h> |
27 | #include <media/cs53l32a.h> | 28 | #include <media/cs53l32a.h> |
28 | #include <media/cx25840.h> | 29 | #include <media/cx25840.h> |
@@ -915,6 +916,44 @@ static const struct ivtv_card ivtv_card_avertv_mce116 = { | |||
915 | .pci_list = ivtv_pci_avertv_mce116, | 916 | .pci_list = ivtv_pci_avertv_mce116, |
916 | }; | 917 | }; |
917 | 918 | ||
919 | /* ------------------------------------------------------------------------- */ | ||
920 | |||
921 | /* ASUS Falcon2 */ | ||
922 | |||
923 | static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = { | ||
924 | { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 }, | ||
925 | { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e }, | ||
926 | { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e }, | ||
927 | { 0, 0, 0 } | ||
928 | }; | ||
929 | |||
930 | static const struct ivtv_card ivtv_card_asus_falcon2 = { | ||
931 | .type = IVTV_CARD_ASUS_FALCON2, | ||
932 | .name = "ASUS Falcon2", | ||
933 | .v4l2_capabilities = IVTV_CAP_ENCODER, | ||
934 | .hw_video = IVTV_HW_CX25840, | ||
935 | .hw_audio = IVTV_HW_CX25840, | ||
936 | .hw_audio_ctrl = IVTV_HW_CX25840, | ||
937 | .hw_muxer = IVTV_HW_M52790, | ||
938 | .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER, | ||
939 | .video_inputs = { | ||
940 | { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 }, | ||
941 | { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 }, | ||
942 | { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 }, | ||
943 | }, | ||
944 | .audio_inputs = { | ||
945 | { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER }, | ||
946 | { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, | ||
947 | M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX }, | ||
948 | { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 }, | ||
949 | }, | ||
950 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER }, | ||
951 | .tuners = { | ||
952 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | ||
953 | }, | ||
954 | .pci_list = ivtv_pci_asus_falcon2, | ||
955 | }; | ||
956 | |||
918 | static const struct ivtv_card *ivtv_card_list[] = { | 957 | static const struct ivtv_card *ivtv_card_list[] = { |
919 | &ivtv_card_pvr250, | 958 | &ivtv_card_pvr250, |
920 | &ivtv_card_pvr350, | 959 | &ivtv_card_pvr350, |
@@ -937,6 +976,7 @@ static const struct ivtv_card *ivtv_card_list[] = { | |||
937 | &ivtv_card_pg600v2, | 976 | &ivtv_card_pg600v2, |
938 | &ivtv_card_club3d, | 977 | &ivtv_card_club3d, |
939 | &ivtv_card_avertv_mce116, | 978 | &ivtv_card_avertv_mce116, |
979 | &ivtv_card_asus_falcon2, | ||
940 | 980 | ||
941 | /* Variations of standard cards but with the same PCI IDs. | 981 | /* Variations of standard cards but with the same PCI IDs. |
942 | These cards must come last in this list. */ | 982 | These cards must come last in this list. */ |
diff --git a/drivers/media/video/ivtv/ivtv-cards.h b/drivers/media/video/ivtv/ivtv-cards.h index ff46e5ae8653..81707bbb60dc 100644 --- a/drivers/media/video/ivtv/ivtv-cards.h +++ b/drivers/media/video/ivtv/ivtv-cards.h | |||
@@ -45,7 +45,8 @@ | |||
45 | #define IVTV_CARD_PG600V2 18 /* Yuan PG600V2/GotView PCI DVD Lite */ | 45 | #define IVTV_CARD_PG600V2 18 /* Yuan PG600V2/GotView PCI DVD Lite */ |
46 | #define IVTV_CARD_CLUB3D 19 /* Club3D ZAP-TV1x01 */ | 46 | #define IVTV_CARD_CLUB3D 19 /* Club3D ZAP-TV1x01 */ |
47 | #define IVTV_CARD_AVERTV_MCE116 20 /* AVerTV MCE 116 Plus */ | 47 | #define IVTV_CARD_AVERTV_MCE116 20 /* AVerTV MCE 116 Plus */ |
48 | #define IVTV_CARD_LAST 20 | 48 | #define IVTV_CARD_ASUS_FALCON2 21 /* ASUS Falcon2 */ |
49 | #define IVTV_CARD_LAST 21 | ||
49 | 50 | ||
50 | /* Variants of existing cards but with the same PCI IDs. The driver | 51 | /* Variants of existing cards but with the same PCI IDs. The driver |
51 | detects these based on other device information. | 52 | detects these based on other device information. |
@@ -69,6 +70,7 @@ | |||
69 | #define IVTV_PCI_ID_HAUPPAUGE_ALT1 0x0270 | 70 | #define IVTV_PCI_ID_HAUPPAUGE_ALT1 0x0270 |
70 | #define IVTV_PCI_ID_HAUPPAUGE_ALT2 0x4070 | 71 | #define IVTV_PCI_ID_HAUPPAUGE_ALT2 0x4070 |
71 | #define IVTV_PCI_ID_ADAPTEC 0x9005 | 72 | #define IVTV_PCI_ID_ADAPTEC 0x9005 |
73 | #define IVTV_PCI_ID_ASUSTEK 0x1043 | ||
72 | #define IVTV_PCI_ID_AVERMEDIA 0x1461 | 74 | #define IVTV_PCI_ID_AVERMEDIA 0x1461 |
73 | #define IVTV_PCI_ID_YUAN1 0x12ab | 75 | #define IVTV_PCI_ID_YUAN1 0x12ab |
74 | #define IVTV_PCI_ID_YUAN2 0xff01 | 76 | #define IVTV_PCI_ID_YUAN2 0xff01 |
@@ -96,7 +98,8 @@ | |||
96 | #define IVTV_HW_SAA717X (1 << 12) | 98 | #define IVTV_HW_SAA717X (1 << 12) |
97 | #define IVTV_HW_WM8739 (1 << 13) | 99 | #define IVTV_HW_WM8739 (1 << 13) |
98 | #define IVTV_HW_VP27SMPX (1 << 14) | 100 | #define IVTV_HW_VP27SMPX (1 << 14) |
99 | #define IVTV_HW_GPIO (1 << 15) | 101 | #define IVTV_HW_M52790 (1 << 15) |
102 | #define IVTV_HW_GPIO (1 << 16) | ||
100 | 103 | ||
101 | #define IVTV_HW_SAA711X (IVTV_HW_SAA7115 | IVTV_HW_SAA7114) | 104 | #define IVTV_HW_SAA711X (IVTV_HW_SAA7115 | IVTV_HW_SAA7114) |
102 | 105 | ||
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index ec40453e46e4..a8aca14f98a8 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -185,6 +185,7 @@ MODULE_PARM_DESC(cardtype, | |||
185 | "\t\t\t19 = Yuan PG600V2/GotView PCI DVD Lite\n" | 185 | "\t\t\t19 = Yuan PG600V2/GotView PCI DVD Lite\n" |
186 | "\t\t\t20 = Club3D ZAP-TV1x01\n" | 186 | "\t\t\t20 = Club3D ZAP-TV1x01\n" |
187 | "\t\t\t21 = AverTV MCE 116 Plus\n" | 187 | "\t\t\t21 = AverTV MCE 116 Plus\n" |
188 | "\t\t\t22 = ASUS Falcon2\n" | ||
188 | "\t\t\t 0 = Autodetect (default)\n" | 189 | "\t\t\t 0 = Autodetect (default)\n" |
189 | "\t\t\t-1 = Ignore this card\n\t\t"); | 190 | "\t\t\t-1 = Ignore this card\n\t\t"); |
190 | MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60"); | 191 | MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60"); |
@@ -882,6 +883,10 @@ static void ivtv_load_and_init_modules(struct ivtv *itv) | |||
882 | if (hw & IVTV_HW_CS53L32A) | 883 | if (hw & IVTV_HW_CS53L32A) |
883 | ivtv_request_module(itv, "cs53l32a"); | 884 | ivtv_request_module(itv, "cs53l32a"); |
884 | #endif | 885 | #endif |
886 | #ifndef CONFIG_VIDEO_M52790 | ||
887 | if (hw & IVTV_HW_M52790) | ||
888 | ivtv_request_module(itv, "m52790"); | ||
889 | #endif | ||
885 | 890 | ||
886 | /* check which i2c devices are actually found */ | 891 | /* check which i2c devices are actually found */ |
887 | for (i = 0; i < 32; i++) { | 892 | for (i = 0; i < 32; i++) { |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 36e54f78aa2a..7f513ecc0781 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -80,6 +80,7 @@ | |||
80 | #endif /* I2C_ADAP_CLASS_TV_ANALOG */ | 80 | #endif /* I2C_ADAP_CLASS_TV_ANALOG */ |
81 | 81 | ||
82 | #define IVTV_CS53L32A_I2C_ADDR 0x11 | 82 | #define IVTV_CS53L32A_I2C_ADDR 0x11 |
83 | #define IVTV_M52790_I2C_ADDR 0x48 | ||
83 | #define IVTV_CX25840_I2C_ADDR 0x44 | 84 | #define IVTV_CX25840_I2C_ADDR 0x44 |
84 | #define IVTV_SAA7115_I2C_ADDR 0x21 | 85 | #define IVTV_SAA7115_I2C_ADDR 0x21 |
85 | #define IVTV_SAA7127_I2C_ADDR 0x44 | 86 | #define IVTV_SAA7127_I2C_ADDR 0x44 |
@@ -110,6 +111,7 @@ static const u8 hw_driverids[] = { | |||
110 | I2C_DRIVERID_SAA717X, | 111 | I2C_DRIVERID_SAA717X, |
111 | I2C_DRIVERID_WM8739, | 112 | I2C_DRIVERID_WM8739, |
112 | I2C_DRIVERID_VP27SMPX, | 113 | I2C_DRIVERID_VP27SMPX, |
114 | I2C_DRIVERID_M52790, | ||
113 | 0 /* IVTV_HW_GPIO dummy driver ID */ | 115 | 0 /* IVTV_HW_GPIO dummy driver ID */ |
114 | }; | 116 | }; |
115 | 117 | ||
@@ -130,6 +132,7 @@ static const char * const hw_drivernames[] = { | |||
130 | "saa717x", | 132 | "saa717x", |
131 | "wm8739", | 133 | "wm8739", |
132 | "vp27smpx", | 134 | "vp27smpx", |
135 | "m52790", | ||
133 | "gpio", | 136 | "gpio", |
134 | }; | 137 | }; |
135 | 138 | ||
diff --git a/drivers/media/video/ivtv/ivtv-routing.c b/drivers/media/video/ivtv/ivtv-routing.c index 398bd33033ed..05564919b57f 100644 --- a/drivers/media/video/ivtv/ivtv-routing.c +++ b/drivers/media/video/ivtv/ivtv-routing.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "ivtv-routing.h" | 25 | #include "ivtv-routing.h" |
26 | 26 | ||
27 | #include <media/msp3400.h> | 27 | #include <media/msp3400.h> |
28 | #include <media/m52790.h> | ||
28 | #include <media/upd64031a.h> | 29 | #include <media/upd64031a.h> |
29 | #include <media/upd64083.h> | 30 | #include <media/upd64083.h> |
30 | 31 | ||
@@ -32,28 +33,26 @@ | |||
32 | settings. */ | 33 | settings. */ |
33 | void ivtv_audio_set_io(struct ivtv *itv) | 34 | void ivtv_audio_set_io(struct ivtv *itv) |
34 | { | 35 | { |
36 | const struct ivtv_card_audio_input *in; | ||
35 | struct v4l2_routing route; | 37 | struct v4l2_routing route; |
36 | u32 audio_input; | ||
37 | int mux_input; | ||
38 | 38 | ||
39 | /* Determine which input to use */ | 39 | /* Determine which input to use */ |
40 | if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) { | 40 | if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) |
41 | audio_input = itv->card->radio_input.audio_input; | 41 | in = &itv->card->radio_input; |
42 | mux_input = itv->card->radio_input.muxer_input; | 42 | else |
43 | } else { | 43 | in = &itv->card->audio_inputs[itv->audio_input]; |
44 | audio_input = itv->card->audio_inputs[itv->audio_input].audio_input; | ||
45 | mux_input = itv->card->audio_inputs[itv->audio_input].muxer_input; | ||
46 | } | ||
47 | 44 | ||
48 | /* handle muxer chips */ | 45 | /* handle muxer chips */ |
49 | route.input = mux_input; | 46 | route.input = in->muxer_input; |
50 | route.output = 0; | 47 | route.output = 0; |
48 | if (itv->card->hw_muxer & IVTV_HW_M52790) | ||
49 | route.output = M52790_OUT_STEREO; | ||
51 | ivtv_i2c_hw(itv, itv->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route); | 50 | ivtv_i2c_hw(itv, itv->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route); |
52 | 51 | ||
53 | route.input = audio_input; | 52 | route.input = in->audio_input; |
54 | if (itv->card->hw_audio & IVTV_HW_MSP34XX) { | 53 | route.output = 0; |
54 | if (itv->card->hw_audio & IVTV_HW_MSP34XX) | ||
55 | route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1); | 55 | route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1); |
56 | } | ||
57 | ivtv_i2c_hw(itv, itv->card->hw_audio, VIDIOC_INT_S_AUDIO_ROUTING, &route); | 56 | ivtv_i2c_hw(itv, itv->card->hw_audio, VIDIOC_INT_S_AUDIO_ROUTING, &route); |
58 | } | 57 | } |
59 | 58 | ||