diff options
| author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-21 16:04:13 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:23 -0400 |
| commit | 45ad9f8b44b06bf1e91b4b3c338406c2233f0482 (patch) | |
| tree | b2cccb49543bcb7289d084a803c44354fcb64115 | |
| parent | 54aa9a21ca03cf41d911ada969e86f27ce58bab9 (diff) | |
V4L/DVB (4202): allow selecting CX2341x port mode
CX2341X port was always set to 'memory', but 'streaming' is also possible
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
| -rw-r--r-- | Documentation/video4linux/cx2341x/fw-encoder-api.txt | 8 | ||||
| -rw-r--r-- | drivers/media/video/cx2341x.c | 3 | ||||
| -rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 1 | ||||
| -rw-r--r-- | include/media/cx2341x.h | 7 |
4 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt index f74b0ae4a769..001c68644b08 100644 --- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt +++ b/Documentation/video4linux/cx2341x/fw-encoder-api.txt | |||
| @@ -270,11 +270,17 @@ Param[0] | |||
| 270 | Name CX2341X_ENC_SET_OUTPUT_PORT | 270 | Name CX2341X_ENC_SET_OUTPUT_PORT |
| 271 | Enum 187/0xBB | 271 | Enum 187/0xBB |
| 272 | Description | 272 | Description |
| 273 | Assign stream output port (not recommended you change setting from default) | 273 | Assign stream output port. Normally 0 when the data is copied through |
| 274 | the PCI bus (DMA), and 1 when the data is streamed to another chip | ||
| 275 | (pvrusb and cx88-blackbird). | ||
| 274 | Param[0] | 276 | Param[0] |
| 275 | 0=Memory (default) | 277 | 0=Memory (default) |
| 276 | 1=Streaming | 278 | 1=Streaming |
| 277 | 2=Serial | 279 | 2=Serial |
| 280 | Param[1] | ||
| 281 | Unknown, but leaving this to 0 seems to work best. Indications are that | ||
| 282 | this might have to do with USB support, although passing anything but 0 | ||
| 283 | onl breaks things. | ||
| 278 | 284 | ||
| 279 | ------------------------------------------------------------------------------- | 285 | ------------------------------------------------------------------------------- |
| 280 | 286 | ||
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c index 7cd1c4cf5aec..554813e6f65d 100644 --- a/drivers/media/video/cx2341x.c +++ b/drivers/media/video/cx2341x.c | |||
| @@ -639,6 +639,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) | |||
| 639 | { | 639 | { |
| 640 | static struct cx2341x_mpeg_params default_params = { | 640 | static struct cx2341x_mpeg_params default_params = { |
| 641 | /* misc */ | 641 | /* misc */ |
| 642 | .port = CX2341X_PORT_MEMORY, | ||
| 642 | .width = 720, | 643 | .width = 720, |
| 643 | .height = 480, | 644 | .height = 480, |
| 644 | .is_50hz = 0, | 645 | .is_50hz = 0, |
| @@ -714,7 +715,7 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func, | |||
| 714 | 715 | ||
| 715 | int err = 0; | 716 | int err = 0; |
| 716 | 717 | ||
| 717 | cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 1, 0); /* 0 = Memory */ | 718 | cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0); |
| 718 | 719 | ||
| 719 | if (old == NULL || old->is_50hz != new->is_50hz) { | 720 | if (old == NULL || old->is_50hz != new->is_50hz) { |
| 720 | err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_RATE, 1, new->is_50hz); | 721 | err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_RATE, 1, new->is_50hz); |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index 6e945de1f20a..26aac42ca8bd 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
| @@ -1043,6 +1043,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev, | |||
| 1043 | dev->width = 720; | 1043 | dev->width = 720; |
| 1044 | dev->height = 576; | 1044 | dev->height = 576; |
| 1045 | cx2341x_fill_defaults(&dev->params); | 1045 | cx2341x_fill_defaults(&dev->params); |
| 1046 | dev->params.port = CX2341X_PORT_STREAMING; | ||
| 1046 | 1047 | ||
| 1047 | switch (core->board) { | 1048 | switch (core->board) { |
| 1048 | case CX88_BOARD_HAUPPAUGE_ROSLYN: | 1049 | case CX88_BOARD_HAUPPAUGE_ROSLYN: |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index 0c9292fa5f6d..fb170d4b5235 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
| @@ -19,8 +19,15 @@ | |||
| 19 | #ifndef CX2341X_H | 19 | #ifndef CX2341X_H |
| 20 | #define CX2341X_H | 20 | #define CX2341X_H |
| 21 | 21 | ||
| 22 | enum cx2341x_port { | ||
| 23 | CX2341X_PORT_MEMORY, | ||
| 24 | CX2341X_PORT_STREAMING, | ||
| 25 | CX2341X_PORT_SERIAL | ||
| 26 | }; | ||
| 27 | |||
| 22 | struct cx2341x_mpeg_params { | 28 | struct cx2341x_mpeg_params { |
| 23 | /* misc */ | 29 | /* misc */ |
| 30 | enum cx2341x_port port; | ||
| 24 | u16 width; | 31 | u16 width; |
| 25 | u16 height; | 32 | u16 height; |
| 26 | u16 is_50hz; | 33 | u16 is_50hz; |
