For grins, I expanded on the same theme to set the values for 0x474, 0x475, 0x476, and 0x477 to the defaults listed in the datasheet appropriate for the required video mode. I did this against an old version of the driver, so there's no sense patchifying it, but this is what it looks like:

if(state->norm == VIDEO_MODE_NTSC){
CX25840_SET_VBLANK_CNT(0x0014); // '*' (Default 0x0014) Reg: 0x0474 Start bit: 0 Bit length: 8 CX25840_SET_VACTIVE_CNT(0x1e70); // '*' (Default 0x0049) Reg: 0x0475 Start bit: 4 Bit length: 4 CX25840_SET_V656BLANK_CNT(0x0020); // '*' (Default 0x0020) Reg: 0x0477 Start bit: 0 Bit length: 8
}
else {
CX25840_SET_VBLANK_CNT(0x0022); // '*' (Default 0x0014) Reg: 0x0474 Start bit: 0 Bit length: 8 CX25840_SET_VACTIVE_CNT(0x2400); // '*' (Default 0x0049) Reg: 0x0475 Start bit: 4 Bit length: 4 CX25840_SET_V656BLANK_CNT(0x002e); // '*' (Default 0x0020) Reg: 0x0477 Start bit: 0 Bit length: 8
}

and:

static void vbi_reg_setup(struct i2c_client *client)
{
     struct cx25840_state *state = i2c_get_clientdata(client);

    if(state->norm == VIDEO_MODE_NTSC){
         cx25840_write_04(client, 0x74, 0x14);
         cx25840_write_04(client, 0x75, 0x70);
         cx25840_write_04(client, 0x76, 0x1e);
         cx25840_write_04(client, 0x77, 0x20);
    }
    else {
         cx25840_write_04(client, 0x74, 0x22);
         cx25840_write_04(client, 0x75, 0x00);
         cx25840_write_04(client, 0x76, 0x24);
         cx25840_write_04(client, 0x77, 0x2e);
    }
    return;
}

For my part, so far I do seem to get good looking video, without the "Big Black Bottom Border", using this in NTSC land. I don't know what affect, if any, it has on vbi.

Bill

Ben Lancki wrote:

This was one of the last visual things bugging me with the driver. The
screen always appeared vertically offset by 10-15 pixels from the
broadcast video. According to the cx25840 documentation, VBLANK should
be 22 for NTSC and 34 for PAL/SECAM. This patch sets it to 22 or 34
depending on the card region (although I can only test NTSC). It was
originally set to 36 so probably NTSC people will be the only ones to
notice any big difference.


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
ivtv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ivtv-devel

Reply via email to