Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271959
b: refs/heads/master
c: 4f9c414
h: refs/heads/master
i:
  271957: b5a081b
  271955: 0f86b0d
  271951: 65bfd6f
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 14, 2011
1 parent 6c3e684 commit 15f694e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99d389095f3270aaeb021370e01057910d3ef24d
refs/heads/master: 4f9c41439c495b4685393cf865418f7e6425fe60
19 changes: 16 additions & 3 deletions trunk/drivers/media/video/cx23885/cx23885-vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ MODULE_PARM_DESC(vbi_debug, "enable debug messages [vbi]");

/* ------------------------------------------------------------------ */

#define VBI_LINE_LENGTH 1440
#define NTSC_VBI_START_LINE 10 /* line 10 - 21 */
#define NTSC_VBI_END_LINE 21
#define NTSC_VBI_LINES (NTSC_VBI_END_LINE - NTSC_VBI_START_LINE + 1)


int cx23885_vbi_fmt(struct file *file, void *priv,
struct v4l2_format *f)
{
Expand All @@ -49,16 +55,21 @@ int cx23885_vbi_fmt(struct file *file, void *priv,

if (dev->tvnorm & V4L2_STD_525_60) {
/* ntsc */
f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
f->fmt.vbi.sampling_rate = 28636363;
f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
f->fmt.vbi.offset = 64 * 4;
f->fmt.vbi.start[0] = 10;
f->fmt.vbi.start[1] = 273;

f->fmt.vbi.count[0] = 17;
f->fmt.vbi.start[1] = 272;
f->fmt.vbi.count[1] = 17;
} else if (dev->tvnorm & V4L2_STD_625_50) {
/* pal */
f->fmt.vbi.sampling_rate = 35468950;
f->fmt.vbi.start[0] = 7 - 1;
f->fmt.vbi.start[1] = 319 - 1;
}

return 0;
}

Expand Down Expand Up @@ -106,6 +117,8 @@ static int cx23885_start_vbi_dma(struct cx23885_dev *dev,

/* reset counter */
cx_write(VID_A_GPCNT_CTL, 3);
cx_write(VID_A_VBI_CTRL, 3);
cx_write(VBI_A_GPCNT_CTL, 3);
q->count = 1;

/* enable irq */
Expand Down Expand Up @@ -168,7 +181,7 @@ void cx23885_vbi_timeout(unsigned long data)
}

/* ------------------------------------------------------------------ */
#define VBI_LINE_LENGTH 2048
#define VBI_LINE_LENGTH 1440
#define VBI_LINE_COUNT 17

static int
Expand Down

0 comments on commit 15f694e

Please sign in to comment.