diff options
39 files changed, 78 insertions, 204 deletions
@@ -15,6 +15,14 @@ all: install: $(MAKE) -C $(BUILD_DIR) install +# Hmm, .PHONY does not work with wildcard rules :-( +SPECS = v4l2-spec dvb-spec + +.PHONY: $(SPECS) + +$(SPECS): + $(MAKE) -C $(BUILD_DIR) $(MAKECMDGOALS) + %:: $(MAKE) -C $(BUILD_DIR) $(MAKECMDGOALS) diff --git a/linux/Documentation/video4linux/bttv/Insmod-options b/linux/Documentation/video4linux/bttv/Insmod-options index 5ef75787f..bbe3ed667 100644 --- a/linux/Documentation/video4linux/bttv/Insmod-options +++ b/linux/Documentation/video4linux/bttv/Insmod-options @@ -81,16 +81,6 @@ tuner.o pal=[bdgil] select PAL variant (used for some tuners only, important for the audio carrier). -tvmixer.o - registers a mixer device for the TV card's volume/bass/treble - controls (requires a i2c audio control chip like the msp3400). - - insmod args: - debug=1 print some debug info to the syslog. - devnr=n allocate device #n (0 == /dev/mixer, - 1 = /dev/mixer1, ...), default is to - use the first free one. - tvaudio.o new, experimental module which is supported to provide a single driver for all simple i2c audio control chips (tda/tea*). diff --git a/linux/drivers/media/dvb/frontends/zl10036.c b/linux/drivers/media/dvb/frontends/zl10036.c index e22a0b381..67cdb056f 100644 --- a/linux/drivers/media/dvb/frontends/zl10036.c +++ b/linux/drivers/media/dvb/frontends/zl10036.c @@ -30,6 +30,7 @@ #include <linux/module.h> #include <linux/dvb/frontend.h> #include <asm/types.h> +#include "compat.h" #include "zl10036.h" diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 307490ebc..08a0675fe 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -30,7 +30,6 @@ obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o obj-$(CONFIG_VIDEO_TDA9875) += tda9875.o -obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o obj-$(CONFIG_VIDEO_SAA5246A) += saa5246a.o diff --git a/linux/drivers/media/video/adv7170.c b/linux/drivers/media/video/adv7170.c index 87bc8ed46..04e6125f2 100644 --- a/linux/drivers/media/video/adv7170.c +++ b/linux/drivers/media/video/adv7170.c @@ -205,7 +205,7 @@ static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) { struct adv7170 *encoder = to_adv7170(sd); - v4l2_dbg(1, debug, sd, "set norm %llx\n", std); + v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std); if (std & V4L2_STD_NTSC) { adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC)); @@ -220,10 +220,11 @@ static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) adv7170_write(sd, 0x07, TR0MODE | TR0RST); adv7170_write(sd, 0x07, TR0MODE); } else { - v4l2_dbg(1, debug, sd, "illegal norm: %llx\n", std); + v4l2_dbg(1, debug, sd, "illegal norm: %llx\n", + (unsigned long long)std); return -EINVAL; } - v4l2_dbg(1, debug, sd, "switched to %llx\n", std); + v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std); encoder->norm = std; return 0; } diff --git a/linux/drivers/media/video/adv7175.c b/linux/drivers/media/video/adv7175.c index dc036d2fa..c38f648f8 100644 --- a/linux/drivers/media/video/adv7175.c +++ b/linux/drivers/media/video/adv7175.c @@ -238,10 +238,11 @@ static int adv7175_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) adv7175_write(sd, 0x07, TR0MODE | TR0RST); adv7175_write(sd, 0x07, TR0MODE); } else { - v4l2_dbg(1, debug, sd, "illegal norm: %llx\n", std); + v4l2_dbg(1, debug, sd, "illegal norm: %llx\n", + (unsigned long long)std); return -EINVAL; } - v4l2_dbg(1, debug, sd, "switched to %llx\n", std); + v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std); encoder->norm = std; return 0; } diff --git a/linux/drivers/media/video/bt819.c b/linux/drivers/media/video/bt819.c index ec64197e9..9f9596c7c 100644 --- a/linux/drivers/media/video/bt819.c +++ b/linux/drivers/media/video/bt819.c @@ -254,7 +254,7 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std) struct bt819 *decoder = to_bt819(sd); struct timing *timing = NULL; - v4l2_dbg(1, debug, sd, "set norm %llx\n", std); + v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std); if (std & V4L2_STD_NTSC) { bt819_setbit(decoder, 0x01, 0, 1); @@ -273,7 +273,8 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std) /* bt819_setbit(decoder, 0x1a, 5, 0); */ timing = &timing_data[0]; } else { - v4l2_dbg(1, debug, sd, "unsupported norm %llx\n", std); + v4l2_dbg(1, debug, sd, "unsupported norm %llx\n", + (unsigned long long)std); return -EINVAL; } bt819_write(decoder, 0x03, diff --git a/linux/drivers/media/video/bt856.c b/linux/drivers/media/video/bt856.c index fc7b64d91..ab56d7d6e 100644 --- a/linux/drivers/media/video/bt856.c +++ b/linux/drivers/media/video/bt856.c @@ -131,7 +131,7 @@ static int bt856_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) { struct bt856 *encoder = to_bt856(sd); - v4l2_dbg(1, debug, sd, "set norm %llx\n", std); + v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std); if (std & V4L2_STD_NTSC) { bt856_setbit(encoder, 0xdc, 2, 0); diff --git a/linux/drivers/media/video/bt866.c b/linux/drivers/media/video/bt866.c index edc1aa348..5ea31375e 100644 --- a/linux/drivers/media/video/bt866.c +++ b/linux/drivers/media/video/bt866.c @@ -97,7 +97,7 @@ static int bt866_write(struct bt866 *encoder, u8 subaddr, u8 data) static int bt866_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) { - v4l2_dbg(1, debug, sd, "set norm %llx\n", std); + v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std); /* Only PAL supported by this driver at the moment! */ if (!(std & V4L2_STD_NTSC)) diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index aed55398d..6868de9bd 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -3744,7 +3744,11 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) unsigned short type; for (i = 4*16; i < 8*16; i += 16) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) + u16 checksum = ip_compute_csum((unsigned char *)(ee + i), 16); +#else u16 checksum = ip_compute_csum(ee + i, 16); +#endif if ((checksum&0xff) + (checksum>>8) == 0xff) break; diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index 66fc4e480..3e7812c5a 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -401,7 +401,11 @@ int __devinit init_bttv_i2c(struct bttv *btv) strlcpy(btv->c.i2c_adap.name, "bt878", sizeof(btv->c.i2c_adap.name)); btv->c.i2c_adap.id = I2C_HW_B_BT848; /* FIXME */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + btv->c.i2c_adap.algo = (struct i2c_algorithm *)&bttv_algo; +#else btv->c.i2c_adap.algo = &bttv_algo; +#endif } else { /* bt848 */ /* Prevents usage of invalid delay values */ diff --git a/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h index 35f943337..93a1e989a 100644 --- a/linux/drivers/media/video/bt8xx/bttv.h +++ b/linux/drivers/media/video/bt8xx/bttv.h @@ -14,7 +14,7 @@ #ifndef _BTTV_H_ #define _BTTV_H_ -#include <linux/videodev.h> +#include <linux/videodev2.h> #include <linux/i2c.h> #include "compat.h" #include <media/ir-common.h> diff --git a/linux/drivers/media/video/bt8xx/bttvp.h b/linux/drivers/media/video/bt8xx/bttvp.h index 20b1ad68a..113f28320 100644 --- a/linux/drivers/media/video/bt8xx/bttvp.h +++ b/linux/drivers/media/video/bt8xx/bttvp.h @@ -32,7 +32,6 @@ #include <linux/wait.h> #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> -#include <linux/videodev.h> #include <linux/pci.h> #include <linux/input.h> #include <linux/mutex.h> diff --git a/linux/drivers/media/video/cpia2/cpia2_v4l.c b/linux/drivers/media/video/cpia2/cpia2_v4l.c index 9c25894fd..d4099f531 100644 --- a/linux/drivers/media/video/cpia2/cpia2_v4l.c +++ b/linux/drivers/media/video/cpia2/cpia2_v4l.c @@ -37,6 +37,7 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/init.h> +#include <linux/videodev.h> #include <media/v4l2-ioctl.h> #include "cpia2.h" diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index 131fc740a..ba22520a2 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -36,11 +36,6 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> -#ifdef CONFIG_VIDEO_V4L1_COMPAT -/* Include V4L1 specific functions. Should be removed soon */ -#include <linux/videodev.h> -#endif - MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards"); MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>"); MODULE_LICENSE("GPL"); diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index f7171586d..1e78faba6 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -657,8 +657,12 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol, return changed; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 21) static const DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#else +static DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#endif #endif static struct snd_kcontrol_new snd_cx88_volume = { diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 005a78aab..827168d67 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -42,11 +42,6 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> -#ifdef CONFIG_VIDEO_V4L1_COMPAT -/* Include V4L1 specific functions. Should be removed soon */ -#include <linux/videodev.h> -#endif - MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); MODULE_LICENSE("GPL"); diff --git a/linux/drivers/media/video/ks0127.c b/linux/drivers/media/video/ks0127.c index eaa481a57..3dbda6e92 100644 --- a/linux/drivers/media/video/ks0127.c +++ b/linux/drivers/media/video/ks0127.c @@ -589,8 +589,8 @@ static int ks0127_s_std(struct v4l2_subdev *sd, v4l2_std_id std) /* force to secam mode */ ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x0f); } else { - v4l2_dbg(1, debug, sd, - "VIDIOC_S_STD: Unknown norm %llx\n", std); + v4l2_dbg(1, debug, sd, "VIDIOC_S_STD: Unknown norm %llx\n", + (unsigned long long)std); } return 0; } diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index 61b54317f..fdcc1c1c5 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -57,7 +57,7 @@ #else #include <linux/freezer.h> #endif -#include <linux/videodev2.h> +#include <linux/videodev.h> #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-i2c-drv-legacy.h> @@ -371,29 +371,6 @@ int msp_sleep(struct msp_state *state, int timeout) } /* ------------------------------------------------------------------------ */ -#ifdef CONFIG_VIDEO_ALLOW_V4L1 -static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) -{ - if (rxsubchans == V4L2_TUNER_SUB_MONO) - return VIDEO_SOUND_MONO; - if (rxsubchans == V4L2_TUNER_SUB_STEREO) - return VIDEO_SOUND_STEREO; - if (audmode == V4L2_TUNER_MODE_LANG2) - return VIDEO_SOUND_LANG2; - return VIDEO_SOUND_LANG1; -} - -static int msp_mode_v4l1_to_v4l2(int mode) -{ - if (mode & VIDEO_SOUND_STEREO) - return V4L2_TUNER_MODE_STEREO; - if (mode & VIDEO_SOUND_LANG2) - return V4L2_TUNER_MODE_LANG2; - if (mode & VIDEO_SOUND_LANG1) - return V4L2_TUNER_MODE_LANG1; - return V4L2_TUNER_MODE_MONO; -} -#endif static int msp_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { @@ -487,96 +464,6 @@ static int msp_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) return 0; } -#ifdef CONFIG_VIDEO_ALLOW_V4L1 -static long msp_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) -{ - struct msp_state *state = to_state(sd); - struct i2c_client *client = v4l2_get_subdevdata(sd); - - switch (cmd) { - /* --- v4l ioctls --- */ - /* take care: bttv does userspace copying, we'll get a - kernel pointer here... */ - case VIDIOCGAUDIO: - { - struct video_audio *va = arg; - - va->flags |= VIDEO_AUDIO_VOLUME | VIDEO_AUDIO_MUTABLE; - if (state->has_sound_processing) - va->flags |= VIDEO_AUDIO_BALANCE | - VIDEO_AUDIO_BASS | - VIDEO_AUDIO_TREBLE; - if (state->muted) - va->flags |= VIDEO_AUDIO_MUTE; - va->volume = state->volume; - va->balance = state->volume ? state->balance : 32768; - va->bass = state->bass; - va->treble = state->treble; - - if (state->radio) - break; - if (state->opmode == OPMODE_AUTOSELECT) - msp_detect_stereo(client); - va->mode = msp_mode_v4l2_to_v4l1(state->rxsubchans, state->audmode); - break; - } - - case VIDIOCSAUDIO: - { - struct video_audio *va = arg; - - state->muted = (va->flags & VIDEO_AUDIO_MUTE); - state->volume = va->volume; - state->balance = va->balance; - state->bass = va->bass; - state->treble = va->treble; - msp_set_audio(client); - - if (va->mode != 0 && state->radio == 0 && - state->audmode != msp_mode_v4l1_to_v4l2(va->mode)) { - state->audmode = msp_mode_v4l1_to_v4l2(va->mode); - msp_set_audmode(client); - } - break; - } - - case VIDIOCSCHAN: - { - struct video_channel *vc = arg; - int update = 0; - v4l2_std_id std; - - if (state->radio) - update = 1; - state->radio = 0; - if (vc->norm == VIDEO_MODE_PAL) - std = V4L2_STD_PAL; - else if (vc->norm == VIDEO_MODE_SECAM) - std = V4L2_STD_SECAM; - else - std = V4L2_STD_NTSC; - if (std != state->v4l2_std) { - state->v4l2_std = std; - update = 1; - } - if (update) - msp_wake_thread(client); - break; - } - - case VIDIOCSFREQ: - { - /* new channel -- kick audio carrier scan */ - msp_wake_thread(client); - break; - } - default: - return -ENOIOCTLCMD; - } - return 0; -} -#endif - /* --- v4l2 ioctls --- */ static int msp_s_radio(struct v4l2_subdev *sd) { @@ -827,9 +714,6 @@ static const struct v4l2_subdev_core_ops msp_core_ops = { .g_ctrl = msp_g_ctrl, .s_ctrl = msp_s_ctrl, .queryctrl = msp_queryctrl, -#ifdef CONFIG_VIDEO_ALLOW_V4L1 - .ioctl = msp_ioctl, -#endif }; static const struct v4l2_subdev_tuner_ops msp_tuner_ops = { diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index fda3b7581..c85cfd27e 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -25,7 +25,6 @@ #include <media/saa7146_vv.h> #include <media/tuner.h> -#include <linux/video_decoder.h> #include <media/v4l2-common.h> #include <media/saa7115.h> #include "compat.h" diff --git a/linux/drivers/media/video/ov7670.c b/linux/drivers/media/video/ov7670.c index e03154536..f0e1a56eb 100644 --- a/linux/drivers/media/video/ov7670.c +++ b/linux/drivers/media/video/ov7670.c @@ -14,7 +14,7 @@ #include <linux/module.h> #include <linux/slab.h> #include <linux/delay.h> -#include <linux/videodev.h> +#include <linux/videodev2.h> #include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> #include <linux/i2c.h> diff --git a/linux/drivers/media/video/saa7110.c b/linux/drivers/media/video/saa7110.c index ad21fdec1..bb58477e5 100644 --- a/linux/drivers/media/video/saa7110.c +++ b/linux/drivers/media/video/saa7110.c @@ -257,7 +257,7 @@ static int saa7110_g_input_status(struct v4l2_subdev *sd, u32 *pstatus) int status = saa7110_read(sd); v4l2_dbg(1, debug, sd, "status=0x%02x norm=%llx\n", - status, decoder->norm); + status, (unsigned long long)decoder->norm); if (!(status & 0x40)) res = 0; if (!(status & 0x03)) diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index be7f98bc0..d188aae14 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -31,11 +31,6 @@ #include "saa7134.h" #include <media/v4l2-common.h> -#ifdef CONFIG_VIDEO_V4L1_COMPAT -/* Include V4L1 specific functions. Should be removed soon */ -#include <linux/videodev.h> -#endif - /* ------------------------------------------------------------------ */ unsigned int video_debug; diff --git a/linux/drivers/media/video/saa7146.h b/linux/drivers/media/video/saa7146.h index 2830b5e33..9fadb331a 100644 --- a/linux/drivers/media/video/saa7146.h +++ b/linux/drivers/media/video/saa7146.h @@ -25,8 +25,6 @@ #include <linux/types.h> #include <linux/wait.h> -#include <linux/videodev.h> - #ifndef O_NONCAP #define O_NONCAP O_TRUNC #endif diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c index 46671fb87..1eac4f7e7 100644 --- a/linux/drivers/media/video/tlv320aic23b.c +++ b/linux/drivers/media/video/tlv320aic23b.c @@ -31,16 +31,18 @@ #include <linux/i2c-id.h> #include <linux/videodev2.h> #include <media/v4l2-device.h> -#include <media/v4l2-i2c-drv-legacy.h> +#include <media/v4l2-i2c-drv.h> #include "compat.h" MODULE_DESCRIPTION("tlv320aic23b driver"); MODULE_AUTHOR("Scott Alfter, Ulf Eklund, Hans Verkuil"); MODULE_LICENSE("GPL"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x34 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; +#endif /* ----------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/v4l2-compat-ioctl32.c b/linux/drivers/media/video/v4l2-compat-ioctl32.c index 05a356776..d9cee38cd 100644 --- a/linux/drivers/media/video/v4l2-compat-ioctl32.c +++ b/linux/drivers/media/video/v4l2-compat-ioctl32.c @@ -1052,7 +1052,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case VIDIOC_DBG_S_REGISTER: case VIDIOC_DBG_G_REGISTER: case VIDIOC_DBG_G_CHIP_IDENT: - case VIDIOC_G_CHIP_IDENT_OLD: case VIDIOC_S_HW_FREQ_SEEK: ret = do_video_ioctl(file, cmd, arg); break; diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c index 230299801..5cf729c9d 100644 --- a/linux/drivers/media/video/v4l2-ioctl.c +++ b/linux/drivers/media/video/v4l2-ioctl.c @@ -17,6 +17,7 @@ #include <linux/kernel.h> #define __OLD_VIDIOC_ /* To allow fixing old calls */ +#include <linux/videodev.h> #include <linux/videodev2.h> #ifdef CONFIG_VIDEO_V4L1 @@ -1692,11 +1693,6 @@ static long __video_do_ioctl(struct file *file, dbgarg(cmd, "chip_ident=%u, revision=0x%x\n", p->ident, p->revision); break; } - case VIDIOC_G_CHIP_IDENT_OLD: - printk(KERN_ERR "VIDIOC_G_CHIP_IDENT has been deprecated and will disappear in 2.6.30.\n"); - printk(KERN_ERR "It is a debugging ioctl and must not be used in applications!\n"); - return -EINVAL; - case VIDIOC_S_HW_FREQ_SEEK: { struct v4l2_hw_freq_seek *p = arg; @@ -1801,11 +1797,12 @@ static long __video_do_ioctl(struct file *file, static unsigned long cmd_input_size(unsigned int cmd) { /* Size of structure up to and including 'field' */ -#define CMDINSIZE(cmd, type, field) case _IOC_NR(VIDIOC_##cmd): return \ - offsetof(struct v4l2_##type, field) + \ - sizeof(((struct v4l2_##type *)0)->field); +#define CMDINSIZE(cmd, type, field) \ + case VIDIOC_##cmd: \ + return offsetof(struct v4l2_##type, field) + \ + sizeof(((struct v4l2_##type *)0)->field); - switch (_IOC_NR(cmd)) { + switch (cmd) { CMDINSIZE(ENUM_FMT, fmtdesc, type); CMDINSIZE(G_FMT, format, type); CMDINSIZE(QUERYBUF, buffer, type); diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 76f7dfc32..e3bc2b0a3 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -29,10 +29,6 @@ #include "compat.h" #include <linux/videodev2.h> #include <linux/dma-mapping.h> -#ifdef CONFIG_VIDEO_V4L1_COMPAT -/* Include V4L1 specific functions. Should be removed soon */ -#include <linux/videodev.h> -#endif #include <linux/interrupt.h> #include <linux/kthread.h> #include <linux/highmem.h> @@ -1413,7 +1409,7 @@ free_dev: */ static int __init vivi_init(void) { - int ret, i; + int ret = 0, i; if (n_devs <= 0) n_devs = 1; diff --git a/linux/drivers/media/video/vpx3220.c b/linux/drivers/media/video/vpx3220.c index 0c1c97f2f..ee6c74176 100644 --- a/linux/drivers/media/video/vpx3220.c +++ b/linux/drivers/media/video/vpx3220.c @@ -374,7 +374,7 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std) choosen video norm */ temp_input = vpx3220_fp_read(sd, 0xf2); - v4l2_dbg(1, debug, sd, "VIDIOC_S_STD %llx\n", std); + v4l2_dbg(1, debug, sd, "VIDIOC_S_STD %llx\n", (unsigned long long)std); if (std & V4L2_STD_NTSC) { vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1); v4l2_dbg(1, debug, sd, "norm switched to NTSC\n"); diff --git a/linux/drivers/media/video/w9966.c b/linux/drivers/media/video/w9966.c index b8ede9e3f..75d8debe7 100644 --- a/linux/drivers/media/video/w9966.c +++ b/linux/drivers/media/video/w9966.c @@ -58,7 +58,7 @@ #include <linux/init.h> #include <linux/delay.h> #include "compat.h" -#include <linux/videodev2.h> +#include <linux/videodev.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <linux/parport.h> diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c index dd519e48c..0478ee33e 100644 --- a/linux/drivers/media/video/w9968cf.c +++ b/linux/drivers/media/video/w9968cf.c @@ -42,6 +42,7 @@ #include <asm/page.h> #include <asm/uaccess.h> #include <linux/page-flags.h> +#include <linux/videodev.h> #include <media/v4l2-ioctl.h> #include "w9968cf.h" diff --git a/linux/drivers/media/video/zoran/zoran_driver.c b/linux/drivers/media/video/zoran/zoran_driver.c index 1560c1e4c..4afd14308 100644 --- a/linux/drivers/media/video/zoran/zoran_driver.c +++ b/linux/drivers/media/video/zoran/zoran_driver.c @@ -59,7 +59,7 @@ #include <linux/spinlock.h> -#include <linux/videodev2.h> +#include <linux/videodev.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include "videocodec.h" diff --git a/linux/include/linux/videodev.h b/linux/include/linux/videodev.h index 837f392fb..b19eab140 100644 --- a/linux/include/linux/videodev.h +++ b/linux/include/linux/videodev.h @@ -16,6 +16,23 @@ #include <linux/ioctl.h> #include <linux/videodev2.h> +#if defined(__MIN_V4L1) && defined (__KERNEL__) + +/* + * Used by those V4L2 core functions that need a minimum V4L1 support, + * in order to allow V4L1 Compatibilty code compilation. + */ + +struct video_mbuf +{ + int size; /* Total memory to map */ + int frames; /* Frames */ + int offsets[VIDEO_MAX_FRAME]; +}; + +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ + +#else #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) #define VID_TYPE_CAPTURE 1 /* Can capture */ @@ -312,6 +329,7 @@ struct video_code #define VID_PLAY_END_MARK 14 #endif /* CONFIG_VIDEO_V4L1_COMPAT */ +#endif /* __MIN_V4L1 */ #endif /* __LINUX_VIDEODEV_H */ diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 4167a0b44..7a8eafd43 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -1412,14 +1412,6 @@ struct v4l2_dbg_chip_ident { __u32 revision; /* chip revision, chip specific */ } __attribute__ ((packed)); -/* VIDIOC_G_CHIP_IDENT_OLD: Deprecated, do not use */ -struct v4l2_chip_ident_old { - __u32 match_type; /* Match type */ - __u32 match_chip; /* Match this chip, meaning determined by match_type */ - __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ - __u32 revision; /* chip revision, chip specific */ -}; - /* * I O C T L C O D E S F O R V I D E O D E V I C E S * @@ -1497,8 +1489,6 @@ struct v4l2_chip_ident_old { /* Experimental, meant for debugging, testing and internal use. Never use this ioctl in applications! */ #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) -/* This is deprecated and will go away in 2.6.30 */ -#define VIDIOC_G_CHIP_IDENT_OLD _IOWR('V', 81, struct v4l2_chip_ident_old) #endif #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) diff --git a/linux/include/media/v4l2-ioctl.h b/linux/include/media/v4l2-ioctl.h index a8b4c0b67..7a4529def 100644 --- a/linux/include/media/v4l2-ioctl.h +++ b/linux/include/media/v4l2-ioctl.h @@ -15,6 +15,7 @@ #include <linux/mutex.h> #include <linux/compiler.h> /* need __user */ #ifdef CONFIG_VIDEO_V4L1_COMPAT +#define __MIN_V4L1 #include <linux/videodev.h> #else #include <linux/videodev2.h> diff --git a/linux/include/media/videobuf-core.h b/linux/include/media/videobuf-core.h index 874f1340d..1c5946c44 100644 --- a/linux/include/media/videobuf-core.h +++ b/linux/include/media/videobuf-core.h @@ -18,6 +18,7 @@ #include <linux/poll.h> #ifdef CONFIG_VIDEO_V4L1_COMPAT +#define __MIN_V4L1 #include <linux/videodev.h> #endif #include <linux/videodev2.h> diff --git a/linux/sound/i2c/other/tea575x-tuner.c b/linux/sound/i2c/other/tea575x-tuner.c index 8937198db..c5add7cb0 100644 --- a/linux/sound/i2c/other/tea575x-tuner.c +++ b/linux/sound/i2c/other/tea575x-tuner.c @@ -77,11 +77,7 @@ static struct v4l2_queryctrl radio_qctrl[] = { * lowlevel part */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) -static void snd_tea575x_set_freq(tea575x_t *tea) -#else static void snd_tea575x_set_freq(struct snd_tea575x *tea) -#endif { unsigned long freq; @@ -209,9 +205,9 @@ static int vidioc_queryctrl(struct file *file, void *priv, static int vidioc_g_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) struct snd_tea575x *tea = video_drvdata(file); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: if (tea->ops->mute) { @@ -226,9 +222,9 @@ static int vidioc_g_ctrl(struct file *file, void *priv, static int vidioc_s_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) struct snd_tea575x *tea = video_drvdata(file); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: if (tea->ops->mute) { @@ -301,11 +297,7 @@ static struct video_device tea575x_radio = { /* * initialize all the tea575x chips */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) -void snd_tea575x_init(tea575x_t *tea) -#else void snd_tea575x_init(struct snd_tea575x *tea) -#endif { int retval; unsigned int val; diff --git a/v4l/scripts/release.sh b/v4l/scripts/release.sh index 5055675d6..19916545c 100755 --- a/v4l/scripts/release.sh +++ b/v4l/scripts/release.sh @@ -14,7 +14,7 @@ files_common="$files_v4l $files_tuner $files_i2c doc" # other files files_ir="ir-common.[ch]" -files_audio="msp3400.[ch] tvaudio.[ch] tvmixer.[ch]" +files_audio="msp3400.[ch] tvaudio.[ch]" files_bttv="bt848.h btcx*.[ch] bttv*.[ch] ir-kbd*.c" files_saa="saa7134*.[ch] saa6752hs.[ch] ir-kbd-i2c.c" diff --git a/v4l2-apps/test/ioctl-test.c b/v4l2-apps/test/ioctl-test.c index f9ac1cad5..883282106 100644 --- a/v4l2-apps/test/ioctl-test.c +++ b/v4l2-apps/test/ioctl-test.c @@ -90,7 +90,6 @@ union v4l_parms { struct v4l2_encoder_cmd p_v4l2_encoder_cmd; struct v4l2_dbg_register p_v4l2_dbg_register; struct v4l2_dbg_chip_ident p_v4l2_dbg_chip_ident; - struct v4l2_chip_ident_old p_v4l2_chip_ident_old; struct v4l2_hw_freq_seek p_v4l2_hw_freq_seek; }; @@ -197,7 +196,6 @@ static const struct { ioc(VIDIOC_DBG_S_REGISTER), /* struct v4l2_register */ ioc(VIDIOC_DBG_G_REGISTER), /* struct v4l2_register */ ioc(VIDIOC_DBG_G_CHIP_IDENT), /* struct v4l2_dbg_chip_ident */ - ioc(VIDIOC_G_CHIP_IDENT_OLD), /* struct v4l2_chip_ident_old */ ioc(VIDIOC_S_HW_FREQ_SEEK), /* struct v4l2_hw_freq_seek */ #ifdef __OLD_VIDIOC_ ioc(VIDIOC_OVERLAY_OLD), /* int */ |