V4L/DVB (7757): ivtv: add autodetect for the AVermedia M104 card
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 26 Apr 2008 12:19:44 +0000 (09:19 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 29 Apr 2008 21:41:34 +0000 (18:41 -0300)
Note that this card is only detected and not yet working.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-cards.c
drivers/media/video/ivtv/ivtv-cards.h
drivers/media/video/ivtv/ivtv-driver.c

index 33a2f58f66d7ccd1d657f8ceb0ea819e670e322f..75b01e89e641f4b8edebcb1f03db6a690b357b65 100644 (file)
@@ -1066,6 +1066,41 @@ static const struct ivtv_card ivtv_card_asus_falcon2 = {
        .i2c = &ivtv_i2c_std,
 };
 
+/* ------------------------------------------------------------------------- */
+
+/* AVerMedia M104 miniPCI card */
+
+static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
+       { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
+       { 0, 0, 0 }
+};
+
+static const struct ivtv_card ivtv_card_aver_m104 = {
+       .type = IVTV_CARD_AVER_M104,
+       .name = "AVerMedia M104",
+       .comment = "Not yet supported!\n",
+       .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
+       .hw_video = IVTV_HW_CX25840,
+       .hw_audio = IVTV_HW_CX25840,
+       .hw_audio_ctrl = IVTV_HW_CX25840,
+       .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
+       .video_inputs = {
+               { IVTV_CARD_INPUT_SVIDEO1,    0, CX25840_SVIDEO3    },
+               { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
+       },
+       .audio_inputs = {
+               { IVTV_CARD_INPUT_LINE_IN1,   CX25840_AUDIO_SERIAL, 1 },
+       },
+       .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
+       /* enable line-in + reset tuner */
+       .gpio_init = { .direction = 0xf000, .initial_value = 0x5000 },
+       .tuners = {
+               { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
+       },
+       .pci_list = ivtv_pci_aver_m104,
+       .i2c = &ivtv_i2c_std,
+};
+
 static const struct ivtv_card *ivtv_card_list[] = {
        &ivtv_card_pvr250,
        &ivtv_card_pvr350,
@@ -1091,6 +1126,7 @@ static const struct ivtv_card *ivtv_card_list[] = {
        &ivtv_card_asus_falcon2,
        &ivtv_card_aver_pvr150,
        &ivtv_card_aver_ezmaker,
+       &ivtv_card_aver_m104,
 
        /* Variations of standard cards but with the same PCI IDs.
           These cards must come last in this list. */
index bfb385c56099d16979e86a5433937c3af5fa4114..196c0445da63471f89661e458d296568d49fc6f4 100644 (file)
@@ -48,7 +48,8 @@
 #define IVTV_CARD_ASUS_FALCON2      21 /* ASUS Falcon2 */
 #define IVTV_CARD_AVER_PVR150PLUS    22 /* AVerMedia PVR-150 Plus */
 #define IVTV_CARD_AVER_EZMAKER       23 /* AVerMedia EZMaker PCI Deluxe */
-#define IVTV_CARD_LAST                      23
+#define IVTV_CARD_AVER_M104          24 /* AverMedia M104 miniPCI card */
+#define IVTV_CARD_LAST                      24
 
 /* Variants of existing cards but with the same PCI IDs. The driver
    detects these based on other device information.
index e6f319f7a1b9b7e9b0a5f0bc0ef33a5dd45e665e..da696e155fc6edbc306fa572b218b7453ed84c83 100644 (file)
@@ -190,6 +190,7 @@ MODULE_PARM_DESC(cardtype,
                 "\t\t\t22 = ASUS Falcon2\n"
                 "\t\t\t23 = AverMedia PVR-150 Plus\n"
                 "\t\t\t24 = AverMedia EZMaker PCI Deluxe\n"
+                "\t\t\t25 = AverMedia M104 (not yet working)\n"
                 "\t\t\t 0 = Autodetect (default)\n"
                 "\t\t\t-1 = Ignore this card\n\t\t");
 MODULE_PARM_DESC(pal, "Set PAL standard: BGH, DK, I, M, N, Nc, 60");