diff options
author | Gerd Knorr <devnull@localhost> | 2004-05-07 09:00:34 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-05-07 09:00:34 +0000 |
commit | 133924f0d0b13244d42187e76661f07965383078 (patch) | |
tree | 83bc0047f919eaf03a86fc435beac8eea4cb1648 /linux/drivers/media/video/cx88/cx88-video.c | |
parent | f42bc240e3f18da6d9814d1673ab8c3302666b08 (diff) | |
download | mediapointer-dvb-s2-133924f0d0b13244d42187e76661f07965383078.tar.gz mediapointer-dvb-s2-133924f0d0b13244d42187e76661f07965383078.tar.bz2 |
- fix and enable single field capture in cx88.
- mt2050 antenna selection, based on patch by Matthias Reichl.
- msp3400 cleanups by Perry Gilfillan.
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 8da65fbcd..d3303a422 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2,7 +2,7 @@ * device driver for Conexant 2388x based TV cards * video4linux video interface * - * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] + * (c) 2003-04 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -612,13 +612,18 @@ static int set_tvnorm(struct cx8800_dev *dev, struct cx8800_tvnorm *norm) } static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int height, - int interlaced) + enum v4l2_field field) { unsigned int swidth = norm_swidth(dev->tvnorm); unsigned int sheight = norm_maxh(dev->tvnorm); u32 value; - dprintk(1,"set_scale: %dx%d [%s]\n", width, height, dev->tvnorm->name); + dprintk(1,"set_scale: %dx%d [%s%s,%s]\n", width, height, + V4L2_FIELD_HAS_TOP(field) ? "T" : "", + V4L2_FIELD_HAS_BOTTOM(field) ? "B" : "", + dev->tvnorm->name); + if (!V4L2_FIELD_HAS_BOTH(field)) + height *= 2; // recalc H delay and scale registers value = (width * norm_hdelay(dev->tvnorm)) / swidth; @@ -653,7 +658,7 @@ static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int he // setup filters value = 0; value |= (1 << 19); // CFILT (default) - if (interlaced) + if (V4L2_FIELD_INTERLACED == field) value |= (1 << 3); // VINT (interlaced vertical scaling) if (width < 385) value |= (1 << 0); // 3-tap interpolation @@ -702,7 +707,7 @@ static int start_video_dma(struct cx8800_dev *dev, /* setup fifo + format */ 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); + set_scale(dev, buf->vb.width, buf->vb.height, buf->vb.field); cx_write(MO_COLOR_CTRL, buf->fmt->cxformat | ColorFormatGamma); /* reset counter */ @@ -1474,15 +1479,12 @@ static int cx8800_try_fmt(struct cx8800_dev *dev, struct cx8800_fh *fh, maxw = norm_maxw(dev->tvnorm); maxh = norm_maxh(dev->tvnorm); -#if 0 if (V4L2_FIELD_ANY == field) { field = (f->fmt.pix.height > maxh/2) ? V4L2_FIELD_INTERLACED : V4L2_FIELD_BOTTOM; } -#else - field = V4L2_FIELD_INTERLACED; -#endif + switch (field) { case V4L2_FIELD_TOP: case V4L2_FIELD_BOTTOM: |