summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/Kconfig1
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c144
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c3
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-core.c10
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h6
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c1
-rw-r--r--linux/drivers/media/video/pwc/pwc-dec23.c2
-rw-r--r--linux/drivers/media/video/pwc/pwc-v4l.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c3
-rw-r--r--linux/drivers/media/video/tuner-core.c6
16 files changed, 86 insertions, 110 deletions
diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig
index 4df2ede38..cf36fd123 100644
--- a/linux/drivers/media/video/Kconfig
+++ b/linux/drivers/media/video/Kconfig
@@ -19,6 +19,7 @@ config VIDEO_ADV_DEBUG
config VIDEO_VIVI
tristate "Virtual Video Driver"
depends on VIDEO_V4L2 && !SPARC32 && !SPARC64
+ select VIDEO_BUF
default n
---help---
Enables a virtual video driver. This device shows a color bar
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index cd45a2429..909084515 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -3014,13 +3014,13 @@ void __devinit bttv_idcard(struct bttv *btv)
if (UNSET != audiomux[0]) {
gpiobits = 0;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 4; i++) {
bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
gpiobits |= audiomux[i];
}
} else {
gpiobits = audioall;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 4; i++) {
bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
}
}
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index 69d3c3c8f..aff6f4dd3 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -710,7 +710,7 @@ static struct snd_kcontrol_new snd_cx88_capture_volume = {
* Only boards with eeprom and byte 1 at eeprom=1 have it
*/
-static struct pci_device_id cx88_audio_pci_tbl[] = {
+static struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = {
{0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0, }
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index f34a76511..05904b655 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -33,9 +33,10 @@
#include <linux/device.h>
#endif
#include <linux/firmware.h>
+#include <media/v4l2-common.h>
+#include <media/cx2341x.h>
#include "cx88.h"
-#include <media/v4l2-common.h>
MODULE_DESCRIPTION("driver for cx2388x/cx23416 based mpeg encoder cards");
MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>, Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
@@ -56,7 +57,6 @@ static LIST_HEAD(cx8802_devlist);
/* ------------------------------------------------------------------ */
-#define BLACKBIRD_FIRM_ENC_FILENAME "blackbird-fw-enc.bin"
#define BLACKBIRD_FIRM_IMAGE_SIZE 256*1024
/* defines below are from ivtv-driver.h */
@@ -69,8 +69,6 @@ static LIST_HEAD(cx8802_devlist);
#endif
#define IVTV_API_STD_TIMEOUT 500
-#define BLACKBIRD_API_PING 0x80
-#define BLACKBIRD_API_BEGIN_CAPTURE 0x81
enum blackbird_capture_type {
BLACKBIRD_MPEG_CAPTURE,
BLACKBIRD_RAW_CAPTURE,
@@ -84,21 +82,14 @@ enum blackbird_capture_bits {
BLACKBIRD_RAW_BITS_PASSTHRU_CAPTURE = 0x08,
BLACKBIRD_RAW_BITS_TO_HOST_CAPTURE = 0x10
};
-#define BLACKBIRD_API_END_CAPTURE 0x82
enum blackbird_capture_end {
BLACKBIRD_END_AT_GOP, /* stop at the end of gop, generate irq */
BLACKBIRD_END_NOW, /* stop immediately, no irq */
};
-#define BLACKBIRD_API_SET_AUDIO_ID 0x89
-#define BLACKBIRD_API_SET_VIDEO_ID 0x8B
-#define BLACKBIRD_API_SET_PCR_ID 0x8D
-#define BLACKBIRD_API_SET_FRAMERATE 0x8F
enum blackbird_framerate {
BLACKBIRD_FRAMERATE_NTSC_30, /* NTSC: 30fps */
BLACKBIRD_FRAMERATE_PAL_25 /* PAL: 25fps */
};
-#define BLACKBIRD_API_SET_RESOLUTION 0x91
-#define BLACKBIRD_API_SET_VIDEO_BITRATE 0x95
enum blackbird_video_bitrate_type {
BLACKBIRD_VIDEO_VBR,
BLACKBIRD_VIDEO_CBR
@@ -109,8 +100,6 @@ enum blackbird_mux_rate {
/* dvd mux rate: multiply by 400 to get the actual rate */
BLACKBIRD_MUX_RATE_DVD = 25200
};
-#define BLACKBIRD_API_SET_GOP_STRUCTURE 0x97
-#define BLACKBIRD_API_SET_ASPECT_RATIO 0x99
enum blackbird_aspect_ratio {
BLACKBIRD_ASPECT_RATIO_FORBIDDEN,
BLACKBIRD_ASPECT_RATIO_1_1_SQUARE,
@@ -119,7 +108,6 @@ enum blackbird_aspect_ratio {
BLACKBIRD_ASPECT_RATIO_221_100,
BLACKBIRD_ASPECT_RATIO_RESERVED
};
-#define BLACKBIRD_API_SET_DNR_MODE 0x9B
enum blackbird_dnr_bits {
BLACKBIRD_DNR_BITS_MANUAL,
BLACKBIRD_DNR_BITS_AUTO_SPATIAL,
@@ -133,9 +121,6 @@ enum blackbird_median_filter {
BLACKBIRD_MEDIAN_FILTER_HV,
BLACKBIRD_MEDIAN_FILTER_DIAGONAL
};
-#define BLACKBIRD_API_SET_MANUAL_DNR 0x9D
-#define BLACKBIRD_API_SET_DNR_MEDIAN 0x9F
-#define BLACKBIRD_API_SET_SPATIAL_FILTER 0xA1
enum blackbird_spatial_filter_luma {
BLACKBIRD_SPATIAL_FILTER_LUMA_DISABLED,
BLACKBIRD_SPATIAL_FILTER_LUMA_1D_HORIZ,
@@ -147,12 +132,10 @@ enum blackbird_spatial_filter_chroma {
BLACKBIRD_SPATIAL_FILTER_CHROMA_DISABLED,
BLACKBIRD_SPATIAL_FILTER_CHROMA_1D_HORIZ /* default */
};
-#define BLACKBIRD_API_SET_3_2_PULLDOWN 0xB1
enum blackbird_pulldown {
BLACKBIRD_3_2_PULLDOWN_DISABLED,
BLACKBIRD_3_2_PULLDOWN_ENABLED
};
-#define BLACKBIRD_API_SET_VBI_LINE_NO 0xB7
enum blackbird_vbi_line_bits {
BLACKBIRD_VBI_LINE_BITS_TOP_FIELD,
BLACKBIRD_VBI_LINE_BITS_BOT_FIELD = (1 << 31),
@@ -166,7 +149,6 @@ enum blackbird_vbi_slicing {
BLACKBIRD_VBI_SLICING_NONE,
BLACKBIRD_VBI_SLICING_CLOSED_CAPTION
};
-#define BLACKBIRD_API_SET_STREAM_TYPE 0xB9
enum blackbird_stream_type {
BLACKBIRD_STREAM_PROGRAM,
BLACKBIRD_STREAM_TRANSPORT,
@@ -182,13 +164,11 @@ enum blackbird_stream_type {
BLACKBIRD_STREAM_VCD,
BLACKBIRD_STREAM_UNKNOWN12 /* svcd/xvcd ? */
};
-#define BLACKBIRD_API_SET_OUTPUT_PORT 0xBB
enum blackbird_stream_port {
BLACKBIRD_OUTPUT_PORT_MEMORY,
BLACKBIRD_OUTPUT_PORT_STREAMING,
BLACKBIRD_OUTPUT_PORT_SERIAL
};
-#define BLACKBIRD_API_SET_AUDIO_PARAMS 0xBD
enum blackbird_audio_bits_sample_rate {
BLACKBIRD_AUDIO_BITS_44100HZ,
BLACKBIRD_AUDIO_BITS_48000HZ,
@@ -263,26 +243,20 @@ enum blackbird_audio_bits_original {
BLACKBIRD_AUDIO_BITS_COPY,
BLACKBIRD_AUDIO_BITS_ORIGINAL = 0x1 << 16,
};
-#define BLACKBIRD_API_HALT 0xC3
-#define BLACKBIRD_API_GET_VERSION 0xC4
-#define BLACKBIRD_API_SET_GOP_CLOSURE 0xC5
enum blackbird_gop_closure {
BLACKBIRD_GOP_CLOSURE_OFF,
BLACKBIRD_GOP_CLOSURE_ON,
};
-#define BLACKBIRD_API_DATA_XFER_STATUS 0xC6
enum blackbird_data_xfer_status {
BLACKBIRD_MORE_BUFFERS_FOLLOW,
BLACKBIRD_LAST_BUFFER,
};
-#define BLACKBIRD_API_PROGRAM_INDEX_INFO 0xC7
enum blackbird_picture_mask {
BLACKBIRD_PICTURE_MASK_NONE,
BLACKBIRD_PICTURE_MASK_I_FRAMES,
BLACKBIRD_PICTURE_MASK_I_P_FRAMES = 0x3,
BLACKBIRD_PICTURE_MASK_ALL_FRAMES = 0x7,
};
-#define BLACKBIRD_API_SET_VBI_PARAMS 0xC8
enum blackbird_vbi_mode_bits {
BLACKBIRD_VBI_BITS_SLICED,
BLACKBIRD_VBI_BITS_RAW,
@@ -294,33 +268,23 @@ enum blackbird_vbi_insertion_bits {
BLACKBIRD_VBI_BITS_SEPARATE_STREAM_USR_DATA = 0x4 << 1,
BLACKBIRD_VBI_BITS_SEPARATE_STREAM_PRV_DATA = 0x5 << 1,
};
-#define BLACKBIRD_API_SET_DMA_BLOCK_SIZE 0xC9
enum blackbird_dma_unit {
BLACKBIRD_DMA_BYTES,
BLACKBIRD_DMA_FRAMES,
};
-#define BLACKBIRD_API_DMA_TRANSFER_INFO 0xCA
-#define BLACKBIRD_API_DMA_TRANSFER_STAT 0xCB
enum blackbird_dma_transfer_status_bits {
BLACKBIRD_DMA_TRANSFER_BITS_DONE = 0x01,
BLACKBIRD_DMA_TRANSFER_BITS_ERROR = 0x04,
BLACKBIRD_DMA_TRANSFER_BITS_LL_ERROR = 0x10,
};
-#define BLACKBIRD_API_SET_DMA2HOST_ADDR 0xCC
-#define BLACKBIRD_API_INIT_VIDEO_INPUT 0xCD
-#define BLACKBIRD_API_SET_FRAMESKIP 0xD0
-#define BLACKBIRD_API_PAUSE 0xD2
enum blackbird_pause {
BLACKBIRD_PAUSE_ENCODING,
BLACKBIRD_RESUME_ENCODING,
};
-#define BLACKBIRD_API_REFRESH_INPUT 0xD3
-#define BLACKBIRD_API_SET_COPYRIGHT 0xD4
enum blackbird_copyright {
BLACKBIRD_COPYRIGHT_OFF,
BLACKBIRD_COPYRIGHT_ON,
};
-#define BLACKBIRD_API_SET_NOTIFICATION 0xD5
enum blackbird_notification_type {
BLACKBIRD_NOTIFICATION_REFRESH,
};
@@ -331,7 +295,6 @@ enum blackbird_notification_status {
enum blackbird_notification_mailbox {
BLACKBIRD_NOTIFICATION_NO_MAILBOX = -1,
};
-#define BLACKBIRD_API_SET_CAPTURE_LINES 0xD6
enum blackbird_field1_lines {
BLACKBIRD_FIELD1_SAA7114 = 0x00EF, /* 239 */
BLACKBIRD_FIELD1_SAA7115 = 0x00F0, /* 240 */
@@ -342,12 +305,10 @@ enum blackbird_field2_lines {
BLACKBIRD_FIELD2_SAA7115 = 0x00F0, /* 240 */
BLACKBIRD_FIELD2_MICRONAS = 0x0106, /* 262 */
};
-#define BLACKBIRD_API_SET_CUSTOM_DATA 0xD7
enum blackbird_custom_data_type {
BLACKBIRD_CUSTOM_EXTENSION_USR_DATA,
BLACKBIRD_CUSTOM_PRIVATE_PACKET,
};
-#define BLACKBIRD_API_MUTE_VIDEO 0xD9
enum blackbird_mute {
BLACKBIRD_UNMUTE,
BLACKBIRD_MUTE,
@@ -362,7 +323,6 @@ enum blackbird_mute_video_shift {
BLACKBIRD_MUTE_VIDEO_U_SHIFT = 16,
BLACKBIRD_MUTE_VIDEO_Y_SHIFT = 24,
};
-#define BLACKBIRD_API_MUTE_AUDIO 0xDA
/* Registers */
#define IVTV_REG_ENC_SDRAM_REFRESH (0x07F8 /*| IVTV_REG_OFFSET*/)
@@ -621,17 +581,17 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
dprintk(0, "Error with register_write\n");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME,
+ retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME,
&dev->pci->dev);
#else
- retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME,
+ retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME,
pci_name(dev->pci));
#endif
if (retval != 0) {
dprintk(0, "ERROR: Hotplug firmware request failed (%s).\n",
- BLACKBIRD_FIRM_ENC_FILENAME);
+ CX2341X_FIRM_ENC_FILENAME);
dprintk(0, "Please fix your hotplug setup, the board will "
"not work without firmware loaded!\n");
return -1;
@@ -803,33 +763,33 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
params->vi_type = V4L2_MPEG_VI_1;
else
params->vi_type = V4L2_MPEG_VI_2;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]);
/* assign framerate */
if( params->vi_frame_rate <= 25 )
{
params->vi_frame_rate = 25;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_RATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25);
}
else
{
params->vi_frame_rate = 30;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_RATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30);
}
/* assign aspect ratio */
if( params->vi_aspect_ratio >= ARRAY_SIZE(mpeg_stream_ratios) )
params->vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]);
/* assign gop properties */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_STRUCTURE, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_GOP_PROPERTIES, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1);
/* assign gop closure */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_CLOSURE, 1, 0, params->closed_gops);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_GOP_CLOSURE, 1, 0, params->closed_gops);
/* assign 3 2 pulldown */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_3_2_PULLDOWN, 1, 0, params->pulldown);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_3_2_PULLDOWN, 1, 0, params->pulldown);
/* make sure the params are within bounds */
if( params->st_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) )
@@ -919,7 +879,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
params->au_bitrate.target = params->au_bitrate.max = 0;
au_params |= 0;
}
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_AUDIO_PARAMS, 1, 0, au_params );
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, 0, au_params );
/* assign bitrates */
if( params->vi_bitrate.mode )
@@ -946,7 +906,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
params->vi_bitrate.max = params->st_bitrate.max - params->au_bitrate.max;
params->vi_bitrate.target = params->st_bitrate.target - params->au_bitrate.target;
}
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_VIDEO_BITRATE, 4, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_BIT_RATE, 4, 0,
mpeg_video_bitrates[params->vi_bitrate.mode],
params->vi_bitrate.target * 1000, /* kbps -> bps */
params->vi_bitrate.max * 1000 / BLACKBIRD_PEAK_RATE_DIVISOR, /* peak/400 */
@@ -975,7 +935,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
{
UPDATE_PARAM( st_type );
UPDATE_PARAM( vi_type );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]);
}
/* assign framerate */
@@ -987,9 +947,9 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
{
UPDATE_PARAM( vi_frame_rate );
if( params->vi_frame_rate == 25 )
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_RATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25);
else
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_RATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30);
}
/* assign aspect ratio */
@@ -998,7 +958,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
IF_PARAM( vi_aspect_ratio )
{
UPDATE_PARAM( vi_aspect_ratio );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]);
}
/* assign gop properties */
@@ -1006,21 +966,21 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
{
UPDATE_PARAM( vi_frames_per_gop );
UPDATE_PARAM( vi_bframes_count );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_STRUCTURE, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_GOP_PROPERTIES, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1);
}
/* assign gop closure */
IF_PARAM( closed_gops )
{
UPDATE_PARAM( closed_gops );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_CLOSURE, 1, 0, params->closed_gops);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_GOP_CLOSURE, 1, 0, params->closed_gops);
}
/* assign 3 2 pulldown */
IF_PARAM( pulldown )
{
UPDATE_PARAM( pulldown );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_3_2_PULLDOWN, 1, 0, params->pulldown);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_3_2_PULLDOWN, 1, 0, params->pulldown);
}
/* make sure the params are within bounds */
@@ -1119,7 +1079,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
UPDATE_PARAM( au_type );
UPDATE_PARAM( au_sample_rate );
UPDATE_PARAM( au_bitrate );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_AUDIO_PARAMS, 1, 0, au_params );
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, 0, au_params );
}
/* assign bitrates */
@@ -1153,7 +1113,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
)
{
UPDATE_PARAM( vi_bitrate );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_VIDEO_BITRATE, 4, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_BIT_RATE, 4, 0,
mpeg_video_bitrates[params->vi_bitrate.mode],
params->vi_bitrate.target * 1000, /* kbps -> bps */
params->vi_bitrate.max * 1000 / BLACKBIRD_PEAK_RATE_DIVISOR, /* peak/400 */
@@ -1180,7 +1140,7 @@ static void blackbird_set_default_dnr_params(struct cx8802_dev *dev)
dev->dnr_params.mode = BLACKBIRD_DNR_BITS_MANUAL;
if( dev->dnr_params.type > BLACKBIRD_MEDIAN_FILTER_DIAGONAL )
dev->dnr_params.type = BLACKBIRD_MEDIAN_FILTER_DISABLED;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MODE, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_DNR_FILTER_MODE, 2, 0,
dev->dnr_params.mode,
dev->dnr_params.type
);
@@ -1190,7 +1150,7 @@ static void blackbird_set_default_dnr_params(struct cx8802_dev *dev)
dev->dnr_params.spatial = 15;
if( dev->dnr_params.temporal > 31 )
dev->dnr_params.temporal = 31;
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_MANUAL_DNR, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_DNR_FILTER_PROPS, 2, 0,
dev->dnr_params.spatial,
dev->dnr_params.temporal
);
@@ -1210,7 +1170,7 @@ void blackbird_set_dnr_params(struct cx8802_dev *dev, struct blackbird_dnr* dnr_
{
UPDATE_DNR_PARAM( mode );
UPDATE_DNR_PARAM( type );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MODE, 2, 0, dnr_params->mode, dnr_params->type);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_DNR_FILTER_MODE, 2, 0, dnr_params->mode, dnr_params->type);
}
/* assign dnr filter props*/
@@ -1222,7 +1182,7 @@ void blackbird_set_dnr_params(struct cx8802_dev *dev, struct blackbird_dnr* dnr_
{
UPDATE_DNR_PARAM( spatial );
UPDATE_DNR_PARAM( temporal );
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_MANUAL_DNR, 2, 0, dnr_params->spatial, dnr_params->temporal);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_DNR_FILTER_PROPS, 2, 0, dnr_params->spatial, dnr_params->temporal);
}
}
@@ -1230,17 +1190,17 @@ static void blackbird_codec_settings(struct cx8802_dev *dev)
{
/* assign output port */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_OUTPUT_PORT, 1, 0, BLACKBIRD_OUTPUT_PORT_STREAMING); /* Host */
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_OUTPUT_PORT, 1, 0, BLACKBIRD_OUTPUT_PORT_STREAMING); /* Host */
/* assign frame size */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_RESOLUTION, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_SIZE, 2, 0,
dev->height, dev->width);
/* assign coring levels (luma_h, luma_l, chroma_h, chroma_l) */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MEDIAN, 4, 0, 0, 255, 0, 255);
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_CORING_LEVELS, 4, 0, 0, 255, 0, 255);
/* assign spatial filter type: luma_t: horiz_only, chroma_t: horiz_only */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_SPATIAL_FILTER, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_SPATIAL_FILTER_TYPE, 2, 0,
BLACKBIRD_SPATIAL_FILTER_LUMA_1D_HORIZ,
BLACKBIRD_SPATIAL_FILTER_CHROMA_1D_HORIZ
);
@@ -1259,7 +1219,7 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
int retval;
dprintk(1,"Initialize codec\n");
- retval = blackbird_api_cmd(dev, BLACKBIRD_API_PING, 0, 0); /* ping */
+ retval = blackbird_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */
if (retval < 0) {
/* ping was not successful, reset and upload firmware */
cx_write(MO_SRST_IO, 0); /* SYS_RSTO=0 */
@@ -1274,13 +1234,13 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
if (dev->mailbox < 0)
return -1;
- retval = blackbird_api_cmd(dev, BLACKBIRD_API_PING, 0, 0); /* ping */
+ retval = blackbird_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */
if (retval < 0) {
dprintk(0, "ERROR: Firmware ping failed!\n");
return -1;
}
- retval = blackbird_api_cmd(dev, BLACKBIRD_API_GET_VERSION, 0, 1, &version);
+ retval = blackbird_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1, &version);
if (retval < 0) {
dprintk(0, "ERROR: Firmware get encoder version failed!\n");
return -1;
@@ -1300,35 +1260,35 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
/* blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0xef, 0xef);
blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0xf0, 0xf0);
blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0x180, 0x180); */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_CAPTURE_LINES, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_NUM_VSYNC_LINES, 2, 0,
BLACKBIRD_FIELD1_SAA7115,
BLACKBIRD_FIELD2_SAA7115
);
/* blackbird_api_cmd(dev, IVTV_API_ASSIGN_PLACEHOLDER, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); */
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_CUSTOM_DATA, 12, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_PLACEHOLDER, 12, 0,
BLACKBIRD_CUSTOM_EXTENSION_USR_DATA,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
/* initialize the video input */
- blackbird_api_cmd(dev, BLACKBIRD_API_INIT_VIDEO_INPUT, 0, 0);
+ blackbird_api_cmd(dev, CX2341X_ENC_INITIALIZE_INPUT, 0, 0);
msleep(1);
- blackbird_api_cmd(dev, BLACKBIRD_API_MUTE_VIDEO, 1, 0, BLACKBIRD_UNMUTE);
+ blackbird_api_cmd(dev, CX2341X_ENC_MUTE_VIDEO, 1, 0, BLACKBIRD_UNMUTE);
msleep(1);
- blackbird_api_cmd(dev, BLACKBIRD_API_MUTE_AUDIO, 1, 0, BLACKBIRD_UNMUTE);
+ blackbird_api_cmd(dev, CX2341X_ENC_MUTE_AUDIO, 1, 0, BLACKBIRD_UNMUTE);
msleep(1);
/* start capturing to the host interface */
- /* blackbird_api_cmd(dev, BLACKBIRD_API_BEGIN_CAPTURE, 2, 0, 0, 0x13); */
- blackbird_api_cmd(dev, BLACKBIRD_API_BEGIN_CAPTURE, 2, 0,
+ /* blackbird_api_cmd(dev, CX2341X_ENC_START_CAPTURE, 2, 0, 0, 0x13); */
+ blackbird_api_cmd(dev, CX2341X_ENC_START_CAPTURE, 2, 0,
BLACKBIRD_MPEG_CAPTURE,
BLACKBIRD_RAW_BITS_NONE
);
msleep(10);
- blackbird_api_cmd(dev, BLACKBIRD_API_REFRESH_INPUT, 0,0);
+ blackbird_api_cmd(dev, CX2341X_ENC_REFRESH_INPUT, 0,0);
return 0;
}
@@ -1485,7 +1445,7 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
#endif
#if 0
cx88_set_scale(core, f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.field);
- blackbird_api_cmd(dev, BLACKBIRD_API_SET_RESOLUTION, 2, 0,
+ blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_SIZE, 2, 0,
f->fmt.pix.height, f->fmt.pix.width);
#endif
dprintk(0,"VIDIOC_S_FMT: w: %d, h: %d, f: %d\n",
@@ -1528,6 +1488,20 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
blackbird_set_params(dev, f);
return 0;
}
+ case VIDIOC_S_FREQUENCY:
+ {
+ blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0,
+ BLACKBIRD_END_NOW,
+ BLACKBIRD_MPEG_CAPTURE,
+ BLACKBIRD_RAW_BITS_NONE);
+
+ cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );
+
+ blackbird_initialize_codec(dev);
+ cx88_set_scale(dev->core, dev->width, dev->height,
+ fh->mpegq.field);
+ return 0;
+ }
default:
return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );
@@ -1595,8 +1569,8 @@ static int mpeg_release(struct inode *inode, struct file *file)
{
struct cx8802_fh *fh = file->private_data;
- /* blackbird_api_cmd(fh->dev, BLACKBIRD_API_END_CAPTURE, 3, 0, BLACKBIRD_END_NOW, 0, 0x13); */
- blackbird_api_cmd(fh->dev, BLACKBIRD_API_END_CAPTURE, 3, 0,
+ /* blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0, BLACKBIRD_END_NOW, 0, 0x13); */
+ blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0,
BLACKBIRD_END_NOW,
BLACKBIRD_MPEG_CAPTURE,
BLACKBIRD_RAW_BITS_NONE
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 05e2bc403..89347103a 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -1384,6 +1384,10 @@ struct cx88_subid cx88_subids[] = {
.subvendor = 0x17de,
.subdevice = 0x0841,
.card = CX88_BOARD_KWORLD_MCE200_DELUXE,
+ },{
+ .subvendor = 0x1822,
+ .subdevice = 0x0019,
+ .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
},
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index 1e9bd01de..69a39ad68 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -98,10 +98,11 @@ static int attach_inform(struct i2c_client *client)
struct tuner_setup tun_setup;
struct cx88_core *core = i2c_get_adapdata(client->adapter);
- dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->name, client->addr, client->name);
#else
+ dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->driver.name, client->addr, client->name);
#endif
if (!client->driver->command)
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 84b764b7d..48240b3ec 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -402,8 +402,4 @@ void em28xx_card_setup(struct em28xx *dev)
}
}
-EXPORT_SYMBOL(em28xx_boards);
-EXPORT_SYMBOL(em28xx_bcount);
-EXPORT_SYMBOL(em28xx_id_table);
-
MODULE_DEVICE_TABLE (usb, em28xx_id_table);
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c
index 91422b642..ff0cd9563 100644
--- a/linux/drivers/media/video/em28xx/em28xx-core.c
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c
@@ -375,8 +375,8 @@ int em28xx_outfmt_set_yuv422(struct em28xx *dev)
return em28xx_write_regs(dev, VINCTRL_REG, "\x11", 1);
}
-int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin,
- u8 ymax)
+static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax,
+ u8 ymin, u8 ymax)
{
em28xx_coredbg("em28xx Scale: (%d,%d)-(%d,%d)\n", xmin, ymin, xmax, ymax);
@@ -386,7 +386,7 @@ int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin,
return em28xx_write_regs(dev, YMAX_REG, &ymax, 1);
}
-int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart,
+static int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart,
u16 width, u16 height)
{
u8 cwidth = width;
@@ -403,7 +403,7 @@ int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart,
return em28xx_write_regs(dev, OFLOW_REG, &overflow, 1);
}
-int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v)
+static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v)
{
u8 mode;
/* the em2800 scaler only supports scaling down to 50% */
@@ -592,7 +592,7 @@ static inline void em28xx_isoc_video_copy(struct em28xx *dev,
* em28xx_isoIrq()
* handles the incoming isoc urbs and fills the frames from our inqueue
*/
-void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs)
+static void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs)
{
struct em28xx *dev = urb->context;
int i, status;
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 97744214b..8b4c54f9f 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -326,13 +326,7 @@ int em28xx_audio_analog_set(struct em28xx *dev);
int em28xx_colorlevels_set_default(struct em28xx *dev);
int em28xx_capture_start(struct em28xx *dev, int start);
int em28xx_outfmt_set_yuv422(struct em28xx *dev);
-int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin,
- u8 ymax);
-int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart,
- u16 width, u16 height);
-int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v);
int em28xx_resolution_set(struct em28xx *dev);
-void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs);
int em28xx_init_isoc(struct em28xx *dev);
void em28xx_uninit_isoc(struct em28xx *dev);
int em28xx_set_alternate(struct em28xx *dev);
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index ff18fc548..0d527abb5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -34,6 +34,7 @@
*/
#include "compat.h"
+#include <linux/config.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 890aa4a06..333419d6f 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -25,6 +25,7 @@
#include <linux/slab.h>
#include <linux/firmware.h>
#include <asm/semaphore.h>
+#include <media/cx2341x.h>
#include "pvrusb2.h"
#include "pvrusb2-std.h"
#include "pvrusb2-util.h"
@@ -943,7 +944,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
int ret = 0;
int fwidx;
static const char *fw_files[] = {
- "v4l-cx2341x-enc.fw",
+ CX2341X_FIRM_ENC_FILENAME,
};
trace_firmware("pvr2_upload_firmware2");
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index 3bf8f166c..075882877 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -19,6 +19,7 @@
*
*/
+#include <linux/config.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <asm/semaphore.h>
diff --git a/linux/drivers/media/video/pwc/pwc-dec23.c b/linux/drivers/media/video/pwc/pwc-dec23.c
index f9096c72c..39eaf5839 100644
--- a/linux/drivers/media/video/pwc/pwc-dec23.c
+++ b/linux/drivers/media/video/pwc/pwc-dec23.c
@@ -882,7 +882,7 @@ void pwc_dec23_decompress(const struct pwc_device *pwc,
}
#else
- memcpy(dst, 0, pwc->view.x * pwc->view.y);
+ memset(dst, 0, pwc->view.x * pwc->view.y);
#endif
} else {
diff --git a/linux/drivers/media/video/pwc/pwc-v4l.c b/linux/drivers/media/video/pwc/pwc-v4l.c
index 961ce2ddf..df4bbdb1e 100644
--- a/linux/drivers/media/video/pwc/pwc-v4l.c
+++ b/linux/drivers/media/video/pwc/pwc-v4l.c
@@ -127,7 +127,7 @@ static struct v4l2_queryctrl pwc_controls[] = {
.step = 1,
.default_value = 0,
},
-#if XAWTV_HAS_BEEN_FIXED
+#ifndef BROKEN_XAWTV
{
.id = V4L2_CID_PRIVATE_SAVE_USER,
.type = V4L2_CTRL_TYPE_BUTTON,
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index e3433d894..bdaf6c10b 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -35,6 +35,7 @@
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
#endif
+#include <linux/dma-mapping.h>
#include "saa7134-reg.h"
#include "saa7134.h"
@@ -944,7 +945,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
dev->pci_lat,pci_resource_start(pci_dev,0));
pci_set_master(pci_dev);
- if (!pci_dma_supported(pci_dev,0xffffffff)) {
+ if (!pci_dma_supported(pci_dev, DMA_32BIT_MASK)) {
printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name);
err = -EIO;
goto fail1;
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 00e073944..21bc09dda 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -257,13 +257,15 @@ static void set_type(struct i2c_client *c, unsigned int type,
t->mode_mask = new_mode_mask;
set_freq(c, (V4L2_TUNER_RADIO == t->mode) ? t->radio_freq : t->tv_freq);
- tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
c->adapter->name, c->driver->name, c->addr << 1, type,
+ t->mode_mask);
#else
+ tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
c->adapter->name, c->driver->driver.name, c->addr << 1, type,
-#endif
t->mode_mask);
+#endif
}
/*