summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-06-21 22:04:13 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2006-06-21 22:04:13 +0200
commitc3c161df40114ed8f7c0a3bebd385c173919de18 (patch)
tree09179260d43e449a02a610132e4cddcb745c0d7d /linux
parent71f2bbd7d30a3c7ea2e220dd61e37e4e05f56b95 (diff)
downloadmediapointer-dvb-s2-c3c161df40114ed8f7c0a3bebd385c173919de18.tar.gz
mediapointer-dvb-s2-c3c161df40114ed8f7c0a3bebd385c173919de18.tar.bz2
CX2341X port was always set to 'memory', but 'streaming' is also possible
From: Hans Verkuil <hverkuil@xs4all.nl> ivtv uses the memory (DMA) interface with the CX2341X, while pvrusb2 and cx88-blackbird use the streaming interface. This setting is now selectable by the driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt8
-rw-r--r--linux/drivers/media/video/cx2341x.c3
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c1
-rw-r--r--linux/include/media/cx2341x.h7
4 files changed, 17 insertions, 2 deletions
diff --git a/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
index 58c7243d0..9834b4c76 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
@@ -270,11 +270,17 @@ Param[0]
Name CX2341X_ENC_SET_OUTPUT_PORT
Enum 187/0xBB
Description
- Assign stream output port (not recommended you change setting from default)
+ Assign stream output port. Normally 0 when the data is copied through
+ the PCI bus (DMA), and 1 when the data is streamed to another chip
+ (pvrusb and cx88-blackbird).
Param[0]
0=Memory (default)
1=Streaming
2=Serial
+Param[1]
+ Unknown, but leaving this to 0 seems to work best. Indications are that
+ this might have to do with USB support, although passing anything but 0
+ onl breaks things.
-------------------------------------------------------------------------------
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c
index 33e955f7c..29a5c8e5c 100644
--- a/linux/drivers/media/video/cx2341x.c
+++ b/linux/drivers/media/video/cx2341x.c
@@ -643,6 +643,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
{
static struct cx2341x_mpeg_params default_params = {
/* misc */
+ .port = CX2341X_PORT_MEMORY,
.width = 720,
.height = 480,
.is_50hz = 0,
@@ -718,7 +719,7 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
int err = 0;
- cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 1, 0); /* 0 = Memory */
+ cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0);
if (old == NULL || old->is_50hz != new->is_50hz) {
err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_RATE, 1, new->is_50hz);
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index 1a86d337f..d6d19a71e 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1076,6 +1076,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
dev->width = 720;
dev->height = 576;
cx2341x_fill_defaults(&dev->params);
+ dev->params.port = CX2341X_PORT_STREAMING;
switch (core->board) {
case CX88_BOARD_HAUPPAUGE_ROSLYN:
diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h
index 0c9292fa5..fb170d4b5 100644
--- a/linux/include/media/cx2341x.h
+++ b/linux/include/media/cx2341x.h
@@ -19,8 +19,15 @@
#ifndef CX2341X_H
#define CX2341X_H
+enum cx2341x_port {
+ CX2341X_PORT_MEMORY,
+ CX2341X_PORT_STREAMING,
+ CX2341X_PORT_SERIAL
+};
+
struct cx2341x_mpeg_params {
/* misc */
+ enum cx2341x_port port;
u16 width;
u16 height;
u16 is_50hz;