samenvattend: vbi_frame (capture raw) standard bttv driver, PAL resulteerd in: HSCALE=0 VSCALE=0 HDELAY=186 VDELAY =0x20 HACTIVE=924 HDELAY=186 VACTIVE=576 VDELAY= 0x20 CROP=3 | 0 |32 |8 = 27 VTOTAL=0 //means 625 risc1: btcx_riscmem=&buf->top offset=0 bpl=RAW_BPL=1024 padding=0 lines=RAW_LINES=640 risc2: btcx_riscmem=&buf->bottom offset=buf->vb.size/2 bpl=RAW_BPL=1024 padding=0 lines=RAW_LINES=640 note: in bttv_prepare_buffer wordt RAW_LINES*2 voor creeren van de buffer gebruikt (omdat top en bottem er in moeten passen) capture_width RAW_BPL=1024 or 2048. This might need to correspond to frm_size or frm_size/2 capture_height=RAW_LINES=640 //674 when using extend_vbi=1 force_htotal:default (1135 for PAL) probably this does not need to change in vbi_frame mode so don't use this force_vdelay=default (32) // or 2 when using extend_vbi=1 force_vactive=default (576) //610 when using extend_vbi=1 //bttv-hacked=690,//624,//orig 576 or 640 of 650 of 674 of 692 of ?? force_hactive=924 ?? (set to tvnorm.hactivex1) force_maxh=2048 (set to capture_width or greater) force_maxw=625 (set to capture_height or greater) frm_size = probably 2048 or 1024 ? 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. he 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 vbi_v_del=2 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. extend_vbi=1 (of 0) A value of 1 extends the frame output capture region to include the 20 half lines prior to the default VACTIVE region. 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. 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/2 taken during a normal capture 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. 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*