summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:48:29 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:48:29 -0200
commit6cefcaedffe3456acaf4d72d63c07c8b3a9a8d8b (patch)
tree7e1fac27df4358a4ffb22c41d5039ef35260239e /linux/drivers
parent3163e57be54a44818c4bdaafa54f1f5a23dd5f4f (diff)
parenta47be5953c72392a7be1efafc70621242275f08f (diff)
downloadmediapointer-dvb-s2-6cefcaedffe3456acaf4d72d63c07c8b3a9a8d8b.tar.gz
mediapointer-dvb-s2-6cefcaedffe3456acaf4d72d63c07c8b3a9a8d8b.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/common/ir-functions.c2
-rw-r--r--linux/drivers/media/common/saa7146_fops.c2
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c2
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c2
-rw-r--r--linux/drivers/media/common/saa7146_video.c2
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c6
-rw-r--r--linux/drivers/media/video/btcx-risc.c2
-rw-r--r--linux/drivers/media/video/compat_ioctl32.c2
-rw-r--r--linux/drivers/media/video/cs53l32a.c2
-rw-r--r--linux/drivers/media/video/cx2341x.c74
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-audio.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-firmware.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-vbi.c2
-rw-r--r--linux/drivers/media/video/dpc7146.c2
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c7
-rw-r--r--linux/drivers/media/video/hexium_gemini.c2
-rw-r--r--linux/drivers/media/video/hexium_orion.c2
-rw-r--r--linux/drivers/media/video/msp3400-driver.c9
-rw-r--r--linux/drivers/media/video/msp3400-kthreads.c2
-rw-r--r--linux/drivers/media/video/mxb.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-audio.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-io.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-main.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-std.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-std.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h1
-rw-r--r--linux/drivers/media/video/saa6588.c2
-rw-r--r--linux/drivers/media/video/saa7115.c2
-rw-r--r--linux/drivers/media/video/saa7127.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c2
-rw-r--r--linux/drivers/media/video/saa7191.c1
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102_core.c6
-rw-r--r--linux/drivers/media/video/tda9840.c2
-rw-r--r--linux/drivers/media/video/tea6415c.c2
-rw-r--r--linux/drivers/media/video/tea6420.c2
-rw-r--r--linux/drivers/media/video/tlv320aic23b.c2
-rw-r--r--linux/drivers/media/video/tuner-types.c2
-rw-r--r--linux/drivers/media/video/tveeprom.c2
-rw-r--r--linux/drivers/media/video/upd64031a.c2
-rw-r--r--linux/drivers/media/video/upd64083.c2
-rw-r--r--linux/drivers/media/video/usbvideo/konicawc.c13
-rw-r--r--linux/drivers/media/video/usbvideo/quickcam_messenger.c12
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.h2
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-i2c.c1
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c10
-rw-r--r--linux/drivers/media/video/v4l1-compat.c2
-rw-r--r--linux/drivers/media/video/v4l2-common.c23
-rw-r--r--linux/drivers/media/video/video-buf-dvb.c8
-rw-r--r--linux/drivers/media/video/video-buf.c2
-rw-r--r--linux/drivers/media/video/videodev.c36
-rw-r--r--linux/drivers/media/video/vivi.c7
-rw-r--r--linux/drivers/media/video/wm8739.c2
-rw-r--r--linux/drivers/media/video/wm8775.c2
-rw-r--r--linux/drivers/media/video/zr364xx.c95
71 files changed, 243 insertions, 164 deletions
diff --git a/linux/drivers/media/common/ir-functions.c b/linux/drivers/media/common/ir-functions.c
index 13259912f..2a05e06cc 100644
--- a/linux/drivers/media/common/ir-functions.c
+++ b/linux/drivers/media/common/ir-functions.c
@@ -20,12 +20,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/string.h>
#include <linux/jiffies.h>
#include <media/ir-common.h>
+#include "compat.h"
/* -------------------------------------------------------------------------- */
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 6b429ff37..19d48272c 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index dffa769ef..3ae8660be 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static u32 saa7146_i2c_func(struct i2c_adapter *adapter)
{
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index 510594fbd..2c63875d1 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int vbi_pixel_to_capture = 720 * 2;
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 1fb373ee2..35288c4bc 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int max_memory = 32;
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index f39e3504d..319dccf5f 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -540,14 +540,8 @@ restart:
break;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
if (try_to_freeze())
goto restart;
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
if (down_interruptible(&fepriv->sem))
break;
diff --git a/linux/drivers/media/video/btcx-risc.c b/linux/drivers/media/video/btcx-risc.c
index a3bd492eb..8950c8a8b 100644
--- a/linux/drivers/media/video/btcx-risc.c
+++ b/linux/drivers/media/video/btcx-risc.c
@@ -27,10 +27,10 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
-#include "compat.h"
#include <linux/videodev2.h>
#include <asm/page.h>
#include <asm/pgtable.h>
+#include "compat.h"
#include "btcx-risc.h"
diff --git a/linux/drivers/media/video/compat_ioctl32.c b/linux/drivers/media/video/compat_ioctl32.c
index e0d6500f4..15151f56b 100644
--- a/linux/drivers/media/video/compat_ioctl32.c
+++ b/linux/drivers/media/video/compat_ioctl32.c
@@ -12,7 +12,6 @@
* ioctls.
*/
-#include "compat.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
#include <linux/compat.h>
#include <linux/videodev.h>
@@ -20,6 +19,7 @@
#include <linux/module.h>
#include <linux/smp_lock.h>
#include <media/v4l2-common.h>
+#include "compat.h"
#ifdef CONFIG_COMPAT
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c
index c6657317b..07644a97d 100644
--- a/linux/drivers/media/video/cs53l32a.c
+++ b/linux/drivers/media/video/cs53l32a.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
@@ -33,6 +32,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC");
MODULE_AUTHOR("Martin Vaughan");
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c
index d6e5d3560..422d2c6a4 100644
--- a/linux/drivers/media/video/cx2341x.c
+++ b/linux/drivers/media/video/cx2341x.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -35,6 +34,7 @@
#include <media/tuner.h>
#include <media/cx2341x.h>
#include <media/v4l2-common.h>
+#include "compat.h"
MODULE_DESCRIPTION("cx23415/6 driver");
MODULE_AUTHOR("Hans Verkuil");
@@ -55,6 +55,7 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_AUDIO_MODE_EXTENSION,
V4L2_CID_MPEG_AUDIO_EMPHASIS,
V4L2_CID_MPEG_AUDIO_CRC,
+ V4L2_CID_MPEG_AUDIO_MUTE,
V4L2_CID_MPEG_VIDEO_ENCODING,
V4L2_CID_MPEG_VIDEO_ASPECT,
V4L2_CID_MPEG_VIDEO_B_FRAMES,
@@ -64,6 +65,8 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_VIDEO_BITRATE,
V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION,
+ V4L2_CID_MPEG_VIDEO_MUTE,
+ V4L2_CID_MPEG_VIDEO_MUTE_YUV,
V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE,
V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER,
V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE,
@@ -75,6 +78,7 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP,
V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,
V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP,
+ V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS,
0
};
@@ -106,6 +110,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_AUDIO_CRC:
ctrl->value = params->audio_crc;
break;
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ ctrl->value = params->audio_mute;
+ break;
case V4L2_CID_MPEG_VIDEO_ENCODING:
ctrl->value = params->video_encoding;
break;
@@ -133,6 +140,12 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
ctrl->value = params->video_temporal_decimation;
break;
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ ctrl->value = params->video_mute;
+ break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV:
+ ctrl->value = params->video_mute_yuv;
+ break;
case V4L2_CID_MPEG_STREAM_TYPE:
ctrl->value = params->stream_type;
break;
@@ -172,6 +185,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
ctrl->value = params->video_chroma_median_filter_bottom;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ ctrl->value = params->stream_insert_nav_packets;
+ break;
default:
return -EINVAL;
}
@@ -205,6 +221,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_AUDIO_CRC:
params->audio_crc = ctrl->value;
break;
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ params->audio_mute = ctrl->value;
+ break;
case V4L2_CID_MPEG_VIDEO_ASPECT:
params->video_aspect = ctrl->value;
break;
@@ -247,6 +266,12 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
params->video_temporal_decimation = ctrl->value;
break;
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ params->video_mute = (ctrl->value != 0);
+ break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV:
+ params->video_mute_yuv = ctrl->value;
+ break;
case V4L2_CID_MPEG_STREAM_TYPE:
params->stream_type = ctrl->value;
params->video_encoding =
@@ -294,6 +319,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
params->video_chroma_median_filter_bottom = ctrl->value;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ params->stream_insert_nav_packets = ctrl->value;
+ break;
default:
return -EINVAL;
}
@@ -340,6 +368,9 @@ static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 ma
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
name = "Median Chroma Filter Minimum";
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ name = "Insert Navigation Packets";
+ break;
default:
return v4l2_ctrl_query_fill(qctrl, min, max, step, def);
@@ -354,6 +385,12 @@ static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 ma
min = 0;
step = 1;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ qctrl->type = V4L2_CTRL_TYPE_BOOLEAN;
+ min = 0;
+ max = 1;
+ step = 1;
+ break;
default:
qctrl->type = V4L2_CTRL_TYPE_INTEGER;
break;
@@ -509,6 +546,9 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl
qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE;
return 0;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ return cx2341x_ctrl_query_fill(qctrl, 0, 1, 1, 0);
+
default:
return v4l2_ctrl_query_fill_std(qctrl);
@@ -660,6 +700,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
/* stream */
.stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
.stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE,
+ .stream_insert_nav_packets = 0,
/* audio */
.audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000,
@@ -669,6 +710,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
.audio_mode_extension = V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4,
.audio_emphasis = V4L2_MPEG_AUDIO_EMPHASIS_NONE,
.audio_crc = V4L2_MPEG_AUDIO_CRC_NONE,
+ .audio_mute = 0,
/* video */
.video_encoding = V4L2_MPEG_VIDEO_ENCODING_MPEG_2,
@@ -680,6 +722,8 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
.video_bitrate = 6000000,
.video_bitrate_peak = 8000000,
.video_temporal_decimation = 0,
+ .video_mute = 0,
+ .video_mute_yuv = 0x008080, /* YCbCr value for black */
/* encoding filters */
.video_spatial_filter_mode = V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL,
@@ -783,6 +827,10 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
err = cx2341x_api(priv, func, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, new->audio_properties);
if (err) return err;
}
+ if (old == NULL || old->audio_mute != new->audio_mute) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MUTE_AUDIO, 1, new->audio_mute);
+ if (err) return err;
+ }
if (old == NULL || old->video_bitrate_mode != new->video_bitrate_mode ||
old->video_bitrate != new->video_bitrate ||
old->video_bitrate_peak != new->video_bitrate_peak) {
@@ -830,6 +878,15 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
new->video_temporal_decimation);
if (err) return err;
}
+ if (old == NULL || old->video_mute != new->video_mute ||
+ (new->video_mute && old->video_mute_yuv != new->video_mute_yuv)) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MUTE_VIDEO, 1, new->video_mute | (new->video_mute_yuv << 8));
+ if (err) return err;
+ }
+ if (old == NULL || old->stream_insert_nav_packets != new->stream_insert_nav_packets) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MISC, 2, 7, new->stream_insert_nav_packets);
+ if (err) return err;
+ }
return 0;
}
@@ -858,18 +915,22 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
int temporal = p->video_temporal_filter;
/* Stream */
- printk(KERN_INFO "%s: Stream: %s\n",
+ printk(KERN_INFO "%s: Stream: %s",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE));
+ if (p->stream_insert_nav_packets)
+ printk(" (with navigation packets)");
+ printk("\n");
printk(KERN_INFO "%s: VBI Format: %s\n",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_VBI_FMT));
/* Video */
- printk(KERN_INFO "%s: Video: %dx%d, %d fps\n",
+ printk(KERN_INFO "%s: Video: %dx%d, %d fps%s\n",
prefix,
p->width / (is_mpeg1 ? 2 : 1), p->height / (is_mpeg1 ? 2 : 1),
- p->is_50hz ? 25 : 30);
+ p->is_50hz ? 25 : 30,
+ (p->video_mute) ? " (muted)" : "");
printk(KERN_INFO "%s: Video: %s, %s, %s, %d",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING),
@@ -890,12 +951,13 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
}
/* Audio */
- printk(KERN_INFO "%s: Audio: %s, %s, %s, %s",
+ printk(KERN_INFO "%s: Audio: %s, %s, %s, %s%s",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ),
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING),
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE),
- cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE));
+ cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE),
+ p->audio_mute ? " (muted)" : "");
if (p->audio_mode == V4L2_MPEG_AUDIO_MODE_JOINT_STEREO) {
printk(", %s",
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE_EXTENSION));
diff --git a/linux/drivers/media/video/cx25840/cx25840-audio.c b/linux/drivers/media/video/cx25840/cx25840-audio.c
index 4cdf4c60e..40d931591 100644
--- a/linux/drivers/media/video/cx25840/cx25840-audio.c
+++ b/linux/drivers/media/video/cx25840/cx25840-audio.c
@@ -15,12 +15,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index fc1e7da7c..75dbba700 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -28,7 +28,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -37,6 +36,7 @@
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c
index 1b730b155..e42d32829 100644
--- a/linux/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c
@@ -15,13 +15,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/firmware.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#include "cx25840-core.h"
diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c
index 876adbcba..8bb20bf77 100644
--- a/linux/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c
@@ -15,12 +15,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#include "cx25840-core.h"
diff --git a/linux/drivers/media/video/dpc7146.c b/linux/drivers/media/video/dpc7146.c
index 3ee2cc6e3..7070538c0 100644
--- a/linux/drivers/media/video/dpc7146.c
+++ b/linux/drivers/media/video/dpc7146.c
@@ -20,9 +20,9 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
#include <linux/video_decoder.h> /* for saa7111a */
+#include "compat.h"
#define I2C_SAA7111A 0x24
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index f03547db8..3abd11d2b 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -660,15 +660,8 @@ static int em28xx_v4l2_mmap(struct file *filp, struct vm_area_struct *vma)
pos = dev->frame[i].bufmem;
while (size > 0) { /* size is page-aligned */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
- em28xx_videodbg("mmap: rename page map failed\n");
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
em28xx_videodbg("mmap: vm_insert_page failed\n");
-#endif
mutex_unlock(&dev->fileop_lock);
return -EAGAIN;
}
diff --git a/linux/drivers/media/video/hexium_gemini.c b/linux/drivers/media/video/hexium_gemini.c
index 6cc7ca99d..d1957736b 100644
--- a/linux/drivers/media/video/hexium_gemini.c
+++ b/linux/drivers/media/video/hexium_gemini.c
@@ -23,8 +23,8 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int debug = 0;
module_param(debug, int, 0);
diff --git a/linux/drivers/media/video/hexium_orion.c b/linux/drivers/media/video/hexium_orion.c
index 59ed0dfd2..2c9eb6923 100644
--- a/linux/drivers/media/video/hexium_orion.c
+++ b/linux/drivers/media/video/hexium_orion.c
@@ -23,8 +23,8 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int debug = 0;
module_param(debug, int, 0);
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index f03cc0032..9958e2570 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -45,7 +45,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -67,6 +66,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
#include "msp3400-driver.h"
/* ---------------------------------------------------------------------- */
@@ -399,16 +399,9 @@ int msp_sleep(struct msp_state *state, int timeout)
(msecs_to_jiffies(timeout));
}
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&state->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
return state->restart;
}
diff --git a/linux/drivers/media/video/msp3400-kthreads.c b/linux/drivers/media/video/msp3400-kthreads.c
index df95b0cfb..041ad89c6 100644
--- a/linux/drivers/media/video/msp3400-kthreads.c
+++ b/linux/drivers/media/video/msp3400-kthreads.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -35,6 +34,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
#include "msp3400-driver.h"
/* this one uses the automatic sound standard detection of newer msp34xx
diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c
index 928a3ab91..0ed5c1e47 100644
--- a/linux/drivers/media/video/mxb.c
+++ b/linux/drivers/media/video/mxb.c
@@ -23,11 +23,11 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
#include <media/tuner.h>
#include <linux/video_decoder.h>
#include <media/v4l2-common.h>
+#include "compat.h"
#include "mxb.h"
#include "tea6415c.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 7f38dae17..7fcc6cffa 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -20,13 +20,13 @@
*
*/
-#include "compat.h"
#include "pvrusb2-audio.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include <linux/videodev2.h>
#include <media/msp3400.h>
#include <media/v4l2-common.h>
+#include "compat.h"
struct pvr2_msp3400_handler {
struct pvr2_hdw *hdw;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
index 3103c808c..a7684d9d3 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -27,6 +27,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <asm/semaphore.h>
+#include "compat.h"
static void pvr2_context_destroy(struct pvr2_context *mp)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
index 69c1f3a92..0a05ea692 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
@@ -20,7 +20,6 @@
#ifndef __PVRUSB2_BASE_H
#define __PVRUSB2_BASE_H
-#include "compat.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
#else
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index f44048186..71cc14280 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -39,6 +39,7 @@
#include <media/v4l2-common.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_cx2584x {
struct pvr2_i2c_handler handler;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
index 5dea8d7b3..54b2844e7 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
@@ -33,7 +33,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index fb0a9ca67..649ac3875 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/device.h> // for linux/firmware.h
#include <linux/firmware.h>
#include "pvrusb2-util.h"
@@ -28,6 +27,7 @@
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index 47b1365d7..db0b02f0f 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -33,7 +33,6 @@
*/
-#include "compat.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 d80136377..1f7586078 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
@@ -38,6 +37,7 @@
#include "pvrusb2-encoder.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
#define TV_MIN_FREQ 55250000L
#define TV_MAX_FREQ 850000000L
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
index 40200c79f..4b0ded374 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-hdw-internal.h"
@@ -30,6 +29,7 @@
#include "pvrusb2-video-v4l.h"
#include "pvrusb2-cx2584x-v4l.h"
#include "pvrusb2-wm8775.h"
+#include "compat.h"
#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
index c650e02cc..7ce929be8 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
@@ -25,6 +25,7 @@
#include "pvrusb2-debug.h"
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
+#include "compat.h"
static void set_standard(struct pvr2_hdw *hdw)
{
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
index 6c2379fc5..c838df616 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
@@ -23,7 +23,6 @@
#ifndef __PVRUSB2_CMD_V4L2_H
#define __PVRUSB2_CMD_V4L2_H
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index 215fbf473..22a02dd76 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -19,11 +19,11 @@
*
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
index ef7293bf1..7b3be67f5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include "pvrusb2-io.h"
#include "pvrusb2-debug.h"
#include <linux/errno.h>
@@ -30,6 +29,7 @@
#else
#include <asm/semaphore.h>
#endif
+#include "compat.h"
static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index c42eef3c2..aef12fecb 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include "pvrusb2-ioread.h"
#include "pvrusb2-debug.h"
#include <linux/errno.h>
@@ -31,6 +30,7 @@
#include <asm/semaphore.h>
#endif
#include <asm/uaccess.h>
+#include "compat.h"
#define BUFFER_COUNT 32
#define BUFFER_SIZE PAGE_ALIGN(0x4000)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
index 1abbaf3cc..ccf5a1ac0 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
@@ -37,6 +36,7 @@
#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
#include "pvrusb2-sysfs.h"
#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
+#include "compat.h"
#define DRIVER_AUTHOR "Mike Isely <isely@pobox.com>"
#define DRIVER_DESC "Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-std.c b/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
index 4de535498..e4dff8d1c 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -23,6 +23,7 @@
#include "pvrusb2-debug.h"
#include <asm/string.h>
#include <linux/slab.h>
+#include "compat.h"
struct std_name {
const char *name;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-std.h b/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
index dc9ef5bb3..07c399375 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
@@ -21,7 +21,6 @@
#ifndef __PVRUSB2_STD_H
#define __PVRUSB2_STD_H
-#include "compat.h"
#include <linux/videodev2.h>
// Convert string describing one or more video standards into a mask of V4L
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 165c00f44..1e656f23d 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/version.h>
#include "pvrusb2-context.h"
@@ -32,6 +31,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-common.h>
+#include "compat.h"
struct pvr2_v4l2_dev;
struct pvr2_v4l2_fh;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index df042509a..a842c8fd1 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -39,6 +39,7 @@
#include <media/saa7115.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_decoder {
struct pvr2_i2c_handler handler;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
index 1c0c98efb..2b917fda0 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
@@ -32,7 +32,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index 7890b45d2..6bf125213 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -37,6 +37,7 @@
#include <media/v4l2-common.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_wm8775 {
struct pvr2_i2c_handler handler;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
index 15ee1e215..8aaeff4e1 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
@@ -33,7 +33,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c
index ff6f29eac..f6840efa9 100644
--- a/linux/drivers/media/video/saa6588.c
+++ b/linux/drivers/media/video/saa6588.c
@@ -18,7 +18,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/kernel.h>
@@ -37,6 +36,7 @@
#endif
#include <media/rds.h>
+#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 6163a68e3..d868920de 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -37,7 +37,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include "saa711x_regs.h"
#include <linux/kernel.h>
@@ -51,6 +50,7 @@
#include "i2c-compat.h"
#endif
#include <asm/div64.h>
+#include "compat.h"
#define VRES_60HZ (480+16)
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index e1e697579..35342dbe5 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -47,7 +47,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -59,6 +58,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
static int debug = 0;
static int test_image = 0;
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index 1ff1c706d..6b8e0e1f0 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -16,7 +16,6 @@
*
*/
-#include "compat.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
#include <linux/init.h>
#include <linux/slab.h>
@@ -31,6 +30,7 @@
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <linux/interrupt.h>
+#include "compat.h"
#include "saa7134.h"
#include "saa7134-reg.h"
diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c
index 746cadb8f..99b33ea18 100644
--- a/linux/drivers/media/video/saa7191.c
+++ b/linux/drivers/media/video/saa7191.c
@@ -23,6 +23,7 @@
#include <linux/videodev.h>
#include <linux/video_decoder.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "saa7191.h"
diff --git a/linux/drivers/media/video/sn9c102/sn9c102_core.c b/linux/drivers/media/video/sn9c102/sn9c102_core.c
index ef431d942..956e25041 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c
@@ -2025,13 +2025,7 @@ static int sn9c102_mmap(struct file* filp, struct vm_area_struct *vma)
pos = cam->frame[i].bufmem;
while (size > 0) { /* size is page-aligned */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
-#endif
mutex_unlock(&cam->fileop_mutex);
return -EAGAIN;
}
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index cc6de147c..d74b68ae3 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -24,11 +24,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tda9840.h"
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index 4e6038324..03716e2c9 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -26,11 +26,11 @@
Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tea6415c.h"
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index 9896661da..d8611e213 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -26,11 +26,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tea6420.h"
diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c
index 4721d6f93..ee10fbeaa 100644
--- a/linux/drivers/media/video/tlv320aic23b.c
+++ b/linux/drivers/media/video/tlv320aic23b.c
@@ -23,7 +23,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -36,6 +35,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("tlv320aic23b driver");
MODULE_AUTHOR("Scott Alfter, Ulf Eklund, Hans Verkuil");
diff --git a/linux/drivers/media/video/tuner-types.c b/linux/drivers/media/video/tuner-types.c
index 512b39cb9..22b159d44 100644
--- a/linux/drivers/media/video/tuner-types.c
+++ b/linux/drivers/media/video/tuner-types.c
@@ -4,10 +4,10 @@
*
*/
-#include "compat.h"
#include <linux/i2c.h>
#include <media/tuner.h>
#include <media/tuner-types.h>
+#include "compat.h"
/* ---------------------------------------------------------------------- */
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 4b3ee1fcb..43017a006 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -28,7 +28,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -46,6 +45,7 @@
#include <media/tveeprom.h>
#include <media/v4l2-common.h>
#include <media/audiochip.h>
+#include "compat.h"
MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver");
MODULE_AUTHOR("John Klar");
diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c
index ae0a843ff..f73cb2c81 100644
--- a/linux/drivers/media/video/upd64031a.c
+++ b/linux/drivers/media/video/upd64031a.c
@@ -20,7 +20,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/version.h>
#include <linux/module.h>
@@ -29,6 +28,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/upd64031a.h>
+#include "compat.h"
// --------------------- read registers functions define -----------------------
diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c
index 61be85abd..1fdde6e06 100644
--- a/linux/drivers/media/video/upd64083.c
+++ b/linux/drivers/media/video/upd64083.c
@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -28,6 +27,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/upd64083.h>
+#include "compat.h"
MODULE_DESCRIPTION("uPD64083 driver");
MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil");
diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c
index 5ab17aaab..8ca93f248 100644
--- a/linux/drivers/media/video/usbvideo/konicawc.c
+++ b/linux/drivers/media/video/usbvideo/konicawc.c
@@ -15,15 +15,16 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/input.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
#include <linux/usb_input.h>
#else
-#include <linux/usb/input.h>
+#include <linux/input.h>
#endif
#include "usbvideo.h"
+#include "compat.h"
#define MAX_BRIGHTNESS 108
#define MAX_CONTRAST 108
@@ -242,7 +243,11 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
input_dev->name = "Konicawc snapshot button";
input_dev->phys = cam->input_physname;
usb_to_input_id(dev, &input_dev->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
+#else
+ input_dev->dev = &dev->dev;
+#endif
input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
index 614c821ed..849f94bab 100644
--- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -33,15 +33,15 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
-#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/usb_input.h>
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#include <linux/usb_input.h>
#endif
#include "usbvideo.h"
#include "quickcam_messenger.h"
+#include "compat.h"
/*
* Version Information
@@ -105,7 +105,11 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
input_dev->name = "QCM button";
input_dev->phys = cam->input_physname;
usb_to_input_id(dev, &input_dev->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
+#else
+ input_dev->dev = &dev->dev;
+#endif
input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.h b/linux/drivers/media/video/usbvideo/usbvideo.h
index aaafce2b5..c1f892825 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.h
+++ b/linux/drivers/media/video/usbvideo/usbvideo.h
@@ -16,13 +16,13 @@
#ifndef usbvideo_h
#define usbvideo_h
-#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
#endif
+#include "compat.h"
/* Most helpful debugging aid */
#define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c
index 30cb93a70..7fc39605c 100644
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c
@@ -39,6 +39,7 @@
#include <linux/sched.h>
#include <linux/usb.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "usbvision.h"
#define DBG_I2C 1<<0
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index 1d0d61469..ff9d1cbbb 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c
@@ -1255,21 +1255,11 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
pos = usbvision->frame[i].data;
while (size > 0) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
- PDEBUG(DBG_MMAP, "mmap: rename page map failed");
- up(&usbvision->lock);
- return -EAGAIN;
- }
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
PDEBUG(DBG_MMAP, "mmap: vm_insert_page failed");
up(&usbvision->lock);
return -EAGAIN;
}
-#endif
start += PAGE_SIZE;
pos += PAGE_SIZE;
size -= PAGE_SIZE;
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c
index 02c5a2f58..2e42ee3a2 100644
--- a/linux/drivers/media/video/v4l1-compat.c
+++ b/linux/drivers/media/video/v4l1-compat.c
@@ -17,7 +17,6 @@
*/
-#include "compat.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -41,6 +40,7 @@
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
+#include "compat.h"
static unsigned int debug = 0;
module_param(debug, int, 0644);
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index f31a1bb61..8f45ba75a 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -44,7 +44,6 @@
* Added Gerd Knorrs v4l1 enhancements (Justin Schoeman)
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@ -75,6 +74,7 @@
#endif
#include <linux/videodev.h>
+#include "compat.h"
MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr");
MODULE_DESCRIPTION("misc helper functions for v4l2 device drivers");
@@ -393,13 +393,18 @@ static const char *v4l2_ioctls[] = {
[_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT",
[_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY",
[_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY",
-#if 1 /*KEEP*/
[_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP",
-#endif
[_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS",
[_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS",
[_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS",
- [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS"
+ [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS",
+#if 1 /*KEEP*/
+ [_IOC_NR(VIDIOC_ENUM_FRAMESIZES)] = "VIDIOC_ENUM_FRAMESIZES",
+ [_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS",
+ [_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX",
+ [_IOC_NR(VIDIOC_ENCODER_CMD)] = "VIDIOC_ENCODER_CMD",
+ [_IOC_NR(VIDIOC_TRY_ENCODER_CMD)] = "VIDIOC_TRY_ENCODER_CMD"
+#endif
};
#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
@@ -1297,6 +1302,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: name = "Audio Stereo Mode Extension"; break;
case V4L2_CID_MPEG_AUDIO_EMPHASIS: name = "Audio Emphasis"; break;
case V4L2_CID_MPEG_AUDIO_CRC: name = "Audio CRC"; break;
+ case V4L2_CID_MPEG_AUDIO_MUTE: name = "Audio Mute"; break;
case V4L2_CID_MPEG_VIDEO_ENCODING: name = "Video Encoding"; break;
case V4L2_CID_MPEG_VIDEO_ASPECT: name = "Video Aspect"; break;
case V4L2_CID_MPEG_VIDEO_B_FRAMES: name = "Video B Frames"; break;
@@ -1307,6 +1313,8 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_MPEG_VIDEO_BITRATE: name = "Video Bitrate"; break;
case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: name = "Video Peak Bitrate"; break;
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: name = "Video Temporal Decimation"; break;
+ case V4L2_CID_MPEG_VIDEO_MUTE: name = "Video Mute"; break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV: name = "Video Mute YUV"; break;
case V4L2_CID_MPEG_STREAM_TYPE: name = "Stream Type"; break;
case V4L2_CID_MPEG_STREAM_PID_PMT: name = "Stream PMT Program ID"; break;
case V4L2_CID_MPEG_STREAM_PID_AUDIO: name = "Stream Audio Program ID"; break;
@@ -1322,6 +1330,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
switch (qctrl->id) {
case V4L2_CID_AUDIO_MUTE:
case V4L2_CID_AUDIO_LOUDNESS:
+ case V4L2_CID_MPEG_AUDIO_MUTE:
case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
case V4L2_CID_MPEG_VIDEO_PULLDOWN:
qctrl->type = V4L2_CTRL_TYPE_BOOLEAN;
@@ -1455,6 +1464,8 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
V4L2_MPEG_AUDIO_CRC_NONE,
V4L2_MPEG_AUDIO_CRC_CRC16, 1,
V4L2_MPEG_AUDIO_CRC_NONE);
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0);
case V4L2_CID_MPEG_VIDEO_ENCODING:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_VIDEO_ENCODING_MPEG_1,
@@ -1484,6 +1495,10 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
return v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 8000000);
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0);
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0);
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV: /* Init YUV (really YCbCr) to black */
+ return v4l2_ctrl_query_fill(qctrl, 0, 0xffffff, 1, 0x008080);
case V4L2_CID_MPEG_STREAM_TYPE:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c
index 86993f95a..4776364a6 100644
--- a/linux/drivers/media/video/video-buf-dvb.c
+++ b/linux/drivers/media/video/video-buf-dvb.c
@@ -13,7 +13,6 @@
* (at your option) any later version.
*/
-#include "compat.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
#include <linux/module.h>
@@ -30,6 +29,7 @@
#include <media/video-buf.h>
#include <media/video-buf-dvb.h>
+#include "compat.h"
/* ------------------------------------------------------------------ */
@@ -68,13 +68,7 @@ static int videobuf_dvb_thread(void *data)
break;
if (kthread_should_stop())
break;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
try_to_freeze();
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
/* feed buffer data to demux */
if (buf->state == STATE_DONE)
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index a2251c7e3..5564e20af 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -22,7 +22,6 @@
* (at your option) any later version.
*/
-#include "compat.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -35,6 +34,7 @@
#include <asm/pgtable.h>
#include <media/video-buf.h>
+#include "compat.h"
#define MAGIC_DMABUF 0x19721112
#define MAGIC_BUFFER 0x20040302
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 707757237..3a09a0808 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -1366,6 +1366,42 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_s_jpegcomp(file, fh, p);
break;
}
+ case VIDIOC_G_ENC_INDEX:
+ {
+ struct v4l2_enc_idx *p=arg;
+
+ if (!vfd->vidioc_g_enc_index)
+ break;
+ ret=vfd->vidioc_g_enc_index(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "entries=%d, entries_cap=%d\n",
+ p->entries,p->entries_cap);
+ break;
+ }
+ case VIDIOC_ENCODER_CMD:
+ {
+ struct v4l2_encoder_cmd *p=arg;
+
+ if (!vfd->vidioc_encoder_cmd)
+ break;
+ ret=vfd->vidioc_encoder_cmd(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "cmd=%d, flags=%d\n",
+ p->cmd,p->flags);
+ break;
+ }
+ case VIDIOC_TRY_ENCODER_CMD:
+ {
+ struct v4l2_encoder_cmd *p=arg;
+
+ if (!vfd->vidioc_try_encoder_cmd)
+ break;
+ ret=vfd->vidioc_try_encoder_cmd(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "cmd=%d, flags=%d\n",
+ p->cmd,p->flags);
+ break;
+ }
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *p=arg;
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index 798e711f4..5dd6dd096 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -586,16 +586,9 @@ static void vivi_sleep(struct vivi_dmaqueue *dma_q)
schedule_timeout_interruptible (timeout);
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&dma_q->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
}
static int vivi_thread(void *data)
diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c
index 79394f205..4b4e5277f 100644
--- a/linux/drivers/media/video/wm8739.c
+++ b/linux/drivers/media/video/wm8739.c
@@ -21,7 +21,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -34,6 +33,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("wm8739 driver");
MODULE_AUTHOR("T. Adachi, Hans Verkuil");
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c
index 390d0cb29..d64f9c534 100644
--- a/linux/drivers/media/video/wm8775.c
+++ b/linux/drivers/media/video/wm8775.c
@@ -25,7 +25,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -38,6 +37,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("wm8775 driver");
MODULE_AUTHOR("Ulf Eklund, Hans Verkuil");
diff --git a/linux/drivers/media/video/zr364xx.c b/linux/drivers/media/video/zr364xx.c
index 166dccc50..2c9ac4cd2 100644
--- a/linux/drivers/media/video/zr364xx.c
+++ b/linux/drivers/media/video/zr364xx.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <media/v4l2-common.h>
+#include "compat.h"
/* Version Information */
@@ -103,7 +104,11 @@ struct zr364xx_camera {
int width;
int height;
int method;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
+#else
+ struct semaphore lock;
+#endif
};
@@ -137,7 +142,7 @@ static int send_control_msg(struct usb_device *udev, u8 request, u16 value,
}
-/* Control messages sent to the camera to initialize it
+/* Control messages sent to the camera to initialize it
* and launch the capture */
typedef struct {
unsigned int value;
@@ -206,54 +211,54 @@ static message *init[3] = { m0, m1, m2 };
static unsigned char header1[] = {
0xFF, 0xD8,
/*
- 0xFF, 0xE0, 0x00, 0x10, 'J', 'F', 'I', 'F',
+ 0xFF, 0xE0, 0x00, 0x10, 'J', 'F', 'I', 'F',
0x00, 0x01, 0x01, 0x00, 0x33, 0x8A, 0x00, 0x00, 0x33, 0x88,
*/
0xFF, 0xDB, 0x00, 0x84
};
static unsigned char header2[] = {
- 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
- 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02,
- 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01,
- 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
- 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1,
- 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33,
- 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25,
- 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
- 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54,
- 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
- 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94,
- 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
- 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
- 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
- 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
- 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3,
- 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F,
- 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
- 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5,
- 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05,
- 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11,
- 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
- 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1,
- 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16,
- 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
- 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44,
- 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57,
- 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
- 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84,
- 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
- 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8,
- 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA,
- 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3,
- 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5,
- 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
- 0xF8, 0xF9, 0xFA, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x01,
- 0x40, 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,
- 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11,
+ 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
+ 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02,
+ 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01,
+ 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
+ 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1,
+ 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33,
+ 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25,
+ 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+ 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54,
+ 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
+ 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94,
+ 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
+ 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
+ 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
+ 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
+ 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3,
+ 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F,
+ 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
+ 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5,
+ 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05,
+ 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11,
+ 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
+ 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1,
+ 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16,
+ 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
+ 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44,
+ 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57,
+ 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
+ 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84,
+ 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
+ 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8,
+ 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA,
+ 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3,
+ 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5,
+ 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x01,
+ 0x40, 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,
+ 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11,
0x00, 0x3F, 0x00
};
static unsigned char header3;
@@ -279,7 +284,7 @@ static int read_frame(struct zr364xx_camera *cam, int framenum)
/* during the first loop we are going to insert JPEG header */
head = 0;
- /* this is the place in memory where we are going to build
+ /* this is the place in memory where we are going to build
* the JPEG image */
jpeg = cam->framebuf + framenum * MAX_FRAME_SIZE;
/* read data... */