diff -urN cx88-0.0.4/cx88-core.c cx88-0.0.4-mdvh-hack5/cx88-core.c --- cx88-0.0.4/cx88-core.c 2004-02-22 02:59:35.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/cx88-core.c 2005-01-25 08:02:58.000000000 +0100 @@ -32,7 +32,7 @@ #include "cx88.h" -MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); +MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards. Hacked by Martin Dvh for testing purpose"); MODULE_AUTHOR("Gerd Knorr [SuSE Labs]"); MODULE_LICENSE("GPL"); diff -urN cx88-0.0.4/cx88-video.c cx88-0.0.4-mdvh-hack5/cx88-video.c --- cx88-0.0.4/cx88-video.c 2004-04-15 12:39:34.000000000 +0200 +++ cx88-0.0.4-mdvh-hack5/cx88-video.c 2005-01-28 15:18:32.000000000 +0100 @@ -78,6 +78,96 @@ MODULE_PARM(nicam,"i"); MODULE_PARM_DESC(nicam,"tv audio is nicam"); + + +static unsigned int force_htotal = 0; +MODULE_PARM(force_htotal,"i"); +MODULE_PARM_DESC(force_htotal,"default PAL 1135, NTSC 910. Force htotal to this value, maximum is 2047.Programmable total number of pixel per line. This determines tha actual number of raw samples per line taken during a normal capture"); + +static unsigned int force_swidth = 0; +MODULE_PARM(force_swidth,"i"); +MODULE_PARM_DESC(force_swidth,"force scaled width to this value. default for PAL is 922, for NTSC 754"); + +static unsigned int force_hdelay = 0; +MODULE_PARM(force_hdelay,"i"); +MODULE_PARM_DESC(force_hdelay,"default PAL 186, NTSC 135, maximum 1023. HDELAY is programmed with the number of pixels between horizontal sync and the first pixel of each line to be displayed or captured. HDELAY should be an even number to get Cb as the first pixel, an odd number to get Cr. The register value is programmed with respect to the scaled frequency clock."); + +static unsigned int force_vdelay = 0; +MODULE_PARM(force_vdelay,"i"); +MODULE_PARM_DESC(force_vdelay,"default PAL 36,default NTSC 24 For video decoding, VDELAY is programmed with the number of half lines between the end of the serration pulses and the first line to be displayed or captured. The register value is programmed with respect to the unscaled input signal. VDELAY must be programmed to an even number to avoid apparent field reversal.*/"); + +static unsigned int force_fsc8 = 0; +MODULE_PARM(force_fsc8,"i"); +MODULE_PARM_DESC(force_fsc8,"pll frequency in Hz. (for videodecoder (will be scaled) and ADC) default PAL 35468950, NTSC 28636360. min 16000000 max 80000000"); + +static unsigned int force_vbi_pkt_size = 0; +MODULE_PARM(force_vbi_pkt_size,"i"); +MODULE_PARM_DESC(force_vbi_pkt_size,"default PAL 511, NTSC 288, max 1023 .VBI Packet Size. The number of raw data dwords (four 8-bit samples) to capture per line while in VBI capture mode (only used in VBI line mode)."); + +static unsigned int force_vactive = 0; +MODULE_PARM(force_vactive,"i"); +MODULE_PARM_DESC(force_vactive,"default PAL 576, NTSC 480, This is the vertical active. It defines the number of half lines used in the vertical scaling process. Values between 1 and 1023 are allowed."); + +static unsigned int force_hactive = 0; +MODULE_PARM(force_hactive,"i"); +MODULE_PARM_DESC(force_hactive,"default set to capture_width.This is the horizontal active. It defines the number of horizontal active pixels per line. Values between 1 and 1023 are allowed."); + +static unsigned int force_maxh = 0; +MODULE_PARM(force_maxh,"i"); +MODULE_PARM_DESC(force_maxh,"default PAL 576, NTSC 480, maximum value the driver will accept for height"); + +static unsigned int force_maxw = 0; +MODULE_PARM(force_maxw,"i"); +MODULE_PARM_DESC(force_maxw,"default PAL 768, NTSC 640, maximum value the driver will accept for width"); + +static unsigned int frm_size = 1024; +MODULE_PARM(frm_size,"i"); +MODULE_PARM_DESC(frm_size,"VBI Frame Size: default 1024. max 4095. Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet. Has to be QWORD boundary.\nThis number might need to correspond in some way to the exact height and /or width requested in the capture command."); + +static unsigned int vbi_v_del = 2; +MODULE_PARM(vbi_v_del ,"i"); +MODULE_PARM_DESC(vbi_v_del ,"The number of CLKx1 s to delay from the trailing edge of HRESET before starting VBI line capture. Used in both VBI line mode and VBI frame mode, where in VBI frame mode it has to set to a value of 2."); + +static unsigned int extend_vbi = 0; +MODULE_PARM(extend_vbi,"i"); +MODULE_PARM_DESC(extend_vbi,"A value of 1 extends the frame output capture region to include the 20 half lines prior to the default VACTIVE region. Can be used in vbi_frame_mode."); + +/*static unsigned int pll_freq = 0; +MODULE_PARM(pll_freq ,"i"); +MODULE_PARM_DESC(pll_freq ,"fsc8=pll_freq 28636360 for NTSC 35468950 for PAL");*/ + +static unsigned int disable_samplerateconverter = 0; +MODULE_PARM(disable_samplerateconverter ,"i"); +MODULE_PARM_DESC(disable_samplerateconverter ,"set to 1 to disable the samplerate_conversion for the video_decoder and make the videodecoderrate the same as the ADC sampling freq. If set to 0 the videodecoder works at a different frequency as the sampling frequency of the ADCs, for normal operation we should not need the samplerateconversion and just use pll_freq=fsc8 for everything. The datasheets are confusing about these settings"); + +static unsigned int disable_vscale = 0; +MODULE_PARM(disable_vscale ,"i"); +MODULE_PARM_DESC(disable_vscale ,"set to 1 to disable the vertical scaling."); + +static unsigned int disable_hscale = 0; +MODULE_PARM(disable_hscale ,"i"); +MODULE_PARM_DESC(disable_hscale ,"set to 1 to disable the horizontal scaling."); + +/*static unsigned int disable_size_checks = 0; +MODULE_PARM(disable_size_checks,"i"); +MODULE_PARM_DESC(disable_size_checks,"if set to 1 no width and height checks are performed, dangerous !");*/ + + + +static unsigned int cap_raw_all = 0; +MODULE_PARM(cap_raw_all,"i"); +MODULE_PARM_DESC(cap_raw_all,"A value of 1 enables continuous raw data mode capture. You also need to set frm_size"); + +static unsigned int raw16 = 0; +MODULE_PARM(raw16,"i"); +MODULE_PARM_DESC(raw16," 0 = 8xFsc 8-bit data mode (Raw Data)\n 1 = 4xFsc 16-bit data mode (Filtered VBI data)"); + +static unsigned int vbi_frame_capture_raw_mode = 0; +MODULE_PARM(vbi_frame_capture_raw_mode,"i"); +MODULE_PARM_DESC(vbi_frame_capture_raw_mode," This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size."); + + + #define dprintk(level,fmt, arg...) if (video_debug >= level) \ printk(KERN_DEBUG "%s: " fmt, dev->name , ## arg) @@ -91,6 +181,71 @@ static unsigned int inline norm_swidth(struct cx8800_tvnorm *norm) { + force_swidth=force_swidth & 0x1fff;/*mdvh This value is used to determine the scale factor so I don't know the exact maximum */ + return (force_swidth)?force_swidth:(norm->id & V4L2_STD_625_50) ? 922 : 754; +} + +static unsigned int inline norm_sheight(struct cx8800_tvnorm *norm) +{ + return (norm->id & V4L2_STD_625_50) ? 576 : 480; +} + +static unsigned int inline norm_maxh(struct cx8800_tvnorm *norm) +{ + force_maxh=force_maxh & 0x1fff; + return (force_maxh)?force_maxh:(norm->id & V4L2_STD_625_50) ? 576 : 480; +} + +static unsigned int inline norm_maxw(struct cx8800_tvnorm *norm) +{ + force_maxw=force_maxw & 0x1fff; + return (force_maxw)?force_maxw:(norm->id & V4L2_STD_625_50) ? 768 : 640; +} + +static unsigned int inline norm_hdelay(struct cx8800_tvnorm *norm) +{ + force_hdelay=force_hdelay&0x03FF; + return (force_hdelay)?force_hdelay:(norm->id & V4L2_STD_625_50) ? 186 : 135; +} + +static unsigned int inline norm_vdelay(struct cx8800_tvnorm *norm) +{ + force_vdelay=force_vdelay &0x03FF; + return (force_vdelay)?force_vdelay:(norm->id & V4L2_STD_625_50) ? 0x24 : 0x18; + /*For video decoding, VDELAY is programmed with the number of half lines between the end of the serration pulses and the first line to be displayed or captured. The register value is programmed with respect to the unscaled input signal. VDELAY must be programmed to an even number to avoid apparent field reversal.*/ + +} + +static unsigned int inline norm_fsc8(struct cx8800_tvnorm *norm) +{ + force_fsc8=(force_fsc8>16000000 && force_fsc8<80000000)?force_fsc8:0; + static const unsigned int ntsc = 28636360; + static const unsigned int pal = 35468950; + + return (force_fsc8)?force_fsc8:(norm->id & V4L2_STD_625_50) ? pal : ntsc; +} + +static unsigned int inline norm_notchfilter(struct cx8800_tvnorm *norm) +{ + return (norm->id & V4L2_STD_625_50) + ? HLNotchFilter135PAL + : HLNotchFilter135NTSC; +} + +static unsigned int inline norm_htotal(struct cx8800_tvnorm *norm) +{ + force_htotal=force_htotal &0x07FF; + return (force_htotal)?force_htotal:((norm->id & V4L2_STD_625_50) ? 1135 : 910); +} + +static unsigned int inline norm_vbipack(struct cx8800_tvnorm *norm) +{ + force_vbi_pkt_size=force_vbi_pkt_size & 0x03FF;//only used for vbi_line mode + return (force_vbi_pkt_size)?force_vbi_pkt_size:(norm->id & V4L2_STD_625_50) ? 511 : 288; +} + +/*static unsigned int inline norm_swidth(struct cx8800_tvnorm *norm) +{ return (norm->id & V4L2_STD_625_50) ? 922 : 754; } @@ -139,7 +294,7 @@ { return (norm->id & V4L2_STD_625_50) ? 511 : 288; } - +*/ static struct cx8800_tvnorm tvnorms[] = { { .name = "NTSC-M", @@ -537,7 +692,8 @@ dev->tvnorm = norm; fsc8 = norm_fsc8(norm); - adc_clock = xtal; + //adc_clock = xtal; + adc_clock = (disable_samplerateconverter)?fsc8:xtal; vdec_clock = fsc8; dprintk(1,"set_tvnorm: \"%s\" fsc8=%d adc=%d vdec=%d\n", @@ -592,9 +748,16 @@ cx_write(MO_HTOTAL, htotal); // vbi stuff - cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */ - norm_vbipack(norm))); - + //cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */ + // norm_vbipack(norm))); + //mdvh: vbi and raw stuff + frm_size=frm_size &0x0FFF;//VBI Frame Size Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet has to be QWORD boundary. + vbi_v_del =vbi_v_del &0x3F;//vdelay=2 is minimum according to datasheet + //vbi_v_del=(vbi_v_del)?vbi_v_del:2; + extend_vbi =(extend_vbi )?1:0;//enable extend vbi capture range to include 20 halflines prior to vactive during vbi_frame capture mode + + cx_write(MO_VBI_PACKET,((cap_raw_all || vbi_frame_capture_raw_mode)? frm_size<<17:0)|(vbi_v_del << 11) |extend_vbi <<10| norm_vbipack(norm)); + // audio set_tvaudio(dev); @@ -616,40 +779,44 @@ int interlaced) { unsigned int swidth = norm_swidth(dev->tvnorm); - unsigned int sheight = norm_maxh(dev->tvnorm); + unsigned int sheight = norm_sheight(dev->tvnorm);//mdvh: was norm_maxh(dev->tvnorm); u32 value; dprintk(1,"set_scale: %dx%d [%s]\n", width, height, dev->tvnorm->name); // recalc H delay and scale registers - value = (width * norm_hdelay(dev->tvnorm)) / swidth; + value =(disable_hscale)?norm_hdelay(dev->tvnorm): (width * norm_hdelay(dev->tvnorm)) / swidth; value &= 0x3fe; cx_write(MO_HDELAY_EVEN, value); cx_write(MO_HDELAY_ODD, value); dprintk(1,"set_scale: hdelay 0x%04x\n", value); - value = (swidth * 4096 / width) - 4096; + value = (disable_hscale)?0:(swidth * 4096 / width) - 4096; cx_write(MO_HSCALE_EVEN, value); cx_write(MO_HSCALE_ODD, value); dprintk(1,"set_scale: hscale 0x%04x\n", value); - cx_write(MO_HACTIVE_EVEN, width); - cx_write(MO_HACTIVE_ODD, width); - dprintk(1,"set_scale: hactive 0x%04x\n", width); + force_hactive=force_hactive & 0x3ff; + value=(force_hactive)?force_hactive:width; + cx_write(MO_HACTIVE_EVEN, value); + cx_write(MO_HACTIVE_ODD, value); + dprintk(1,"set_scale: hactive 0x%04x\n", value); // recalc V scale Register (delay is constant) cx_write(MO_VDELAY_EVEN, norm_vdelay(dev->tvnorm)); cx_write(MO_VDELAY_ODD, norm_vdelay(dev->tvnorm)); dprintk(1,"set_scale: vdelay 0x%04x\n", norm_vdelay(dev->tvnorm)); - value = (0x10000 - (sheight * 512 / height - 512)) & 0x1fff; + value =(disable_vscale)?0: (0x10000 - (sheight * 512 / height - 512)) & 0x1fff; cx_write(MO_VSCALE_EVEN, value); cx_write(MO_VSCALE_ODD, value); dprintk(1,"set_scale: vscale 0x%04x\n", value); - cx_write(MO_VACTIVE_EVEN, sheight); - cx_write(MO_VACTIVE_ODD, sheight); - dprintk(1,"set_scale: vactive 0x%04x\n", sheight); + force_vactive=force_vactive &0x3ff; + value=(force_vactive)?force_vactive:sheight; + cx_write(MO_VACTIVE_EVEN, value); + cx_write(MO_VACTIVE_ODD, value); + dprintk(1,"set_scale: vactive 0x%04x\n", value); // setup filters value = 0; @@ -704,7 +871,9 @@ cx88_sram_channel_setup(dev, &cx88_sram_channels[SRAM_CH21], buf->bpl, buf->risc.dma); set_scale(dev, buf->vb.width, buf->vb.height, 1); - cx_write(MO_COLOR_CTRL, buf->fmt->cxformat | ColorFormatGamma); + //cx_write(MO_COLOR_CTRL, buf->fmt->cxformat | ColorFormatGamma); + cx_write(MO_COLOR_CTRL, ((vbi_frame_capture_raw_mode && (buf->fmt->cxformat==ColorFormatY8))?ColorFormatRAW: buf->fmt->cxformat)| ColorFormatGamma);/*mdvh: hack set vbi_frame capture raw format in stead of grey when requested*/ + /* reset counter */ cx_write(MO_VIDY_GPCNTRL,0x3); @@ -715,7 +884,10 @@ cx_set(MO_VID_INTMSK, 0x0f0011); /* enable capture */ - cx_set(VID_CAPTURE_CONTROL,0x06); + //cx_set(VID_CAPTURE_CONTROL,0x06); + cap_raw_all=(cap_raw_all)?1:0; + raw16=(raw16)?1:0; + cx_set(VID_CAPTURE_CONTROL,cap_raw_all<<6 | raw16<<5 | 0x06);/*mdvh: cap_raw_all:set contiunous raw capturing, raw16:8 bit 8Fsc or 16 bit 4xfsc raw capturing, 0x06 means capture_odd | capture_even*/ /* start dma */ cx_set(MO_DEV_CNTRL2, (1<<5)); diff -urN cx88-0.0.4/doc/BUILD_HOWTO cx88-0.0.4-mdvh-hack5/doc/BUILD_HOWTO --- cx88-0.0.4/doc/BUILD_HOWTO 1970-01-01 01:00:00.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/BUILD_HOWTO 2005-01-25 08:02:59.000000000 +0100 @@ -0,0 +1,32 @@ +about this document + +This is a mini howto for compiling and installing v4l2 drivers, namely bttv 0.9.x, saa7134 and cx88. + +It is not a general introduction into kernel patching and building, if you are looking for this (or if you don't understand what this page is about ...) check out the Kernel Howto. +v4l2 on 2.4.x kernels + +You need a patched kernel. Patches for 2.4.26 which already include the drivers are available. They should work fine with newer kernels as well. + +I've stopped maintaining the drivers for 2.4 kernels. Current cvs drivers don't build on 2.4 kernels any more. I will keep the old stuff available for download of course, but don't expect any updates. If you have trouble with the 2.4 drivers or very new hardware which isn't supported yet I strongly suggest to update to 2.6 kernels. +v4l2 on 2.6.x kernels + +kernel 2.6.x already has everything included. Just enable the config options you need (i2c, video4linux and the actual driver), compile your kernel and you are done. + +If you run into trouble you can check if there are updates with fixes in the patch directory. + +You can also fetch a snapshot and build that one (they tend to be updated more often than the patchkits). To build and use the current drivers you need 2.6.2 or newer. +building the driver tarballs + +This is pretty simple: + +mkdir +cd +tar xzf /path/to/driver-version.tar.gz +cd driver-version +make KDIR=/path/to/kernel/source/tree +make install + +Usually the correct path to the kernel source tree is picked automagically, you only need the KDIR argument for make if this doesn't work for some reason. + +The driver tarballs install into another path than the kernels driver, so you should take care that really the correct modules get loaded. Make sure you don't mix the kernels and snapshots modules, there might be incompatibilies. +© Gerd Knorr diff -urN cx88-0.0.4/doc/README.cx88~ cx88-0.0.4-mdvh-hack5/doc/README.cx88~ --- cx88-0.0.4/doc/README.cx88~ 2004-03-17 11:58:01.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/README.cx88~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,72 +0,0 @@ - -cx8800 release notes -==================== - -This is a v4l2 device driver for the cx2388x chip. - - -current status -============== - -video - - Basically works. - - Some minor image quality glitches. - - Red and blue are swapped sometimes for not-yet known - reasons (seems to depend on the image size, try to resize - your tv app window as workaround ...). - - For now only capture, overlay support isn't completed yet. - -audio - - The chip specs for the on-chip TV sound decoder are next - to useless :-/ - - Neverless the builtin TV sound decoder starts working now, - at least for PAL-BG. Other TV norms need other code ... - FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE - USING. - - Most tuner chips do provide mono sound, which may or may not - be useable depending on the board design. With the Hauppauge - cards it works, so there is mono sound available as fallback. - - audio data dma (i.e. recording without loopback cable to the - sound card) should be possible, but there is no code yet ... - -vbi - - some code present. Doesn't crash any more, but also doesn't - work yet ... - - -how to add support for new cards -================================ - -The driver needs some config info for the TV cards. This stuff is in -cx88-cards.c. If the driver doesn't work well you likely need a new -entry for your card in that file. Check the kernel log (using dmesg) -to see whenever the driver knows your card or not. There is a line -like this one: - - cx8800[0]: subsystem: 0070:3400, board: Hauppauge WinTV \ - 34xxx models [card=1,autodetected] - -If your card is listed as "board: UNKNOWN/GENERIC" it is unknown to -the driver. What to do then? - - (1) Try upgrading to the latest snapshot, maybe it has been added - meanwhile. - (2) You can try to create a new entry yourself, have a look at - cx88-cards.c. If that worked, mail me your changes as unified - diff ("diff -u"). - (3) Or you can mail me the config information. I need at least the - following informations to add the card: - - * the PCI Subsystem ID ("0070:3400" from the line above, - "lspci -v" output is fine too). - * the tuner type used by the card. You can try to find one by - trial-and-error using the tuner= insmod option. If you - know which one the card has you can also have a look at the - list in CARDLIST.tuner - -Have fun, - - Gerd - --- -Gerd Knorr [SuSE Labs] diff -urN cx88-0.0.4/doc/cx2388x_tests1.txt cx88-0.0.4-mdvh-hack5/doc/cx2388x_tests1.txt --- cx88-0.0.4/doc/cx2388x_tests1.txt 1970-01-01 01:00:00.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/cx2388x_tests1.txt 2005-01-28 15:39:34.000000000 +0100 @@ -0,0 +1,204 @@ +Tests for the hacked cx2388x video4linux driver to find out if it can do continuous capturing using the cap_raw_all flag, and to find out how to use it. + +first build the driver: +tar zxvf cx88-0.0.4-mdvh-hackX.tar.gz +cd cx88-0.0.4-mdvh-hackX +make KDIR=/path/to/kernel/source/tree + +Now use the insmod options below to load cx8800.ko. You also need to insmod v4l1-compat.ko and cx88xx.ko but that one does not need any special options. +To see the list of new insmod options run: +modinfo ./cx8800.ko + +loading for the first time: +cd +rmmod cx88xx (be sure no old modules are loaded) +rmmod cx8800 +insmod v4l1-compat +insmod ./cx88xx.ko +insmod ./cx8800.ko +for example the last line could be: +insmod ./cx8800.ko cap_raw_all=1 frm_size=2048 + +I tried to dig up the right parameters to get the continuous raw capturing working. +I think it will only work if you also enable vbi_frame mode. Since this mode was not yet supported in the driver I tried to find out the parameters used in the bttv driver (which does support vbi_frame mode, called BT848_COLOR_FMT_RAW in the driver) +Still there are lots of uncertainties because bttv and cx2388x are not the same and the datasheets leave a lot of room for interpretation. +But maybe the vbi_frame mode is not needed at all and we only need to set the cap_raw_all flag and the frm_size. +frm_size is needed for cap_raw_all mode but it is still quite a mistery to me. +It might need to correspond to capture_width or capture_width*2. I don't know exactly what a frame is here. I suspect it is the number of samples per output_line. In the bt878 chip there is no frm_size register. If using vbi_frame mode the bt878 always outputs 1024 samples per line. +The datasheet says: VBI Frame Size Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet has to be QWORD boundary. +But there is no description of what a packet is. +The datasheet also says: +In the VBI frame output mode, VBI data capture occurs in the active video region and includes all the horizontal blank/sync information in the data stream. This feature can be used to provide a high-quality still-capture of video. The data is vertically bound beginning at the first line during VACTIVE and ending after a fixed number of packets. The data stream is packetized into a series of 256-dword blocks. A fixed number of dword blocks (434 for NTSC and 650 for PAL) are captured during each field. This is equivalent to 111,104 dwords for NTSC (434 × 256 dwords) and 166,400 dwords for PAL (650 × 256 dwords) per field. The VBI frame capture region can be extended to include the 10 lines prior to the default VACTIVE region by setting the EXT_FRAME register bit. VDELAY must also be set to its minimum value of 2. + +So, since 256 dwords is 2048 bytes, possibly the default should be: frm_size=2048 +The only real option to find out is to try different settings. + + +Here are the test videocaptures I thought of. I don't know if standard capture programs will allow you to use non-standard capture_sizes like 2048x692. If not please let me know and I will write a small test_capture appplication. +Any comments welcome. + + +Simple test to see what cap_raw_all in normal (not vbi_frame) mode does: +capture settings: +Try different standard settings. Also try grey 8bpp 1024x640 +insmod options: +cap_raw_all=1 +frm_size = try 2048 or 1024 or capture_width or capture_width/2 or 0 +so for example: +insmod ./cx8800.ko cap_raw_all=1 frm_size=2048 + + +Try more things to see what cap_raw_all in normal (not vbi_frame) mode does: +capture settings: +capture_color :try different color modes, probably GREY, 8bpp works best +capture_width: try normal resolutions (640x480) or try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=try normal resolutions (640x480) or for PAL 625 or 674 or 692 for NTSC 450 or 466 or 525 +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=0 +force_hactive=0 (or for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm)) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or capture_width or capture_width/2 or 0 +force_vdelay=2 +force_vactive=for PAL try 576, 610,625,692 (values from 576 to 694) for NTSC try 450,480,508,525 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 or 0 +disable_hscale=1 or 0 + + +Test to determine if vbi_frame mode works: +normal vbi_frame mode without extend_vbi: +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 640 for NTSC 434 or 640 + +insmod options: +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=692 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +If vbi_frame mode works, try to get extra lines with this test. +normal vbi_frame mode with extend_vbi (you get more output lines): +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 674 for NTSC 450 or 674 +insmod options: +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=692 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +force_vdelay=2 +force_vactive=for try 610 (values from 600 to 694) for NTSC try 508 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +Try to see what cap_raw_all does when in vbi_frame mode. +cap_raw_all in vbi_frame mode without extend_vbi: +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 640 for NTSC 434 or 640 + +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +See if we can get more extra lines in cap_raw_all and vbi_frame mode: +cap_raw_all in vbi_frame mode with extend_vbi (you get more output lines): +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 674 for NTSC 450 or 674 +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +force_vdelay=2 +force_vactive=for PAL try 576, 610,625,692 (values from 576 to 694) for NTSC try 450,480,508,525 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 +cap_raw_all=1 + + + + + + + + + +frm_size versus capture_width versus htotal versus hactive: +force_htotal:default PAL 1135, NTSC 910. maximum is 2047.Programmable total number of pixel per line. This determines the actual number of raw samples per line/2 taken during a normal capture. We probably don't need to verride this. + +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +frm_size = try 2048 or 1024 ? This might need to correspond to capture_width or capture_width*2. I don't know exactly what a frame is here. I suspect it is the number of samples per output_line. In the bt878 chip there is no frm_size register. If using vbi_frame mode the bt878 always outputs 1024 samples per line. +The datasheet says: VBI Frame Size Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet has to be QWORD boundary. +But there is no description of what a packet is. +The datasheet also says: +In the VBI frame output mode, VBI data capture occurs in the active video region and includes all the horizontal blank/sync information in the data stream. This feature can be used to provide a high-quality still-capture of video. The data is vertically bound beginning at the first line during VACTIVE and ending after a fixed number of packets. The data stream is packetized into a series of 256-dword blocks. A fixed number of dword blocks (434 for NTSC and 650 for PAL) are captured during each field. This is equivalent to 111,104 dwords for NTSC (434 × 256 dwords) and 166,400 dwords for PAL (650 × 256 dwords) per field. The VBI frame capture region can be extended to include the 10 lines prior to the default VACTIVE region by setting the EXT_FRAME register bit. VDELAY must also be set to its minimum value of 2. + +So possibly the default frm_size=256 dwords =256*8=2048 + + +disable_samplerateconverter=1 Use the same clock for the ADC as for the video_decoder. Strangely enough the current driver nomally enables the samplerate_converter. I don't know why. Experiment with this setting +disable_vscale=1 Do not do any vertical scaling (needed for vbi_frame_mode, probably also for cap_caw_all) +disable_hscale=1 Do not do any horizontal scaling (needed for vbi_frame_mode, probably also for cap_raw_all) +cap_raw_all=0 of 1 A value of 1 enables continuous raw data mode capture. You also need to set frm_size to the correct value and probably use a capture height of 640 or 674 and a capture width corresponding to frm_size +vbi_frame_capture_raw_mode=1 Enable vbi_frame mode. This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size. + + +All new insmod options: (get the current list with modinfo ./cx8800.ko) +filename: ./cx8800.ko +description: v4l2 driver module for cx2388x based TV cards +parm: force_htotal:default PAL 1135, NTSC 910. Force htotal to this value, maximum is 2047.Programmable total number of pixel per line. This determines tha actual number of raw samples per line taken during a normal capture +parm: force_swidth:force scaled width to this value. default for PAL is 922, for NTSC 754 +parm: force_hdelay:default PAL 186, NTSC 135, maximum 1023. HDELAY is programmed with the number of pixels between horizontal sync and the first pixel of each line to be displayed or captured. HDELAY should be an even number to get Cb as the first pixel, an odd number to get Cr. The register value is programmed with respect to the scaled frequency clock. +parm: force_vdelay:default PAL 36,default NTSC 24 For video decoding, VDELAY is programmed with the number of half lines between the end of the serration pulses and the first line to be displayed or captured. The register value is programmed with respect to the unscaled input signal. VDELAY must be programmed to an even number to avoid apparent field reversal.*/ +parm: force_fsc8:pll frequency in Hz. (for videodecoder (will be scaled) and ADC) default PAL 35468950, NTSC 28636360. min 16000000 max 80000000 +parm: force_vbi_pkt_size:default PAL 511, NTSC 288, max 1023 .VBI Packet Size. The number of raw data dwords (four 8-bit samples) to capture per line while in VBI capture mode (only used in VBI line mode). +parm: force_vactive:default PAL 576, NTSC 480, This is the vertical active. It defines the number of half lines used in the vertical scaling process. Values between 1 and 1023 are allowed. +parm: force_hactive:default set to capture_width.This is the horizontal active. It defines the number of horizontal active pixels per line. Values between 1 and 1023 are allowed. +parm: force_maxh:default PAL 576, NTSC 480, maximum value the driver will accept for height +parm: force_maxw:default PAL 768, NTSC 640, maximum value the driver will accept for width +parm: frm_size:VBI Frame Size: default 1024. Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet. Has to be QWORD boundary. +This number might need to correspond in some way to the exact height and /or width requested in the capture command. +parm: vbi_v_del:The number of CLKx1 s to delay from the trailing edge of HRESET before starting VBI line capture. Used in both VBI line mode and VBI frame mode, where in VBI frame mode it has to set to a value of 2. +parm: extend_vbi:A value of 1 extends the frame output capture region to include the 20 half lines prior to the default VACTIVE region. Can be used in vbi_frame_mode. +parm: disable_samplerateconverter:set to 1 to disable the samplerate_conversion for the video_decoder and make the videodecoderrate the same as the ADC sampling freq. If set to 0 the videodecoder works at a different frequency as the sampling frequency of the ADCs, for normal operation we should not need the samplerateconversion and just use pll_freq=fsc8 for everything. The datasheets are confusing about these settings +parm: disable_vscale:set to 1 to disable the vertical scaling. +parm: disable_hscale:set to 1 to disable the horizontal scaling. +parm: cap_raw_all:A value of 1 enables continuous raw data mode capture. You also need to set frm_size +parm: raw16: 0 = 8xFsc 8-bit data mode (Raw Data) + 1 = 4xFsc 16-bit data mode (Filtered VBI data) +parm: vbi_frame_capture_raw_mode: This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size. + + +greetings, +Martin Dvh diff -urN cx88-0.0.4/doc/cx2388x_tests1.txt~ cx88-0.0.4-mdvh-hack5/doc/cx2388x_tests1.txt~ --- cx88-0.0.4/doc/cx2388x_tests1.txt~ 1970-01-01 01:00:00.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/cx2388x_tests1.txt~ 2005-01-28 15:29:15.000000000 +0100 @@ -0,0 +1,190 @@ +Tests for the hacked cx2388x video4linux driver to find out if it can do continuous capturing using the cap_raw_all flag, and to find out how to use it. + +first build the driver: +tar zxvf cx88-0.0.4-mdvh-hackX.tar.gz +cd cx88-0.0.4-mdvh-hackX +make KDIR=/path/to/kernel/source/tree + +Now use the insmod options below to load cx8800.ko. You also need to insmod cx88xx.ko but that one does not need any special options. +To see the list of new insmod options run: +modinfo ./cx8800.ko + +I tried to dig up the right parameters to get the continuous raw capturing working. +I think it will only work if you also enable vbi_frame mode. Since this mode was not yet supported in the driver I tried to find out the parameters used in the bttv driver (which does support vbi_frame mode, called BT848_COLOR_FMT_RAW in the driver) +Still there are lots of uncertainties because bttv and cx2388x are not the same and the datasheets leave a lot of room for interpretation. +But maybe the vbi_frame mode is not needed at all and we only need to set the cap_raw_all flag and the frm_size. +frm_size is needed for cap_raw_all mode but it is still quite a mistery to me. +It might need to correspond to capture_width or capture_width*2. I don't know exactly what a frame is here. I suspect it is the number of samples per output_line. In the bt878 chip there is no frm_size register. If using vbi_frame mode the bt878 always outputs 1024 samples per line. +The datasheet says: VBI Frame Size Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet has to be QWORD boundary. +But there is no description of what a packet is. +The datasheet also says: +In the VBI frame output mode, VBI data capture occurs in the active video region and includes all the horizontal blank/sync information in the data stream. This feature can be used to provide a high-quality still-capture of video. The data is vertically bound beginning at the first line during VACTIVE and ending after a fixed number of packets. The data stream is packetized into a series of 256-dword blocks. A fixed number of dword blocks (434 for NTSC and 650 for PAL) are captured during each field. This is equivalent to 111,104 dwords for NTSC (434 × 256 dwords) and 166,400 dwords for PAL (650 × 256 dwords) per field. The VBI frame capture region can be extended to include the 10 lines prior to the default VACTIVE region by setting the EXT_FRAME register bit. VDELAY must also be set to its minimum value of 2. + +So, since 256 dwords is 2048 bytes, possibly the default should be: frm_size=2048 +The only real option to find out is to try different settings. + +Here are the test videocaptures I thought of. I don't know if standard capture programs will allow you to use non-standard capture_sizes like 2048x692. If not please let me know and I will write a small test_capture appplication. +Any comments welcome. + + +Simple test to see what cap_raw_all in normal (not vbi_frame) mode does: +capture settings: +Try different standard settings. Also try grey 8bpp 1024x640 +insmod options: +cap_raw_all=1 +frm_size = try 2048 or 1024 or capture_width or capture_width/2 or 0 + +Try more things to see what cap_raw_all in normal (not vbi_frame) mode does: +capture settings: +capture_color :try different color modes, probably GREY, 8bpp works best +capture_width: try normal resolutions (640x480) or try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=try normal resolutions (640x480) or for PAL 625 or 674 or 692 for NTSC 450 or 466 or 525 +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=0 +force_hactive=0 (or for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm)) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or capture_width or capture_width/2 or 0 +force_vdelay=2 +force_vactive=for PAL try 576, 610,625,692 (values from 576 to 694) for NTSC try 450,480,508,525 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 or 0 +disable_hscale=1 or 0 + + +Test to determine if vbi_frame mode works: +normal vbi_frame mode without extend_vbi: +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 640 for NTSC 434 or 640 + +insmod options: +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=692 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +If vbi_frame mode works, try to get extra lines with this test. +normal vbi_frame mode with extend_vbi (you get more output lines): +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 674 for NTSC 450 or 674 +insmod options: +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=692 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +force_vdelay=2 +force_vactive=for try 610 (values from 600 to 694) for NTSC try 508 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +Try to see what cap_raw_all does when in vbi_frame mode. +cap_raw_all in vbi_frame mode without extend_vbi: +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 640 for NTSC 434 or 640 + +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 + +See if we can get more extra lines in cap_raw_all and vbi_frame mode: +cap_raw_all in vbi_frame mode with extend_vbi (you get more output lines): +capture settings: +capture_color : use GREY, 8bpp +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +capture_height=for PAL 674 for NTSC 450 or 674 +insmod options: +cap_raw_all=1 +vbi_frame_capture_raw_mode=1 +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +force_maxw=2048 (set to capture_width or greater) +force_maxh=800 (set to capture_height or greater) +frm_size = try 2048 or 1024 or 0 +force_vdelay=2 +force_vactive=for PAL try 576, 610,625,692 (values from 576 to 694) for NTSC try 450,480,508,525 (values from 448 to 526) +vbi_v_del=2 +disable_samplerateconverter=1 or 0 +disable_vscale=1 +disable_hscale=1 +cap_raw_all=1 + + + + + + + + + +frm_size versus capture_width versus htotal versus hactive: +force_htotal:default PAL 1135, NTSC 910. maximum is 2047.Programmable total number of pixel per line. This determines the actual number of raw samples per line/2 taken during a normal capture. We probably don't need to verride this. + +force_hactive=for PAL use 922, for NTSC use 754, must correspond to norm_swidth(tvnorm) +capture_width: try 1024 and 2048. This might need to correspond to frm_size or frm_size/2 +frm_size = try 2048 or 1024 ? This might need to correspond to capture_width or capture_width*2. I don't know exactly what a frame is here. I suspect it is the number of samples per output_line. In the bt878 chip there is no frm_size register. If using vbi_frame mode the bt878 always outputs 1024 samples per line. +The datasheet says: VBI Frame Size Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet has to be QWORD boundary. +But there is no description of what a packet is. +The datasheet also says: +In the VBI frame output mode, VBI data capture occurs in the active video region and includes all the horizontal blank/sync information in the data stream. This feature can be used to provide a high-quality still-capture of video. The data is vertically bound beginning at the first line during VACTIVE and ending after a fixed number of packets. The data stream is packetized into a series of 256-dword blocks. A fixed number of dword blocks (434 for NTSC and 650 for PAL) are captured during each field. This is equivalent to 111,104 dwords for NTSC (434 × 256 dwords) and 166,400 dwords for PAL (650 × 256 dwords) per field. The VBI frame capture region can be extended to include the 10 lines prior to the default VACTIVE region by setting the EXT_FRAME register bit. VDELAY must also be set to its minimum value of 2. + +So possibly the default frm_size=256 dwords =256*8=2048 + + +disable_samplerateconverter=1 Use the same clock for the ADC as for the video_decoder. Strangely enough the current driver nomally enables the samplerate_converter. I don't know why. Experiment with this setting +disable_vscale=1 Do not do any vertical scaling (needed for vbi_frame_mode, probably also for cap_caw_all) +disable_hscale=1 Do not do any horizontal scaling (needed for vbi_frame_mode, probably also for cap_raw_all) +cap_raw_all=0 of 1 A value of 1 enables continuous raw data mode capture. You also need to set frm_size to the correct value and probably use a capture height of 640 or 674 and a capture width corresponding to frm_size +vbi_frame_capture_raw_mode=1 Enable vbi_frame mode. This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size. + + +All new insmod options: (get the current list with modinfo ./cx8800.ko) +filename: ./cx8800.ko +description: v4l2 driver module for cx2388x based TV cards +parm: force_htotal:default PAL 1135, NTSC 910. Force htotal to this value, maximum is 2047.Programmable total number of pixel per line. This determines tha actual number of raw samples per line taken during a normal capture +parm: force_swidth:force scaled width to this value. default for PAL is 922, for NTSC 754 +parm: force_hdelay:default PAL 186, NTSC 135, maximum 1023. HDELAY is programmed with the number of pixels between horizontal sync and the first pixel of each line to be displayed or captured. HDELAY should be an even number to get Cb as the first pixel, an odd number to get Cr. The register value is programmed with respect to the scaled frequency clock. +parm: force_vdelay:default PAL 36,default NTSC 24 For video decoding, VDELAY is programmed with the number of half lines between the end of the serration pulses and the first line to be displayed or captured. The register value is programmed with respect to the unscaled input signal. VDELAY must be programmed to an even number to avoid apparent field reversal.*/ +parm: force_fsc8:pll frequency in Hz. (for videodecoder (will be scaled) and ADC) default PAL 35468950, NTSC 28636360. min 16000000 max 80000000 +parm: force_vbi_pkt_size:default PAL 511, NTSC 288, max 1023 .VBI Packet Size. The number of raw data dwords (four 8-bit samples) to capture per line while in VBI capture mode (only used in VBI line mode). +parm: force_vactive:default PAL 576, NTSC 480, This is the vertical active. It defines the number of half lines used in the vertical scaling process. Values between 1 and 1023 are allowed. +parm: force_hactive:default set to capture_width.This is the horizontal active. It defines the number of horizontal active pixels per line. Values between 1 and 1023 are allowed. +parm: force_maxh:default PAL 576, NTSC 480, maximum value the driver will accept for height +parm: force_maxw:default PAL 768, NTSC 640, maximum value the driver will accept for width +parm: frm_size:VBI Frame Size: default 1024. Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet. Has to be QWORD boundary. +This number might need to correspond in some way to the exact height and /or width requested in the capture command. +parm: vbi_v_del:The number of CLKx1 s to delay from the trailing edge of HRESET before starting VBI line capture. Used in both VBI line mode and VBI frame mode, where in VBI frame mode it has to set to a value of 2. +parm: extend_vbi:A value of 1 extends the frame output capture region to include the 20 half lines prior to the default VACTIVE region. Can be used in vbi_frame_mode. +parm: disable_samplerateconverter:set to 1 to disable the samplerate_conversion for the video_decoder and make the videodecoderrate the same as the ADC sampling freq. If set to 0 the videodecoder works at a different frequency as the sampling frequency of the ADCs, for normal operation we should not need the samplerateconversion and just use pll_freq=fsc8 for everything. The datasheets are confusing about these settings +parm: disable_vscale:set to 1 to disable the vertical scaling. +parm: disable_hscale:set to 1 to disable the horizontal scaling. +parm: cap_raw_all:A value of 1 enables continuous raw data mode capture. You also need to set frm_size +parm: raw16: 0 = 8xFsc 8-bit data mode (Raw Data) + 1 = 4xFsc 16-bit data mode (Filtered VBI data) +parm: vbi_frame_capture_raw_mode: This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size. + + +greetings, +Martin Dvh diff -urN cx88-0.0.4/doc/cx8800_modinfo.txt cx88-0.0.4-mdvh-hack5/doc/cx8800_modinfo.txt --- cx88-0.0.4/doc/cx8800_modinfo.txt 1970-01-01 01:00:00.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/cx8800_modinfo.txt 2005-01-26 00:57:04.000000000 +0100 @@ -0,0 +1,41 @@ +filename: ./cx8800.ko +description: v4l2 driver module for cx2388x based TV cards +author: Gerd Knorr [SuSE Labs] +license: GPL +parm: video_nr:video device numbers +parm: vbi_nr:vbi device numbers +parm: radio_nr:radio device numbers +parm: latency:pci latency timer +parm: video_debug:enable debug messages [video] +parm: irq_debug:enable debug messages [IRQ handler] +parm: vid_limit:capture memory limit in megabytes +parm: tuner:tuner type +parm: card:card type +parm: nicam:tv audio is nicam +parm: force_htotal:default PAL 1135, NTSC 910. Force htotal to this value, maximum is 2047.Programmable total number of pixel per line. This determines tha actual number of raw samples per line taken during a normal capture +parm: force_swidth:force scaled width to this value. default for PAL is 922, for NTSC 754 +parm: force_hdelay:default PAL 186, NTSC 135, maximum 1023. HDELAY is programmed with the number of pixels between horizontal sync and the first pixel of each line to be displayed or captured. HDELAY should be an even number to get Cb as the first pixel, an odd number to get Cr. The register value is programmed with respect to the scaled frequency clock. +parm: force_vdelay:default PAL 36,default NTSC 24 For video decoding, VDELAY is programmed with the number of half lines between the end of the serration pulses and the first line to be displayed or captured. The register value is programmed with respect to the unscaled input signal. VDELAY must be programmed to an even number to avoid apparent field reversal.*/ +parm: force_fsc8:pll frequency in Hz. (for videodecoder (will be scaled) and ADC) default PAL 35468950, NTSC 28636360. min 16000000 max 80000000 +parm: force_vbi_pkt_size:default PAL 511, NTSC 288, max 1023 .VBI Packet Size. The number of raw data dwords (four 8-bit samples) to capture per line while in VBI capture mode (only used in VBI line mode). +parm: force_vactive:default PAL 576, NTSC 480, This is the vertical active. It defines the number of half lines used in the vertical scaling process. Values between 1 and 1023 are allowed. +parm: force_hactive:default set to capture_width.This is the horizontal active. It defines the number of horizontal active pixels per line. Values between 1 and 1023 are allowed. +parm: force_maxh:default PAL 576, NTSC 480, maximum value the driver will accept for height +parm: force_maxw:default PAL 768, NTSC 640, maximum value the driver will accept for width +parm: frm_size:VBI Frame Size: default 1024. max 4095. Used in both RAW all mode and VBI frame mode specifies # of bytes packed in each packet. Has to be QWORD boundary. +This number might need to correspond in some way to the exact height and /or width requested in the capture command. +parm: vbi_v_del:The number of CLKx1 s to delay from the trailing edge of HRESET before starting VBI line capture. Used in both VBI line mode and VBI frame mode, where in VBI frame mode it has to set to a value of 2. +parm: extend_vbi:A value of 1 extends the frame output capture region to include the 20 half lines prior to the default VACTIVE region. Can be used in vbi_frame_mode. +parm: disable_samplerateconverter:set to 1 to disable the samplerate_conversion for the video_decoder and make the videodecoderrate the same as the ADC sampling freq. If set to 0 the videodecoder works at a different frequency as the sampling frequency of the ADCs, for normal operation we should not need the samplerateconversion and just use pll_freq=fsc8 for everything. The datasheets are confusing about these settings +parm: disable_vscale:set to 1 to disable the vertical scaling. +parm: disable_hscale:set to 1 to disable the horizontal scaling. +parm: cap_raw_all:A value of 1 enables continuous raw data mode capture. You also need to set frm_size +parm: raw16: 0 = 8xFsc 8-bit data mode (Raw Data) + 1 = 4xFsc 16-bit data mode (Filtered VBI data) +parm: vbi_frame_capture_raw_mode: This sets up the driver to use RAW vbi_frame_capture_mode when V4L2_PIX_FMT_GREY 8 bpp, gray is chosen as the color format in the capture application. Use normal capture device, NOT the vbi device for this. You also need to set frm_size. +parm: vbibufs:number of vbi buffers, range 2-32 +parm: vbi_debug:enable debug messages [video] +parm: audio_debug:enable debug messages [audio] +vermagic: 2.6.7-1-k7 preempt K7 gcc-3.3 +depends: cx88xx,video-buf,videodev,i2c-core,i2c-algo-bit,btcx-risc,v4l2-common,v4l1-compat +alias: pci:v000014F1d00008800sv*sd*bc*sc*i* diff -urN cx88-0.0.4/doc/insmod-options cx88-0.0.4-mdvh-hack5/doc/insmod-options --- cx88-0.0.4/doc/insmod-options 2004-02-22 02:59:36.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/insmod-options 2005-01-28 15:33:53.000000000 +0100 @@ -171,3 +171,5 @@ insmod args: debug=1 print some debug info to the syslog. chip=9850/9855 set the chip type. + +cx8800.o: see cx8800_modinfo.txt diff -urN cx88-0.0.4/doc/insmod-options~ cx88-0.0.4-mdvh-hack5/doc/insmod-options~ --- cx88-0.0.4/doc/insmod-options~ 1970-01-01 01:00:00.000000000 +0100 +++ cx88-0.0.4-mdvh-hack5/doc/insmod-options~ 2004-02-22 02:59:36.000000000 +0100 @@ -0,0 +1,173 @@ + +Note: "modinfo " prints various informations about a kernel +module, among them a complete and up-to-date list of insmod options. +This list tends to be outdated because it is updated manually ... + +========================================================================== + +bttv.o + the bt848/878 (grabber chip) driver + + insmod args: + card=n card type, see CARDLIST for a list. + tuner=n tuner type, see CARDLIST for a list. + radio=0/1 card supports radio + pll=0/1/2 pll settings + 0: don't use PLL + 1: 28 MHz crystal installed + 2: 35 MHz crystal installed + + triton1=0/1 for Triton1 (+others) compatibility + vsfx=0/1 yet another chipset bug compatibility bit + see README.quirks for details on these two. + + bigendian=n Set the endianness of the gfx framebuffer. + Default is native endian. + fieldnr=0/1 Count fields. Some TV descrambling software + needs this, for others it only generates + 50 useless IRQs/sec. default is 0 (off). + autoload=0/1 autoload helper modules (tuner, audio). + default is 1 (on). + bttv_verbose=0/1/2 verbose level (at insmod time, while + looking at the hardware). default is 1. + bttv_debug=0/1 debug messages (for capture). + default is 0 (off). + irq_debug=0/1 irq handler debug messages. + default is 0 (off). + gbuffers=2-32 number of capture buffers for mmap'ed capture. + default is 4. + gbufsize= size of capture buffers. default and + maximum value is 0x208000 (~2MB) + no_overlay=0 Enable overlay on broken hardware. There + are some chipsets (SIS for example) which + are known to have problems with the PCI DMA + push used by bttv. bttv will disable overlay + by default on this hardware to avoid crashes. + With this insmod option you can override this. + automute=0/1 Automatically mutes the sound if there is + no TV signal, on by default. You might try + to disable this if you have bad input signal + quality which leading to unwanted sound + dropouts. + chroma_agc=0/1 AGC of chroma signal, off by default. + adc_crush=0/1 Luminance ADC crush, on by default. + + bttv_gpio=0/1 + gpiomask= + audioall= + audiomux= + See Sound-FAQ for a detailed description. + + remap, card, radio and pll accept up to four comma-separated arguments + (for multiple boards). + +tuner.o + The tuner driver. You need this unless you want to use only + with a camera or external tuner ... + + insmod args: + debug=1 print some debug info to the syslog + type=n type of the tuner chip. n as follows: + see CARDLIST for a complete list. + pal=[bdgil] select PAL variant (used for some tuners + only, important for the audio carrier). + +tvmixer.o + registers a mixer device for the TV card's volume/bass/treble + controls (requires a i2c audio control chip like the msp3400). + + insmod args: + debug=1 print some debug info to the syslog. + devnr=n allocate device #n (0 == /dev/mixer, + 1 = /dev/mixer1, ...), default is to + use the first free one. + +tvaudio.o + new, experimental module which is supported to provide a single + driver for all simple i2c audio control chips (tda/tea*). + + insmod args: + tda8425 = 1 enable/disable the support for the + tda9840 = 1 various chips. + tda9850 = 1 The tea6300 can't be autodetected and is + tda9855 = 1 therefore off by default, if you have + tda9873 = 1 this one on your card (STB uses these) + tda9874a = 1 you have to enable it explicitly. + tea6300 = 0 The two tda985x chips use the same i2c + tea6420 = 1 address and can't be disturgished from + pic16c54 = 1 each other, you might have to disable + the wrong one. + debug = 1 print debug messages + + insmod args for tda9874a: + tda9874a_SIF=1/2 select sound IF input pin (1 or 2) + (default is pin 1) + tda9874a_AMSEL=0/1 auto-mute select for NICAM (default=0) + Please read note 3 below! + tda9874a_STD=n select TV sound standard (0..8): + 0 - A2, B/G + 1 - A2, M (Korea) + 2 - A2, D/K (1) + 3 - A2, D/K (2) + 4 - A2, D/K (3) + 5 - NICAM, I + 6 - NICAM, B/G + 7 - NICAM, D/K (default) + 8 - NICAM, L + + Note 1: tda9874a supports both tda9874h (old) and tda9874a (new) chips. + Note 2: tda9874h/a and tda9875 (which is supported separately by + tda9875.o) use the same i2c address so both modules should not be + used at the same time. + Note 3: Using tda9874a_AMSEL option depends on your TV card design! + AMSEL=0: auto-mute will switch between NICAM sound + and the sound on 1st carrier (i.e. FM mono or AM). + AMSEL=1: auto-mute will switch between NICAM sound + and the analog mono input (MONOIN pin). + If tda9874a decoder on your card has MONOIN pin not connected, then + use only tda9874_AMSEL=0 or don't specify this option at all. + For example: + card=65 (FlyVideo 2000S) - set AMSEL=1 or AMSEL=0 + card=72 (Prolink PV-BT878P rev.9B) - set AMSEL=0 only + +msp3400.o + The driver for the msp34xx sound processor chips. If you have a + stereo card, you probably want to insmod this one. + + insmod args: + debug=1/2 print some debug info to the syslog, + 2 is more verbose. + simple=1 Use the "short programming" method. Newer + msp34xx versions support this. You need this + for dbx stereo. Default is on if supported by + the chip. + once=1 Don't check the TV-stations Audio mode + every few seconds, but only once after + channel switches. + amsound=1 Audio carrier is AM/NICAM at 6.5 Mhz. This + should improve things for french people, the + carrier autoscan seems to work with FM only... + +tea6300.o - OBSOLETE (use tvaudio instead) + The driver for the tea6300 fader chip. If you have a stereo + card and the msp3400.o doesn't work, you might want to try this + one. This chip is seen on most STB TV/FM cards (usually from + Gateway OEM sold surplus on auction sites). + + insmod args: + debug=1 print some debug info to the syslog. + +tda8425.o - OBSOLETE (use tvaudio instead) + The driver for the tda8425 fader chip. This driver used to be + part of bttv.c, so if your sound used to work but does not + anymore, try loading this module. + + insmod args: + debug=1 print some debug info to the syslog. + +tda985x.o - OBSOLETE (use tvaudio instead) + The driver for the tda9850/55 audio chips. + + insmod args: + debug=1 print some debug info to the syslog. + chip=9850/9855 set the chip type.