Hi Below are the patches to automatically detect the Adaptec AVC-2410 and the AVC-2010. I will post the code for the cs53l32a module separately. This code works but needs improvements to fully support the cards.
Best Regards Trev ********************PATCH FOR tuner.c************************ --- tuner.c.old 2005-09-14 17:18:22.000000000 +0100 +++ tuner.c 2005-09-14 17:18:12.000000000 +0100 @@ -257,7 +257,7 @@ {"LG PAL (newer TAPC series)", LGINNOTEK, PAL, 16 * 170.00, 16 * 450.00, 0x01, 0x02, 0x08, 0xce, 623}, {"Philips PAL/SECAM multi (FM1216ME MK3)", Philips, PAL, - 16 * 160.00, 16 * 442.00, 0x01, 0x02, 0x04, 0xce, 623}, + 16 * 160.00, 16 * 442.00, 0x01, 0x02, 0x04, 0x8e, 623}, {"LG NTSC (newer TAPC series)", LGINNOTEK, NTSC, 16 * 170.00, 16 * 450.00, 0x01, 0x02, 0x08, 0x8e, 732}, {"HITACHI V7-J180AT", HITACHI, NTSC, ********************PATCH FOR ivtv-i2c.c************************ --- ivtv-i2c.c.old 2005-09-13 19:12:38.000000000 +0100 +++ ivtv-i2c.c 2005-09-13 19:16:39.000000000 +0100 @@ -31,6 +31,7 @@ #define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG #endif /* I2C_ADAP_CLASS_TV_ANALOG */ +#define IVTV_CS53L32A_I2C_ADDR 0x11 #define IVTV_CX25840_I2C_ADDR 0x44 #define IVTV_SAA7115_I2C_ADDR 0x21 #define IVTV_SAA7127_I2C_ADDR 0x44 @@ -232,6 +233,11 @@ return ivtv_call_i2c_client(itv, IVTV_WM8775_I2C_ADDR, cmd, arg); } +int ivtv_cs53l32a(struct ivtv *itv, unsigned int cmd, void *arg) +{ + return ivtv_call_i2c_client(itv, IVTV_CS53L32A_I2C_ADDR, cmd, arg); +} + int ivtv_cx25840(struct ivtv *itv, unsigned int cmd, void *arg) { return ivtv_call_i2c_client(itv, IVTV_CX25840_I2C_ADDR, cmd, arg); ********************PATCH FOR ivtv-i2c.h************************ --- ivtv-i2c.h.old 2005-09-13 19:29:24.000000000 +0100 +++ ivtv-i2c.h 2005-09-13 19:31:10.000000000 +0100 @@ -17,6 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +int ivtv_cs53l32a(struct ivtv *itv, unsigned int cmd, void *arg); int ivtv_wm8775(struct ivtv *itv, unsigned int cmd, void *arg); int ivtv_cx25840(struct ivtv *itv, unsigned int cmd, void *arg); int ivtv_saa7115(struct ivtv *itv, unsigned int cmd, void *arg); ********************PATCH FOR ivtv-driver.c************************ --- ivtv-driver.c.old 2005-09-13 17:24:40.000000000 +0100 +++ ivtv-driver.c 2005-09-13 18:45:38.000000000 +0100 @@ -268,6 +268,8 @@ "\t\t\t5 = YUAN MPG160/Kuroutoshikou iTVC15-STVLP\n" "\t\t\t6 = WinTV PVR-150 or PVR-500\n" "\t\t\t7 = YUAN PG600/DIAMONDMM PVR-550 (CX Falcon 2)\n" + "\t\t\t8 = Adaptec AVC-2410\n" + "\t\t\t9 = Adaptec AVC-2010\n" "\t\t\tDefault: Autodetect"); MODULE_PARM_DESC(ivtv_debug, "Debug level (bitmask). Default: errors only\n" @@ -1089,6 +1091,13 @@ ivtv_request_module("msp3400"); #endif /* CONFIG_VIDEO_TUNER */ } + if (itv->card->audio_selector == USE_CS53L32A_AND_MSP34XX) { + ivtv_request_module("msp3400"); + ivtv_request_module("cs53l32a"); + } + if (itv->card->audio_selector == USE_CS53L32A) { + ivtv_request_module("cs53l32a"); + } // -2 == autodetect, -1 == no tda9887 if (itv->options.tda9887 != -1) { #ifndef CONFIG_VIDEO_TUNER ********************PATCH FOR ivtv-driver.h************************ --- ivtv-driver.h.old 2005-09-13 17:18:58.000000000 +0100 +++ ivtv-driver.h 2005-09-13 18:48:55.000000000 +0100 @@ -116,12 +116,16 @@ iTVC15 based, but does not have tv-out */ #define IVTV_CARD_PVR_150 5 /* wintv pvr 150 */ #define IVTV_CARD_PG600 6 /* YUAN PG600/DIAMONDMM PVR-550 based on the CX Falcon 2 */ +#define IVTV_CARD_AVC2410 7 /* Adaptec AVC-2410 */ +#define IVTV_CARD_AVC2010 8 /* Adaptec AVD-2010 (No Tuner) */ #define NO_AUDIO 0 /* the card can't handle audio */ #define USE_MSP34XX 1 /* switch audio by MSP34XX */ #define USE_GPIO 2 /* switch audio by GPIO */ #define USE_CX25840 3 /* switch audio by CX25840 */ #define USE_PVR150 4 /* switch audio with WM8775 and CX25840 */ +#define USE_CS53L32A 5 /* switch audio with CS53L32A */ +#define USE_CS53L32A_AND_MSP34XX 6 /* switch audio with CS53L32A and MSP34XX */ #define IVTV_AUDIO_32000 0x2 /* 32 kHz audio */ #define IVTV_AUDIO_44100 0x0 /* 44.1 kHz audio */ @@ -139,6 +143,7 @@ #define PCI_VENDOR_ID_ICOMP 0x4444 #define PCI_DEVICE_ID_IVTV15 0x0803 #define IVTV_PCI_ID_HAUPPAUGE 0x0070 /* subsystem vendor id */ +#define IVTV_PCI_ID_ADAPTEC 0x9005 /* subsystem vendor id */ #define IVTV_PCI_ID_AVERMEDIA 0x1461 #define IVTV_PCI_ID_YUAN 0x12ab #define PCI_DEVICE_ID_IVTV16 0x0016 ********************PATCH FOR ivtv-cards.c************************ --- ivtv-cards.c.old 2005-09-13 16:55:00.000000000 +0100 +++ ivtv-cards.c 2005-09-13 18:19:21.000000000 +0100 @@ -460,6 +460,7 @@ #define IVTV_MPG160_TUNER_I2C_ADDR 0x60 #define IVTV_M179_TUNER_I2C_ADDR 0x60 #define IVTV_PG600_TUNER_I2C_ADDR 0x61 +#define IVTV_AVC2410_TUNER_I2C_ADDR 0x60 static const struct ivtv_card_pci_info ivtv_pci_pvr150[] = { {PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x8801}, @@ -512,6 +513,16 @@ {0, 0, 0} }; +static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = { + {PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 }, + {0, 0, 0} +}; + +static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = { + {PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 }, + {0, 0, 0} +}; + static const struct ivtv_card ivtv_card_list[] = { { .type = IVTV_CARD_PVR_250, @@ -525,7 +536,8 @@ .chg_input_ex_func = NULL, .pci_list = ivtv_pci_pvr250, - }, { + }, + { .type = IVTV_CARD_PVR_350, .name = "WinTV PVR 350", .v4l2_capabilities = V4L2_CAP_ENCODER_SLICED | V4L2_CAP_DECODER, @@ -597,7 +609,29 @@ .chg_input_ex_func = NULL, .pci_list = ivtv_pci_pg600, - } + }, { + .type = IVTV_CARD_AVC2410, + .name = "Adaptec VIDEOH! AVC-2410", + .v4l2_capabilities = V4L2_CAP_ENCODER_SLICED, + .audio_selector = USE_CS53L32A_AND_MSP34XX, + + .video_dec_func = ivtv_saa7115, + .init_ex_func = NULL, + .chg_input_ex_func = NULL, + + .pci_list = ivtv_pci_avc2410, + }, { + .type = IVTV_CARD_AVC2010, + .name = "Adaptec VIDEOH! AVC-2010", + .v4l2_capabilities = V4L2_CAP_ENCODER_SLICED, + .audio_selector = USE_CS53L32A, + + .video_dec_func = ivtv_saa7115, + .init_ex_func = NULL, + .chg_input_ex_func = NULL, + + .pci_list = ivtv_pci_avc2010, + } }; static const int ivtv_cards_size = ********************PATCH FOR audio.c **************************** --- ivtv-audio.c.old 2005-09-13 18:20:45.000000000 +0100 +++ ivtv-audio.c 2005-09-13 18:59:04.000000000 +0100 @@ -175,6 +175,7 @@ } switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: /* Select input and output. Output is normally 1 (SCART1), but can be set with @@ -182,6 +183,8 @@ return ivtv_set_audio_for_msp34xx(itv, audio_input, itv->msp34xx_audio_output); + case USE_CS53L32A: + return 0; /* Do nothing, only one audio input */ case USE_PVR150: ivtv_set_audio_for_pvr150(itv, audio_input); case USE_CX25840: @@ -200,12 +203,15 @@ memset(&va, 0, sizeof(struct video_audio)); switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: ivtv_msp34xx(itv, VIDIOCGAUDIO, &va); va.volume = volume; va.mode = 0; /* keep stereo mode at automatic stereo detection */ ivtv_msp34xx(itv, VIDIOCSAUDIO, &va); break; + case USE_CS53L32A: + break; /* Need volume control adjust here */ case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ ivtv_cx25840(itv, VIDIOCGAUDIO, &va); @@ -224,9 +230,12 @@ memset(&va, 0, sizeof(struct video_audio)); switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: ivtv_msp34xx(itv, VIDIOCGAUDIO, &va); break; + case USE_CS53L32A: /* need to get volume control here */ + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ ivtv_cx25840(itv, VIDIOCGAUDIO, &va); @@ -244,6 +253,7 @@ struct video_audio va; switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: memset(&va, 0, sizeof(struct video_audio)); ivtv_msp34xx(itv, VIDIOCGAUDIO, &va); @@ -254,6 +264,8 @@ va.mode = 0; /* keep stereo mode at automatic stereo detection */ ivtv_msp34xx(itv, VIDIOCSAUDIO, &va); break; + case USE_CS53L32A: /* need to mute here */ + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ break; @@ -271,10 +283,13 @@ struct video_audio va; switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: memset(&va, 0, sizeof(struct video_audio)); ivtv_msp34xx(itv, VIDIOCGAUDIO, &va); break; + case USE_CS53L32A: /* need to get mute here */ + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ break; @@ -290,9 +305,12 @@ void ivtv_audio_set_channel(struct ivtv *itv, struct video_channel *v) { switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: ivtv_msp34xx(itv, VIDIOCSCHAN, v); break; + case USE_CS53L32A: + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ break; @@ -307,6 +325,7 @@ struct v4l2_tuner vt; switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: vt.index = 0; vt.audmode = audmode; @@ -314,6 +333,7 @@ ivtv_dualwatch_set_enabled(itv, audmode == V4L2_TUNER_MODE_STEREO); break; + case USE_CS53L32A: case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ break; @@ -343,7 +363,7 @@ return V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_MONO; } } - if (itv->card->audio_selector == USE_MSP34XX) { + if ((itv->card->audio_selector == USE_MSP34XX) || (itv->card->audio_selector == USE_CS53L32A_AND_MSP34XX)) { struct v4l2_tuner msp_vt; msp_vt.index = 0; @@ -361,9 +381,12 @@ int freq = 0; /* Value is ignored by msp34xx */ switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: ivtv_msp34xx(itv, VIDIOCSFREQ, &freq); break; + case USE_CS53L32A: + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ case USE_GPIO: @@ -374,6 +397,7 @@ int ivtv_audio_set_matrix(struct ivtv *itv, struct ivtv_msp_matrix *matrix) { switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: if ((matrix->input < 1) || (matrix->input > 8)) { IVTV_DEBUG_WARN("Invalid audio input!\n"); @@ -391,6 +415,8 @@ ivtv_msp34xx(itv, MSP_SET_MATRIX, matrix); break; + case USE_CS53L32A: + break; case USE_PVR150: case USE_CX25840: /* FIXME, probably not right */ case USE_GPIO: @@ -403,8 +429,11 @@ void ivtv_audio_set_samplerate(struct ivtv *itv, int samplerate) { switch (itv->card->audio_selector) { + case USE_CS53L32A_AND_MSP34XX: case USE_MSP34XX: break; + case USE_CS53L32A: + break; case USE_PVR150: case USE_CX25840: ivtv_cx25840(itv, DECODER_SET_AUDIO, &samplerate); ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ ivtv-devel mailing list ivtv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ivtv-devel