As showing in attached patch, I made some little changes for
ivtv-card.h and ivtv-card.c to apply to AverMedia's M155-A.

 This card has same PCI ID/Subsystem ID to Nagase Transgear 5000TV. So
that in my patch, M155-A is defined as a variant of 5000TV.

 I'm sorry that M155-A won't be autodetected. I don't know how to
autodetect it. So you must specify cardtype:

 # modprobe ivtv cardtype=25

 For example, IVTV_CARD_CX23416GYC has 2 variants:
IVTV_CARD_CX23416GYC_NOGR and IVTV_CARD_CX23416GYC_NOGRYCS.
 Are these variants autodetected?
 If so, please teach me how to do it.

--
Hatsuki Maruyama

diff -ur linux-2.6.24.3/drivers/media/video/ivtv/ivtv-cards.c 
linux-2.6.24.3-ivtv-m155a/drivers/media/video/ivtv/ivtv-cards.c
--- linux-2.6.24.3/drivers/media/video/ivtv/ivtv-cards.c        2008-02-26 
09:20:20.000000000 +0900
+++ linux-2.6.24.3-ivtv-m155a/drivers/media/video/ivtv/ivtv-cards.c     
2008-03-20 03:23:28.000000000 +0900
@@ -465,6 +465,38 @@
        .pci_list = ivtv_pci_tg5000tv,
 };
 
+/* AverMedia M155-A card */
+static const struct ivtv_card ivtv_card_m155a = {
+        // Below are originally from ITVC16-STVLP
+       .type = IVTV_CARD_M155A,
+       .name = "AverMedia M155-A",
+       .v4l2_capabilities = IVTV_CAP_ENCODER,
+       .hw_video = IVTV_HW_SAA7115,
+       .hw_audio = IVTV_HW_GPIO,
+       .hw_audio_ctrl = IVTV_HW_GPIO,
+       .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
+       .video_inputs = {
+               { IVTV_CARD_INPUT_VID_TUNER,  0, IVTV_SAA71XX_COMPOSITE4 },
+               { IVTV_CARD_INPUT_SVIDEO1,    1, IVTV_SAA71XX_SVIDEO0    },
+               { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
+       },
+       // Below are originally from Transgear 5000TV
+       .audio_inputs = {
+               { IVTV_CARD_INPUT_AUD_TUNER,  IVTV_GPIO_TUNER   },
+               { IVTV_CARD_INPUT_LINE_IN1,   IVTV_GPIO_LINE_IN },
+       },
+       .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
+       .gpio_audio_input  = { .mask = 0x8080, .tuner  = 0x8000, .linein = 
0x0080 },
+       .gpio_audio_mute   = { .mask = 0x6000, .mute   = 0x6000 },
+       .gpio_audio_mode   = { .mask = 0x4300, .mono   = 0x4000, .stereo = 
0x0200,
+                             .lang1 = 0x0300, .lang2  = 0x0000, .both   = 
0x0200 },
+       .gpio_video_input  = { .mask = 0x0030, .tuner  = 0x0000,
+                         .composite = 0x0010, .svideo = 0x0020 },
+       .tuners = {
+               { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
+       },
+};
+
 /* ------------------------------------------------------------------------- */
 
 /* AOpen VA2000MAX-SNT6 card */
@@ -943,6 +975,7 @@
        &ivtv_card_pvr350_v1,
        &ivtv_card_cx23416gyc_nogr,
        &ivtv_card_cx23416gyc_nogrycs,
+       &ivtv_card_m155a,
 };
 
 const struct ivtv_card *ivtv_get_card(u16 index)
diff -ur linux-2.6.24.3/drivers/media/video/ivtv/ivtv-cards.h 
linux-2.6.24.3-ivtv-m155a/drivers/media/video/ivtv/ivtv-cards.h
--- linux-2.6.24.3/drivers/media/video/ivtv/ivtv-cards.h        2008-02-26 
09:20:20.000000000 +0900
+++ linux-2.6.24.3-ivtv-m155a/drivers/media/video/ivtv/ivtv-cards.h     
2008-03-20 03:22:51.000000000 +0900
@@ -58,6 +58,8 @@
 /* 2 variants of Kuroutoshikou CX23416GYC-STVLP (Yuan MPG600GR OEM) */
 #define IVTV_CARD_CX23416GYC_NOGR    (IVTV_CARD_LAST+2)
 #define IVTV_CARD_CX23416GYC_NOGRYCS (IVTV_CARD_LAST+3)
+/* AverMedia M155-A (No GR/YCS version of Transgear 5000TV? */
+#define IVTV_CARD_M155A              (IVTV_CARD_LAST+4)
 
 /* system vendor and device IDs */
 #define PCI_VENDOR_ID_ICOMP  0x4444
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to