summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-12-02 13:44:44 +0000
committerGerd Knorr <devnull@localhost>2004-12-02 13:44:44 +0000
commitfb0763d2a0e6d78243a452049bdef5177266f6e5 (patch)
tree69b7ac407ab9d67900bed2cc380faa74838ea303 /linux/drivers/media/video/cx88
parent57953d13b62cc05a6ad68f83d08c799939a74f63 (diff)
downloadmediapointer-dvb-s2-fb0763d2a0e6d78243a452049bdef5177266f6e5.tar.gz
mediapointer-dvb-s2-fb0763d2a0e6d78243a452049bdef5177266f6e5.tar.bz2
- attempt to fix cx88 blackbird.
- fix vbi initialization issue.
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c15
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c5
-rw-r--r--linux/drivers/media/video/cx88/cx88.h4
3 files changed, 18 insertions, 6 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index ce8d9dbc9..a76e3a79b 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.19 2004/11/19 18:07:12 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.20 2004/12/02 13:44:44 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -423,7 +423,8 @@ static void blackbird_codec_settings(struct cx8802_dev *dev)
blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAMERATE, 1, 0, 0);
/* assign frame size */
- blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAME_SIZE, 2, 0, 480, 720);
+ blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAME_SIZE, 2, 0,
+ dev->height, dev->width);
/* assign aspect ratio */
blackbird_api_cmd(dev, IVTV_API_ASSIGN_ASPECT_RATIO, 1, 0, 2);
@@ -625,8 +626,8 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
memset(f,0,sizeof(*f));
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- f->fmt.pix.width = 720;
- f->fmt.pix.height = 576;
+ f->fmt.pix.width = dev->width;
+ f->fmt.pix.height = dev->height;
f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
f->fmt.pix.sizeimage = 1024 * 512 /* FIXME: BUFFER_SIZE */;
}
@@ -690,6 +691,10 @@ static int mpeg_open(struct inode *inode, struct file *file)
file->private_data = fh;
fh->dev = dev;
+ /* FIXME: locking against other video device */
+ cx88_set_scale(dev->core, dev->width, dev->height,
+ V4L2_FIELD_INTERLACED);
+
videobuf_queue_init(&fh->mpegq, &blackbird_qops,
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VIDEO_CAPTURE,
@@ -817,6 +822,8 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
memset(dev,0,sizeof(*dev));
dev->pci = pci_dev;
dev->core = core;
+ dev->width = 720;
+ dev->height = 480;
err = cx8802_init_common(dev);
if (0 != err)
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 9bf791d14..4a177e056 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-core.c,v 1.18 2004/11/30 17:00:13 kraxel Exp $
+ * $Id: cx88-core.c,v 1.19 2004/12/02 13:44:44 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* driver core
@@ -986,6 +986,9 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */
norm_vbipack(norm)));
+ // this is needed as well to set all tvnorm parameter
+ cx88_set_scale(core, 320, 240, V4L2_FIELD_INTERLACED);
+
// audio
set_tvaudio(core);
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index bede61423..c3a29aa76 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -1,5 +1,5 @@
/*
- * $Id: cx88.h,v 1.43 2004/11/30 17:00:13 kraxel Exp $
+ * $Id: cx88.h,v 1.44 2004/12/02 13:44:44 kraxel Exp $
*
* v4l2 device driver for cx2388x based TV cards
*
@@ -386,6 +386,8 @@ struct cx8802_dev {
struct list_head devlist;
struct video_device *mpeg_dev;
u32 mailbox;
+ int width;
+ int height;
/* for dvb only */
struct videobuf_dvb dvb;