summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/Documentation/dvb/bt8xx.txt6
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c2
-rw-r--r--linux/drivers/media/dvb/frontends/Kconfig2
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c17
-rw-r--r--linux/drivers/media/dvb/frontends/mt312.c116
-rw-r--r--linux/drivers/media/dvb/frontends/mt312.h6
-rw-r--r--linux/drivers/media/video/Makefile2
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--linux/drivers/media/video/tuner-core.c2
-rw-r--r--linux/drivers/media/video/tuner-types.c19
-rw-r--r--linux/include/linux/videodev2.h1
-rw-r--r--linux/sound/pci/bt87x.c4
-rw-r--r--v4l/Make.config3
-rw-r--r--v4l/Makefile9
-rwxr-xr-xv4l/scripts/gentree.pl8
-rwxr-xr-xv4l/scripts/strip-trailing-whitespaces.sh22
16 files changed, 98 insertions, 125 deletions
diff --git a/linux/Documentation/dvb/bt8xx.txt b/linux/Documentation/dvb/bt8xx.txt
index df6c05453..52ed46206 100644
--- a/linux/Documentation/dvb/bt8xx.txt
+++ b/linux/Documentation/dvb/bt8xx.txt
@@ -111,4 +111,8 @@ source: linux/Documentation/video4linux/CARDLIST.bttv
If you have problems with this please do ask on the mailing list.
--
-Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham
+Authors: Richard Walker,
+ Jamie Honan,
+ Michael Hunold,
+ Manu Abraham,
+ Michael Krufky
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index e5ba1d323..26aa3a58b 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -475,7 +475,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);
} else
/* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
- if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
+ if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
ops = fc->fe->ops;
ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
diff --git a/linux/drivers/media/dvb/frontends/Kconfig b/linux/drivers/media/dvb/frontends/Kconfig
index 76b6a2aef..c676b1e23 100644
--- a/linux/drivers/media/dvb/frontends/Kconfig
+++ b/linux/drivers/media/dvb/frontends/Kconfig
@@ -29,7 +29,7 @@ config DVB_TDA8083
A DVB-S tuner module. Say Y when you want to support this frontend.
config DVB_MT312
- tristate "Zarlink MT312 based"
+ tristate "Zarlink VP310/MT312 based"
depends on DVB_CORE
help
A DVB-S tuner module. Say Y when you want to support this frontend.
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index 28fac791d..ddcb99cc5 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -61,21 +61,6 @@ static int debug;
} while (0)
-#if ! defined(__powerpc__)
-static __inline__ int __ilog2(unsigned long x)
-{
- int i;
-
- if (x == 0)
- return -1;
-
- for (i = 0; x != 0; i++)
- x >>= 1;
-
- return i - 1;
-}
-#endif
-
static int at76c651_writereg(struct at76c651_state* state, u8 reg, u8 data)
{
int ret;
@@ -183,7 +168,7 @@ static int at76c651_set_symbol_rate(struct at76c651_state* state, u32 symbol_rat
* mantissa = (symbol_rate / FREF) * (1 << (30 - exponent))
*/
- exponent = __ilog2((symbol_rate << 4) / 903125);
+ exponent = long_log2((symbol_rate << 4) / 903125);
mantissa = ((symbol_rate / 3125) * (1 << (24 - exponent))) / 289;
at76c651_writereg(state, 0x00, mantissa >> 13);
diff --git a/linux/drivers/media/dvb/frontends/mt312.c b/linux/drivers/media/dvb/frontends/mt312.c
index ec4e641ac..d3aea83cf 100644
--- a/linux/drivers/media/dvb/frontends/mt312.c
+++ b/linux/drivers/media/dvb/frontends/mt312.c
@@ -612,76 +612,6 @@ static void mt312_release(struct dvb_frontend* fe)
kfree(state);
}
-static struct dvb_frontend_ops vp310_mt312_ops;
-
-struct dvb_frontend* vp310_attach(const struct mt312_config* config,
- struct i2c_adapter* i2c)
-{
- struct mt312_state* state = NULL;
-
- /* allocate memory for the internal state */
- state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
- if (state == NULL)
- goto error;
-
- /* setup the state */
- state->config = config;
- state->i2c = i2c;
- memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
- strcpy(state->ops.info.name, "Zarlink VP310 DVB-S");
-
- /* check if the demod is there */
- if (mt312_readreg(state, ID, &state->id) < 0)
- goto error;
- if (state->id != ID_VP310) {
- goto error;
- }
-
- /* create dvb_frontend */
- state->frequency = 90;
- state->frontend.ops = &state->ops;
- state->frontend.demodulator_priv = state;
- return &state->frontend;
-
-error:
- kfree(state);
- return NULL;
-}
-
-struct dvb_frontend* mt312_attach(const struct mt312_config* config,
- struct i2c_adapter* i2c)
-{
- struct mt312_state* state = NULL;
-
- /* allocate memory for the internal state */
- state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
- if (state == NULL)
- goto error;
-
- /* setup the state */
- state->config = config;
- state->i2c = i2c;
- memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
- strcpy(state->ops.info.name, "Zarlink MT312 DVB-S");
-
- /* check if the demod is there */
- if (mt312_readreg(state, ID, &state->id) < 0)
- goto error;
- if (state->id != ID_MT312) {
- goto error;
- }
-
- /* create dvb_frontend */
- state->frequency = 60;
- state->frontend.ops = &state->ops;
- state->frontend.demodulator_priv = state;
- return &state->frontend;
-
-error:
- kfree(state);
- return NULL;
-}
-
static struct dvb_frontend_ops vp310_mt312_ops = {
.info = {
@@ -720,6 +650,49 @@ static struct dvb_frontend_ops vp310_mt312_ops = {
.set_voltage = mt312_set_voltage,
};
+struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
+ struct i2c_adapter* i2c)
+{
+ struct mt312_state* state = NULL;
+
+ /* allocate memory for the internal state */
+ state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
+ if (state == NULL)
+ goto error;
+
+ /* setup the state */
+ state->config = config;
+ state->i2c = i2c;
+ memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
+
+ /* check if the demod is there */
+ if (mt312_readreg(state, ID, &state->id) < 0)
+ goto error;
+
+ switch (state->id) {
+ case ID_VP310:
+ strcpy(state->ops.info.name, "Zarlink VP310 DVB-S");
+ state->frequency = 90;
+ break;
+ case ID_MT312:
+ strcpy(state->ops.info.name, "Zarlink MT312 DVB-S");
+ state->frequency = 60;
+ break;
+ default:
+ printk (KERN_WARNING "Only Zarlink VP310/MT312 are supported chips.\n");
+ goto error;
+ }
+
+ /* create dvb_frontend */
+ state->frontend.ops = &state->ops;
+ state->frontend.demodulator_priv = state;
+ return &state->frontend;
+
+error:
+ kfree(state);
+ return NULL;
+}
+
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
@@ -727,5 +700,4 @@ MODULE_DESCRIPTION("Zarlink VP310/MT312 DVB-S Demodulator driver");
MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>");
MODULE_LICENSE("GPL");
-EXPORT_SYMBOL(mt312_attach);
-EXPORT_SYMBOL(vp310_attach);
+EXPORT_SYMBOL(vp310_mt312_attach);
diff --git a/linux/drivers/media/dvb/frontends/mt312.h b/linux/drivers/media/dvb/frontends/mt312.h
index b3a53a73a..074d844f0 100644
--- a/linux/drivers/media/dvb/frontends/mt312.h
+++ b/linux/drivers/media/dvb/frontends/mt312.h
@@ -38,10 +38,8 @@ struct mt312_config
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};
-extern struct dvb_frontend* mt312_attach(const struct mt312_config* config,
- struct i2c_adapter* i2c);
+struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
+ struct i2c_adapter* i2c);
-extern struct dvb_frontend* vp310_attach(const struct mt312_config* config,
- struct i2c_adapter* i2c);
#endif // MT312_H
diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile
index 60e9c6e3f..faf728366 100644
--- a/linux/drivers/media/video/Makefile
+++ b/linux/drivers/media/video/Makefile
@@ -9,7 +9,7 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o
tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \
- mt20xx.o tda8290.o tea5767.o xc3028.o
+ mt20xx.o tda8290.o tea5767.o
msp3400-objs := msp3400-driver.o msp3400-kthreads.o
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 29e7b8a00..de6d61d3c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -155,6 +155,7 @@ struct em28xx_board em28xx_boards[] = {
.amux = 1,
}},
},
+#ifdef CONFIG_XC3028
[EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
.name = "Hauppauge WinTV HVR 900",
.vchannels = 3,
@@ -223,6 +224,7 @@ struct em28xx_board em28xx_boards[] = {
.amux = 1,
}},
},
+#endif
[EM2820_BOARD_MSI_VOX_USB_2] = {
.name = "MSI VOX USB 2.0",
.vchannels = 3,
@@ -341,9 +343,11 @@ struct usb_device_id em28xx_id_table [] = {
{ USB_DEVICE(0x2304, 0x0208), .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
{ USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
{ USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
+#ifdef CONFIG_XC3028
{ USB_DEVICE(0x2040, 0x6500), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
{ USB_DEVICE(0x0ccd, 0x0042), .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
{ USB_DEVICE(0x0ccd, 0x0047), .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
+#endif
{ },
};
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 007a3a8b4..553d80394 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -245,9 +245,11 @@ static void set_type(struct i2c_client *c, unsigned int type,
i2c_master_send(c,buffer,4);
default_tuner_init(c);
break;
+#ifdef CONFIG_XC3028
case TUNER_XCEIVE_XC3028:
xc3028_init(c);
break;
+#endif
default:
default_tuner_init(c);
break;
diff --git a/linux/drivers/media/video/tuner-types.c b/linux/drivers/media/video/tuner-types.c
index 3c1b4c986..c66a55e81 100644
--- a/linux/drivers/media/video/tuner-types.c
+++ b/linux/drivers/media/video/tuner-types.c
@@ -1032,23 +1032,6 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = {
},
};
-/* ------------ TUNER_XCEIVE_XC3028 - Xceive xc3028 ------------ */
-
-static struct tuner_range tuner_xceive_xc3028_ranges[] = {
- { 16 * 140.25 /*MHz*/, 0x02, },
- { 16 * 463.25 /*MHz*/, 0x04, },
- { 16 * 999.99 , 0x01, },
-};
-
-static struct tuner_params tuner_xceive_xc3028_params[] = {
- {
- .type = TUNER_XCEIVE_XC3028,
- .ranges = tuner_xceive_xc3028_ranges,
- .count = ARRAY_SIZE(tuner_xceive_xc3028_ranges),
- },
-};
-
-
/* --------------------------------------------------------------------- */
struct tunertype tuners[] = {
@@ -1418,7 +1401,7 @@ struct tunertype tuners[] = {
},
[TUNER_XCEIVE_XC3028] = { /* Xceive 3028 */
.name = "Xceive xc3028",
- .params = tuner_xceive_xc3028_params,
+ /* see xc3028.c for details */
},
};
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 0fe3901c6..1b76d3e9a 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -356,6 +356,7 @@ struct v4l2_pix_format
#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */
#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */
#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */
+#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */
/*
* F O R M A T E N U M E R A T I O N
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c
index e4e99e429..65f7b6a4f 100644
--- a/linux/sound/pci/bt87x.c
+++ b/linux/sound/pci/bt87x.c
@@ -781,6 +781,8 @@ static struct pci_device_id snd_bt87x_ids[] = {
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000),
/* Viewcast Osprey 200 */
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100),
+ /* AVerMedia Studio No. 103, 203, ...? */
+ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000),
{ }
};
MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
@@ -808,7 +810,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
const struct pci_device_id *supported;
supported = pci_match_device(&driver, pci);
- if (supported)
+ if (supported && supported->driver_data > 0)
return supported->driver_data;
for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
diff --git a/v4l/Make.config b/v4l/Make.config
index d51f77db6..1f19b37ed 100644
--- a/v4l/Make.config
+++ b/v4l/Make.config
@@ -11,6 +11,9 @@ CONFIG_VIDEO_CX88 := m
CONFIG_TVP5150 := m
CONFIG_SAA711X := m
+#enable experimental support for xc3028 tuner
+CONFIG_XC3028 := m
+
CONFIG_VIDEO_DECODER := m
CONFIG_VIDEO_ALSA := y
diff --git a/v4l/Makefile b/v4l/Makefile
index 889e1581c..e637d2617 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -30,7 +30,10 @@ cx88xx-objs := cx88-cards.o cx88-core.o cx88-i2c.o cx88-tvaudio.o \
cx88-input.o
cx8800-objs := cx88-video.o cx88-vbi.o
cx8802-objs := cx88-mpeg.o
-tuner-objs := tuner-core.o tuner-types.o tuner-simple.o mt20xx.o tda8290.o tea5767.o xc3028.o
+tuner-objs := tuner-core.o tuner-types.o tuner-simple.o mt20xx.o tda8290.o tea5767.o
+ifeq ($(CONFIG_XC3028),m)
+tuner-objs += xc3028.o
+endif
msp3400-objs := msp3400-driver.o msp3400-kthreads.o
list-multi := bttv.o saa7134.o cx88xx.o cx8800.o cx88-alsa.o cx8802.o
em28xx-objs := em28xx-video.o em28xx-i2c.o em28xx-cards.o em28xx-core.o \
@@ -158,6 +161,10 @@ ifeq ($(CONFIG_VIDEO_ADV_DEBUG),y)
EXTRA_CFLAGS += -DCONFIG_VIDEO_ADV_DEBUG=1
endif
+ifeq ($(CONFIG_XC3028),m)
+ EXTRA_CFLAGS += -DCONFIG_XC3028=1
+endif
+
# for DVB
EXTRA_CFLAGS += -DDVB_CVS=1
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core/
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index 4885b08ad..0ae296b93 100755
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -146,6 +146,14 @@ sub filter_source ($$) {
$level++;
next;
}
+ if ($line =~ /^#if.*CONFIG_XC3028/) {
+ chomp($line);
+ $state{$level} = "if";
+ $if{$level} = 0;
+ print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level$
+ $level++;
+ next;
+ }
if ($line =~ /^#if.*BTTV_VERSION_CODE/) {
chomp($line);
$line =~ s@^#if\s*@@;
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh
index ea3e4defa..1a23e436d 100755
--- a/v4l/scripts/strip-trailing-whitespaces.sh
+++ b/v4l/scripts/strip-trailing-whitespaces.sh
@@ -10,21 +10,25 @@ for file in `find linux -type d | grep -v CVS | grep -v .cvsignore` ; do
done
for file in `find linux -type f | grep -v CVS | grep -v .cvsignore` ; do
tmpfile="$WORK/${file}.$$"
- perl -ne 's/[ \t]+$//;
+ perl -ne 's/[ \t]+$//;
s/^\ \ \ \ \ \ \ \ /\t/;
s/^\ \ \ \ \ \ \ \t/\t/;
s/^\ \ \ \ \ \ \t/\t/;
s/^\ \ \ \ \ \t/\t/;
s/^\ \ \ \t/\t/;
s/^\ \ \t/\t/;
- s/^\ \t/\t/;
- s/\t\ \ \ \ \ \ \ \ /\t\t/g;
- s/\t\ \ \ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \t/\t\t/g;
- s/\t\ \ \t/\t\t/g;
- s/\t\ \t/\t\t/g;
+ s/^\ \t/\t/;
+ $m=1;
+ while ($m>0) {
+ $m=0;
+ $m= s/\t\ \ \ \ \ \ \ \ /\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \t/\t\t/g;
+ $m=$m+s/\t\ \t/\t\t/g;
+ }
print' < "${file}" > "${tmpfile}"
diff -u "${file}" "${tmpfile}" | sed \
-e "s|^--- ${file}|--- ${file}.orig|" \