X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fcx25840%2Fcx25840-vbi.c;h=ced13febed895396965483c7d710584637d1e8b6;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=6cc8bf215e851c548beedecd46d254d626dc052f;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index 6cc8bf215..ced13febe 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c @@ -111,6 +111,10 @@ void cx25840_vbi_setup(struct i2c_client *client) uv_lpf=0; comb=0; sc=0x0a425f; + } else if (std == V4L2_STD_PAL_Nc) { + uv_lpf=1; + comb=0x20; + sc=556453; } else { uv_lpf=1; comb=0x20; @@ -124,7 +128,14 @@ void cx25840_vbi_setup(struct i2c_client *client) uv_lpf=1; src_decimation=0x21f; - if (std == V4L2_STD_PAL_M) { + if (std == V4L2_STD_PAL_60) { + vblank=26; + vblank656=26; + burst=0x5b; + luma_lpf=2; + comb=0x20; + sc=0x0a8263; + } else if (std == V4L2_STD_PAL_M) { vblank=20; vblank656=24; burst=0x61; @@ -231,6 +242,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) 0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */ 0, 0, 0, 0 }; + int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60); int i; fmt = arg; @@ -242,13 +254,25 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) if ((cx25840_read(client, 0x404) & 0x10) == 0) break; - for (i = 7; i <= 23; i++) { - u8 v = cx25840_read(client, 0x424 + i - 7); + if (is_pal) { + for (i = 7; i <= 23; i++) { + u8 v = cx25840_read(client, 0x424 + i - 7); - svbi->service_lines[0][i] = lcr2vbi[v >> 4]; - svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; - svbi->service_set |= - svbi->service_lines[0][i] | svbi->service_lines[1][i]; + svbi->service_lines[0][i] = lcr2vbi[v >> 4]; + svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; + svbi->service_set |= + svbi->service_lines[0][i] | svbi->service_lines[1][i]; + } + } + else { + for (i = 10; i <= 21; i++) { + u8 v = cx25840_read(client, 0x424 + i - 10); + + svbi->service_lines[0][i] = lcr2vbi[v >> 4]; + svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; + svbi->service_set |= + svbi->service_lines[0][i] | svbi->service_lines[1][i]; + } } break; }