summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/cx2341x.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c4
-rw-r--r--linux/drivers/media/video/tda9887.c31
-rw-r--r--linux/drivers/media/video/tuner-core.c9
-rw-r--r--linux/drivers/media/video/v4l2-common.c2
-rw-r--r--linux/include/media/cx2341x.h2
-rw-r--r--test/v4l2-ctl.cpp57
-rwxr-xr-xv4l/scripts/make_kconfig.pl20
8 files changed, 83 insertions, 44 deletions
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c
index ae37d0513..7bb1fb4ee 100644
--- a/linux/drivers/media/video/cx2341x.c
+++ b/linux/drivers/media/video/cx2341x.c
@@ -605,7 +605,7 @@ static void cx2341x_calc_audio_properties(struct cx2341x_mpeg_params *params)
}
int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params,
- struct v4l2_ext_controls *ctrls, int cmd)
+ struct v4l2_ext_controls *ctrls, unsigned int cmd)
{
int err = 0;
int i;
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index 0422e10e6..f89e6d070 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -443,10 +443,10 @@ static void saa6752hs_old_set_params(struct i2c_client* client,
}
static int handle_ctrl(struct saa6752hs_mpeg_params *params,
- struct v4l2_ext_control *ctrl, int cmd)
+ struct v4l2_ext_control *ctrl, unsigned int cmd)
{
int old = 0, new;
- int set = cmd == VIDIOC_S_EXT_CTRLS;
+ int set = (cmd == VIDIOC_S_EXT_CTRLS);
new = ctrl->value;
switch (ctrl->id) {
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index ba9488594..efff424db 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -26,11 +26,11 @@
*/
#define tda9887_info(fmt, arg...) do {\
- printk(KERN_INFO "%s %d-%04x (tda9887): " fmt, t->i2c.name, \
+ printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.name, \
i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
#define tda9887_dbg(fmt, arg...) do {\
if (tuner_debug) \
- printk(KERN_INFO "%s %d-%04x (tda9887): " fmt, t->i2c.name, \
+ printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.name, \
i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
@@ -88,8 +88,7 @@ struct tvnorm {
#define cAudioGain6 0x80 // bit c7
#define cTopMask 0x1f // bit c0:4
-#define cTopPalSecamDefault 0x14 // bit c0:4
-#define cTopNtscRadioDefault 0x10 // bit c0:4
+#define cTopDefault 0x10 // bit c0:4
//// third reg (e)
#define cAudioIF_4_5 0x00 // bit e0:1
@@ -127,7 +126,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis50 |
- cTopPalSecamDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_5_5 |
cVideoIF_38_90 ),
@@ -138,7 +137,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis50 |
- cTopPalSecamDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_6_0 |
cVideoIF_38_90 ),
@@ -149,7 +148,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis50 |
- cTopPalSecamDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_6_5 |
cVideoIF_38_90 ),
@@ -160,7 +159,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis75 |
- cTopNtscRadioDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_4_5 |
cVideoIF_45_75 ),
@@ -169,7 +168,7 @@ static struct tvnorm tvnorms[] = {
.name = "SECAM-BGH",
.b = ( cPositiveAmTV |
cQSS ),
- .c = ( cTopPalSecamDefault),
+ .c = ( cTopDefault),
.e = ( cGating_36 |
cAudioIF_5_5 |
cVideoIF_38_90 ),
@@ -178,7 +177,7 @@ static struct tvnorm tvnorms[] = {
.name = "SECAM-L",
.b = ( cPositiveAmTV |
cQSS ),
- .c = ( cTopPalSecamDefault),
+ .c = ( cTopDefault),
.e = ( cGating_36 |
cAudioIF_6_5 |
cVideoIF_38_90 ),
@@ -188,7 +187,7 @@ static struct tvnorm tvnorms[] = {
.b = ( cOutputPort2Inactive |
cPositiveAmTV |
cQSS ),
- .c = ( cTopPalSecamDefault),
+ .c = ( cTopDefault),
.e = ( cGating_36 |
cAudioIF_6_5 |
cVideoIF_33_90 ),
@@ -199,7 +198,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis50 |
- cTopPalSecamDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_6_5 |
cVideoIF_38_90 ),
@@ -210,7 +209,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis75 |
- cTopNtscRadioDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_4_5 |
cVideoIF_45_75 ),
@@ -221,7 +220,7 @@ static struct tvnorm tvnorms[] = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis50 |
- cTopNtscRadioDefault),
+ cTopDefault),
.e = ( cGating_36 |
cAudioIF_4_5 |
cVideoIF_58_75 ),
@@ -234,7 +233,7 @@ static struct tvnorm radio_stereo = {
cQSS ),
.c = ( cDeemphasisOFF |
cAudioGain6 |
- cTopNtscRadioDefault),
+ cTopDefault),
.e = ( cTunerGainLow |
cAudioIF_5_5 |
cRadioIF_38_90 ),
@@ -246,7 +245,7 @@ static struct tvnorm radio_mono = {
cQSS ),
.c = ( cDeemphasisON |
cDeemphasis75 |
- cTopNtscRadioDefault),
+ cTopDefault),
.e = ( cTunerGainLow |
cAudioIF_5_5 |
cRadioIF_38_90 ),
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 5718aef03..f63df8ce6 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -47,7 +47,6 @@ static unsigned int no_autodetect = 0;
static unsigned int show_i2c = 0;
/* insmod options used at runtime => read/write */
-static unsigned int tuner_debug_old = 0;
int tuner_debug = 0;
static unsigned int tv_range[2] = { 44, 958 };
@@ -66,15 +65,12 @@ MODULE_PARM(tv_range,"2i");
MODULE_PARM(radio_range,"2i");
MODULE_PARM(no_autodetect, "i");
MODULE_PARM(tuner_debug, "i");
-MODULE_PARM(tuner_debug_old, "i");
MODULE_PARM(addr, "i");
MODULE_PARM(show_i2c, "i");
#else
module_param(addr, int, 0444);
module_param(no_autodetect, int, 0444);
module_param(show_i2c, int, 0444);
-/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */
-module_param_named(tuner_debug,tuner_debug_old, int, 0444);
module_param_named(debug,tuner_debug, int, 0644);
module_param_string(pal, pal, sizeof(pal), 0644);
module_param_string(secam, secam, sizeof(secam), 0644);
@@ -489,11 +485,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr,
t->audmode = V4L2_TUNER_MODE_STEREO;
t->mode_mask = T_UNINITIALIZED;
t->tuner_status = tuner_status;
- if (tuner_debug_old) {
- tuner_debug = tuner_debug_old;
- printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n");
- printk(KERN_ERR "tuner: use the debug option instead.\n");
- }
if (show_i2c) {
unsigned char buffer[16];
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index 40fea5a05..96c778596 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -1134,7 +1134,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
};
static const char *mpeg_stream_vbi_fmt[] = {
"No VBI",
- "VBI in private packets, IVTV format",
+ "Private packet, IVTV format",
NULL
};
diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h
index 074c4008a..e1cbf7974 100644
--- a/linux/include/media/cx2341x.h
+++ b/linux/include/media/cx2341x.h
@@ -89,7 +89,7 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params,
struct v4l2_queryctrl *qctrl);
const char **cx2341x_ctrl_get_menu(u32 id);
int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params,
- struct v4l2_ext_controls *ctrls, int cmd);
+ struct v4l2_ext_controls *ctrls, unsigned int cmd);
void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p);
void cx2341x_log_status(struct cx2341x_mpeg_params *p, int cardid);
diff --git a/test/v4l2-ctl.cpp b/test/v4l2-ctl.cpp
index deb7f3fb9..6e044e563 100644
--- a/test/v4l2-ctl.cpp
+++ b/test/v4l2-ctl.cpp
@@ -36,7 +36,6 @@
#include <math.h>
#include <sys/klog.h>
-#define __user
#include <linux/videodev2.h>
#include <list>
@@ -600,6 +599,7 @@ static int doioctl(int fd, int request, void *parm, const char *name)
if (!option_verbose) return ioctl(fd, request, parm);
retVal = ioctl(fd, request, parm);
+ printf("%s: ", name);
if (retVal < 0)
printf("failed: %s\n", strerror(errno));
else
@@ -641,6 +641,24 @@ static void parse_next_subopt(char **subs, char **value)
}
}
+static void print_std(const char *prefix, const char *stds[], unsigned long long std)
+{
+ int first = 1;
+
+ printf("\t%s-", prefix);
+ while (*stds) {
+ if (std & 1) {
+ if (!first)
+ printf("/");
+ first = 0;
+ printf("%s", *stds);
+ }
+ stds++;
+ std >>= 1;
+ }
+ printf("\n");
+}
+
int main(int argc, char **argv)
{
char *value, *subs;
@@ -656,7 +674,7 @@ int main(int argc, char **argv)
/* command args */
char ch, *device = strdup("/dev/video0"); /* -d device */
struct v4l2_format vfmt; /* set_format/get_format */
- struct v4l2_tuner tuner; /* set_tuner/get_tuner */
+ struct v4l2_tuner tuner = { 0 };/* set_tuner/get_tuner */
struct v4l2_capability vcap; /* list_cap */
struct v4l2_input vin; /* list_inputs */
struct v4l2_output vout; /* list_outputs */
@@ -903,7 +921,7 @@ int main(int argc, char **argv)
fac = (tuner.capability & V4L2_TUNER_CAP_LOW) ? 16000 : 16;
}
vf.tuner = 0;
- vf.type = (enum v4l2_tuner_type)0;
+ vf.type = tuner.type;
vf.frequency = __u32(freq * fac);
if (doioctl(fd, VIDIOC_S_FREQUENCY, &vf,
"VIDIOC_S_FREQUENCY") == 0)
@@ -1131,8 +1149,39 @@ int main(int argc, char **argv)
}
if (options[OptGetStandard]) {
- if (doioctl(fd, VIDIOC_G_STD, &std, "VIDIOC_G_STD") == 0)
+ if (doioctl(fd, VIDIOC_G_STD, &std, "VIDIOC_G_STD") == 0) {
+ static const char *pal[] = {
+ "B", "B1", "G", "H", "I", "D", "D1", "K",
+ "M", "N", "Nc", "60",
+ NULL
+ };
+ static const char *ntsc[] = {
+ "M", "M-JP", "443", "M-KR",
+ NULL
+ };
+ static const char *secam[] = {
+ "B", "D", "G", "H", "K", "K1", "L", "Lc",
+ NULL
+ };
+ static const char *atsc[] = {
+ "ATSC-8-VSB", "ATSC-16-VSB",
+ NULL
+ };
+
printf("Video standard = 0x%08llx\n", (unsigned long long)std);
+ if (std & 0xfff) {
+ print_std("PAL", pal, std);
+ }
+ if (std & 0xf000) {
+ print_std("NTSC", ntsc, std >> 12);
+ }
+ if (std & 0xff0000) {
+ print_std("SECAM", secam, std >> 16);
+ }
+ if (std & 0xf000000) {
+ print_std("ATSC/HDTV", atsc, std >> 24);
+ }
+ }
}
if (options[OptListCtrlsMenus]) {
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index feef72c92..d5b34b36c 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -22,14 +22,14 @@ use FileHandle;
sub process_config ($)
{
my $filename = shift;
- my $in = new FileHandle;
+ my $in = new FileHandle;
open $in,"$kernel/include/$filename" or die "File not found: $kernel/include/$filename";
while (<$in>) {
- if (m|\#include\s+\<(.*)\>|) {
+ if (m|\#include\s+\<(.*)\>|) {
process_config ($1);
next;
- }
+ }
if (m/\#define\s+CONFIG_([^ ]*)_ON_SMP\s+(.*)\n/) {
my $key=$1;
my $value=$2;
@@ -265,7 +265,7 @@ sub open_kconfig($$) {
# we need to make sure we've disabled it, and add a bit
# to the help text
if (m|^\s*(---)?help(---)?\s*$| && $disabled) {
- if(exists $tristate{$key} && !$default_seen) {
+ if(exists $tristate{$key} && !$default_seen) {
print OUT "\tdefault n\n";
}
print OUT <<"EOF";
@@ -358,10 +358,10 @@ config VIDEO_KERNEL_VERSION
---help---
Normally drivers that require a kernel newer $version.$level.$sublevel,
the kernel you are compiling for now, will be disabled.
-
+
Turning this switch on will let you enabled them, but be warned
- they may not work properly or even compile.
-
+ they may not work properly or even compile.
+
They may also work fine, and the only reason they are listed as
requiring a newer kernel is that no one has tested them with an
older one yet.
@@ -409,11 +409,11 @@ print <<"EOF2";
$key: $mirodep is missing.
***WARNING:*** You do not have the full kernel sources installed.
-This does not prevent you from building the v4l-dvb tree if you have the
-kernel headers, but the full kernel source is required in order to use
+This does not prevent you from building the v4l-dvb tree if you have the
+kernel headers, but the full kernel source is required in order to use
make menuconfig / xconfig / qconfig.
-If you are experiencing problems building the v4l-dvb tree, please try
+If you are experiencing problems building the v4l-dvb tree, please try
building against a vanilla kernel before reporting a bug.
Vanilla kernels are available at http://kernel.org.