mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
This commit is contained in:
@@ -150,7 +150,8 @@ Getting the card going
|
||||
|
||||
The frontend module sp887x.o, requires an external firmware.
|
||||
Please use the command "get_dvb_firmware sp887x" to download
|
||||
it. Then copy it to /usr/lib/hotplug/firmware.
|
||||
it. Then copy it to /usr/lib/hotplug/firmware or /lib/firmware/
|
||||
(depending on configuration of firmware hotplug).
|
||||
|
||||
Receiving DVB-T in Australia
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use IO::Handle;
|
||||
|
||||
@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t",
|
||||
"dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
|
||||
"or51211", "or51132_qam", "or51132_vsb");
|
||||
"or51211", "or51132_qam", "or51132_vsb", "bluebird");
|
||||
|
||||
# Check args
|
||||
syntax() if (scalar(@ARGV) != 1);
|
||||
@@ -34,7 +34,11 @@ for ($i=0; $i < scalar(@components); $i++) {
|
||||
if ($cid eq $components[$i]) {
|
||||
$outfile = eval($cid);
|
||||
die $@ if $@;
|
||||
print STDERR "Firmware $outfile extracted successfully. Now copy it to either /lib/firmware or /usr/lib/hotplug/firmware/ (depending on your hotplug version).\n";
|
||||
print STDERR <<EOF;
|
||||
Firmware $outfile extracted successfully.
|
||||
Now copy it to either /usr/lib/hotplug/firmware or /lib/firmware
|
||||
(depending on configuration of firmware hotplug).
|
||||
EOF
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -243,7 +247,7 @@ sub nxt2002 {
|
||||
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
|
||||
|
||||
checkstandard();
|
||||
|
||||
|
||||
wgetfile($sourcefile, $url);
|
||||
unzip($sourcefile, $tmpdir);
|
||||
verify("$tmpdir/SkyNETU.sys", $hash);
|
||||
@@ -308,6 +312,19 @@ sub or51132_vsb {
|
||||
$fwfile;
|
||||
}
|
||||
|
||||
sub bluebird {
|
||||
my $url = "http://www.linuxtv.org/download/dvb/firmware/dvb-usb-bluebird-01.fw";
|
||||
my $outfile = "dvb-usb-bluebird-01.fw";
|
||||
my $hash = "658397cb9eba9101af9031302671f49d";
|
||||
|
||||
checkstandard();
|
||||
|
||||
wgetfile($outfile, $url);
|
||||
verify($outfile,$hash);
|
||||
|
||||
$outfile;
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Utilities
|
||||
|
||||
|
||||
@@ -41,4 +41,5 @@ Hotplug Firmware Loading for 2.6 kernels
|
||||
For 2.6 kernels the firmware is loaded at the point that the driver module is
|
||||
loaded. See linux/Documentation/dvb/firmware.txt for more information.
|
||||
|
||||
Copy the three files downloaded above into the /usr/lib/hotplug/firmware directory.
|
||||
Copy the three files downloaded above into the /usr/lib/hotplug/firmware or
|
||||
/lib/firmware directory (depending on configuration of firmware hotplug).
|
||||
|
||||
@@ -141,3 +141,4 @@
|
||||
140 -> Osprey 440 [0070:ff07]
|
||||
141 -> Asound Skyeye PCTV
|
||||
142 -> Sabrent TV-FM (bttv version)
|
||||
143 -> Hauppauge ImpactVCB (bt878) [0070:13eb]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
15 -> DViCO FusionHDTV DVB-T1 [18ac:db00]
|
||||
16 -> KWorld LTV883RF
|
||||
17 -> DViCO FusionHDTV 3 Gold-Q [18ac:d810]
|
||||
18 -> Hauppauge Nova-T DVB-T [0070:9002]
|
||||
18 -> Hauppauge Nova-T DVB-T [0070:9002,0070:9001]
|
||||
19 -> Conexant DVB-T reference design [14f1:0187]
|
||||
20 -> Provideo PV259 [1540:2580]
|
||||
21 -> DViCO FusionHDTV DVB-T Plus [18ac:db10]
|
||||
@@ -35,3 +35,11 @@
|
||||
34 -> ATI HDTV Wonder [1002:a101]
|
||||
35 -> WinFast DTV1000-T [107d:665f]
|
||||
36 -> AVerTV 303 (M126) [1461:000a]
|
||||
37 -> Hauppauge Nova-S-Plus DVB-S [0070:9201,0070:9202]
|
||||
38 -> Hauppauge Nova-SE2 DVB-S [0070:9200]
|
||||
39 -> KWorld DVB-S 100 [17de:08b2]
|
||||
40 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid [0070:9400,0070:9402]
|
||||
41 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile) [0070:9800,0070:9802]
|
||||
42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025]
|
||||
43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1]
|
||||
44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50]
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
55 -> LifeView FlyDVB-T DUO [5168:0502,5168:0306]
|
||||
56 -> Avermedia AVerTV 307 [1461:a70a]
|
||||
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
|
||||
58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370,1421:1370]
|
||||
58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0351,1421:0370,1421:1370]
|
||||
59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
|
||||
60 -> Typhoon DVB-T Duo Digital/Analog Cardbus [4e42:0502]
|
||||
61 -> Philips TOUGH DVB-T reference design [1131:2004]
|
||||
@@ -81,4 +81,5 @@
|
||||
80 -> ASUS Digimatrix TV [1043:0210]
|
||||
81 -> Philips Tiger reference design [1131:2018]
|
||||
82 -> MSI TV@Anywhere plus [1462:6231]
|
||||
|
||||
83 -> Terratec Cinergy 250 PCI TV [153b:1160]
|
||||
84 -> LifeView FlyDVB Trio [5168:0319]
|
||||
|
||||
@@ -40,7 +40,7 @@ tuner=38 - Philips PAL/SECAM multi (FM1216ME MK3)
|
||||
tuner=39 - LG NTSC (newer TAPC series)
|
||||
tuner=40 - HITACHI V7-J180AT
|
||||
tuner=41 - Philips PAL_MK (FI1216 MK)
|
||||
tuner=42 - Philips 1236D ATSC/NTSC daul in
|
||||
tuner=42 - Philips 1236D ATSC/NTSC dual in
|
||||
tuner=43 - Philips NTSC MK3 (FM1236MK3 or FM1236/F)
|
||||
tuner=44 - Philips 4 in 1 (ATI TV Wonder Pro/Conexant)
|
||||
tuner=45 - Microtune 4049 FM5
|
||||
@@ -50,7 +50,7 @@ tuner=48 - Tenna TNF 8831 BGFF)
|
||||
tuner=49 - Microtune 4042 FI5 ATSC/NTSC dual in
|
||||
tuner=50 - TCL 2002N
|
||||
tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3)
|
||||
tuner=52 - Thomson DDT 7610 (ATSC/NTSC)
|
||||
tuner=52 - Thomson DTT 7610 (ATSC/NTSC)
|
||||
tuner=53 - Philips FQ1286
|
||||
tuner=54 - tda8290+75
|
||||
tuner=55 - TCL 2002MB
|
||||
@@ -58,7 +58,7 @@ tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4)
|
||||
tuner=57 - Philips FQ1236A MK4
|
||||
tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF
|
||||
tuner=59 - Ymec TVision TVF-5533MF
|
||||
tuner=60 - Thomson DDT 7611 (ATSC/NTSC)
|
||||
tuner=60 - Thomson DTT 761X (ATSC/NTSC)
|
||||
tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF
|
||||
tuner=62 - Philips TEA5767HN FM Radio
|
||||
tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner
|
||||
|
||||
@@ -253,7 +253,10 @@ static int fops_open(struct inode *inode, struct file *file)
|
||||
|
||||
if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
|
||||
DEB_S(("initializing vbi...\n"));
|
||||
result = saa7146_vbi_uops.open(dev,file);
|
||||
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
result = saa7146_vbi_uops.open(dev,file);
|
||||
if (dev->ext_vv_data->vbi_fops.open)
|
||||
dev->ext_vv_data->vbi_fops.open(inode, file);
|
||||
} else {
|
||||
DEB_S(("initializing video...\n"));
|
||||
result = saa7146_video_uops.open(dev,file);
|
||||
@@ -289,7 +292,10 @@ static int fops_release(struct inode *inode, struct file *file)
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
|
||||
saa7146_vbi_uops.release(dev,file);
|
||||
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
saa7146_vbi_uops.release(dev,file);
|
||||
if (dev->ext_vv_data->vbi_fops.release)
|
||||
dev->ext_vv_data->vbi_fops.release(inode, file);
|
||||
} else {
|
||||
saa7146_video_uops.release(dev,file);
|
||||
}
|
||||
@@ -332,6 +338,7 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return videobuf_mmap_mapper(q,vma);
|
||||
}
|
||||
|
||||
@@ -381,7 +388,10 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
|
||||
}
|
||||
case V4L2_BUF_TYPE_VBI_CAPTURE: {
|
||||
// DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n", file, data, (unsigned long)count));
|
||||
return saa7146_vbi_uops.read(file,data,count,ppos);
|
||||
if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
return saa7146_vbi_uops.read(file,data,count,ppos);
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -390,12 +400,31 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t fops_write(struct file *file, const char __user *data, size_t count, loff_t *ppos)
|
||||
{
|
||||
struct saa7146_fh *fh = file->private_data;
|
||||
|
||||
switch (fh->type) {
|
||||
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
|
||||
return -EINVAL;
|
||||
case V4L2_BUF_TYPE_VBI_CAPTURE:
|
||||
if (fh->dev->ext_vv_data->vbi_fops.write)
|
||||
return fh->dev->ext_vv_data->vbi_fops.write(file, data, count, ppos);
|
||||
else
|
||||
return -EINVAL;
|
||||
default:
|
||||
BUG();
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
static struct file_operations video_fops =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = fops_open,
|
||||
.release = fops_release,
|
||||
.read = fops_read,
|
||||
.write = fops_write,
|
||||
.poll = fops_poll,
|
||||
.mmap = fops_mmap,
|
||||
.ioctl = fops_ioctl,
|
||||
@@ -467,7 +496,8 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||
memset(vv->d_clipping.cpu_addr, 0x0, SAA7146_CLIPPING_MEM);
|
||||
|
||||
saa7146_video_uops.init(dev,vv);
|
||||
saa7146_vbi_uops.init(dev,vv);
|
||||
if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
|
||||
saa7146_vbi_uops.init(dev,vv);
|
||||
|
||||
dev->vv_data = vv;
|
||||
dev->vv_callback = &vv_callback;
|
||||
|
||||
@@ -562,19 +562,26 @@ static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int
|
||||
|
||||
int b_depth = vv->ov_fmt->depth;
|
||||
int b_bpl = vv->ov_fb.fmt.bytesperline;
|
||||
u32 base = (u32)vv->ov_fb.base;
|
||||
/* The unsigned long cast is to remove a 64-bit compile warning since
|
||||
it looks like a 64-bit address is cast to a 32-bit value, even
|
||||
though the base pointer is really a 32-bit physical address that
|
||||
goes into a 32-bit DMA register.
|
||||
FIXME: might not work on some 64-bit platforms, but see the FIXME
|
||||
in struct v4l2_framebuffer (videodev2.h) for that.
|
||||
*/
|
||||
u32 base = (u32)(unsigned long)vv->ov_fb.base;
|
||||
|
||||
struct saa7146_video_dma vdma1;
|
||||
|
||||
/* calculate memory offsets for picture, look if we shall top-down-flip */
|
||||
vdma1.pitch = 2*b_bpl;
|
||||
if ( 0 == vv->vflip ) {
|
||||
vdma1.base_even = (u32)base + (w_y * (vdma1.pitch/2)) + (w_x * (b_depth / 8));
|
||||
vdma1.base_even = base + (w_y * (vdma1.pitch/2)) + (w_x * (b_depth / 8));
|
||||
vdma1.base_odd = vdma1.base_even + (vdma1.pitch / 2);
|
||||
vdma1.prot_addr = vdma1.base_even + (w_height * (vdma1.pitch / 2));
|
||||
}
|
||||
else {
|
||||
vdma1.base_even = (u32)base + ((w_y+w_height) * (vdma1.pitch/2)) + (w_x * (b_depth / 8));
|
||||
vdma1.base_even = base + ((w_y+w_height) * (vdma1.pitch/2)) + (w_x * (b_depth / 8));
|
||||
vdma1.base_odd = vdma1.base_even - (vdma1.pitch / 2);
|
||||
vdma1.prot_addr = vdma1.base_odd - (w_height * (vdma1.pitch / 2));
|
||||
}
|
||||
|
||||
@@ -500,9 +500,9 @@ static ssize_t vbi_read(struct file *file, char __user *data, size_t count, loff
|
||||
}
|
||||
|
||||
struct saa7146_use_ops saa7146_vbi_uops = {
|
||||
.init = vbi_init,
|
||||
.open = vbi_open,
|
||||
.init = vbi_init,
|
||||
.open = vbi_open,
|
||||
.release = vbi_close,
|
||||
.irq_done = vbi_irq_done,
|
||||
.read = vbi_read,
|
||||
.read = vbi_read,
|
||||
};
|
||||
|
||||
@@ -151,8 +151,8 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
|
||||
|
||||
if (V4L2_FIELD_ANY == field) {
|
||||
field = (win->w.height > maxh/2)
|
||||
? V4L2_FIELD_INTERLACED
|
||||
: V4L2_FIELD_TOP;
|
||||
? V4L2_FIELD_INTERLACED
|
||||
: V4L2_FIELD_TOP;
|
||||
}
|
||||
switch (field) {
|
||||
case V4L2_FIELD_TOP:
|
||||
@@ -1114,10 +1114,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
|
||||
return 0;
|
||||
}
|
||||
case VIDIOC_OVERLAY:
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
int on = *(int *)arg;
|
||||
int err = 0;
|
||||
@@ -1359,7 +1355,6 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
|
||||
saa7146_buffer_queue(fh->dev,&vv->video_q,buf);
|
||||
}
|
||||
|
||||
|
||||
static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
|
||||
{
|
||||
struct file *file = q->priv_data;
|
||||
|
||||
@@ -298,7 +298,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir
|
||||
}
|
||||
|
||||
static int lgdt3303_pll_set(struct dvb_frontend* fe,
|
||||
struct dvb_frontend_parameters* params)
|
||||
struct dvb_frontend_parameters* params)
|
||||
{
|
||||
struct flexcop_device *fc = fe->dvb->priv;
|
||||
u8 buf[4];
|
||||
@@ -485,12 +485,16 @@ static struct stv0297_config alps_tdee4_stv0297_config = {
|
||||
/* try to figure out the frontend, each card/box can have on of the following list */
|
||||
int flexcop_frontend_init(struct flexcop_device *fc)
|
||||
{
|
||||
struct dvb_frontend_ops *ops;
|
||||
|
||||
/* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
|
||||
if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) {
|
||||
fc->fe->ops->set_voltage = flexcop_set_voltage;
|
||||
ops = fc->fe->ops;
|
||||
|
||||
fc->fe_sleep = fc->fe->ops->sleep;
|
||||
fc->fe->ops->sleep = flexcop_sleep;
|
||||
ops->set_voltage = flexcop_set_voltage;
|
||||
|
||||
fc->fe_sleep = ops->sleep;
|
||||
ops->sleep = flexcop_sleep;
|
||||
|
||||
fc->dev_type = FC_SKY;
|
||||
info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address);
|
||||
@@ -522,15 +526,17 @@ int flexcop_frontend_init(struct flexcop_device *fc)
|
||||
} else
|
||||
/* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
|
||||
if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
|
||||
fc->fe->ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
|
||||
fc->fe->ops->diseqc_send_burst = flexcop_diseqc_send_burst;
|
||||
fc->fe->ops->set_tone = flexcop_set_tone;
|
||||
fc->fe->ops->set_voltage = flexcop_set_voltage;
|
||||
ops = fc->fe->ops;
|
||||
|
||||
fc->fe_sleep = fc->fe->ops->sleep;
|
||||
fc->fe->ops->sleep = flexcop_sleep;
|
||||
ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
|
||||
ops->diseqc_send_burst = flexcop_diseqc_send_burst;
|
||||
ops->set_tone = flexcop_set_tone;
|
||||
ops->set_voltage = flexcop_set_voltage;
|
||||
|
||||
fc->dev_type = FC_SKY_OLD;
|
||||
fc->fe_sleep = ops->sleep;
|
||||
ops->sleep = flexcop_sleep;
|
||||
|
||||
fc->dev_type = FC_SKY_OLD;
|
||||
info("found the vp310 (aka mt312) at i2c address: 0x%02x",skystar23_samsung_tbdu18132_config.demod_address);
|
||||
}
|
||||
|
||||
@@ -540,8 +546,9 @@ int flexcop_frontend_init(struct flexcop_device *fc)
|
||||
} else {
|
||||
if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) {
|
||||
err("frontend registration failed!");
|
||||
if (fc->fe->ops->release != NULL)
|
||||
fc->fe->ops->release(fc->fe);
|
||||
ops = fc->fe->ops;
|
||||
if (ops->release != NULL)
|
||||
ops->release(fc->fe);
|
||||
fc->fe = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -39,11 +39,13 @@ extern const char *flexcop_device_names[];
|
||||
/* FlexCop IBI Registers */
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#include "flexcop_ibi_value_le.h"
|
||||
#elif defined(__BIG_ENDIAN)
|
||||
#else
|
||||
#if defined(__BIG_ENDIAN)
|
||||
#include "flexcop_ibi_value_be.h"
|
||||
#else
|
||||
#error no endian defined
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define fc_data_Tag_ID_DVB 0x3e
|
||||
#define fc_data_Tag_ID_ATSC 0x3f
|
||||
|
||||
@@ -1341,30 +1341,40 @@ static int dst_read_snr(struct dvb_frontend *fe, u16 *snr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
|
||||
static int dst_set_frontend(struct dvb_frontend* fe,
|
||||
struct dvb_frontend_parameters* p,
|
||||
unsigned int mode_flags,
|
||||
int *delay,
|
||||
fe_status_t *status)
|
||||
{
|
||||
struct dst_state *state = fe->demodulator_priv;
|
||||
|
||||
dst_set_freq(state, p->frequency);
|
||||
dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
|
||||
if (p != NULL) {
|
||||
dst_set_freq(state, p->frequency);
|
||||
dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
|
||||
|
||||
if (state->dst_type == DST_TYPE_IS_SAT) {
|
||||
if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
|
||||
dst_set_inversion(state, p->inversion);
|
||||
dst_set_fec(state, p->u.qpsk.fec_inner);
|
||||
dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
|
||||
dst_set_polarization(state);
|
||||
dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
|
||||
if (state->dst_type == DST_TYPE_IS_SAT) {
|
||||
if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
|
||||
dst_set_inversion(state, p->inversion);
|
||||
dst_set_fec(state, p->u.qpsk.fec_inner);
|
||||
dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
|
||||
dst_set_polarization(state);
|
||||
dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
|
||||
|
||||
} else if (state->dst_type == DST_TYPE_IS_TERR)
|
||||
dst_set_bandwidth(state, p->u.ofdm.bandwidth);
|
||||
else if (state->dst_type == DST_TYPE_IS_CABLE) {
|
||||
dst_set_fec(state, p->u.qam.fec_inner);
|
||||
dst_set_symbolrate(state, p->u.qam.symbol_rate);
|
||||
dst_set_modulation(state, p->u.qam.modulation);
|
||||
} else if (state->dst_type == DST_TYPE_IS_TERR)
|
||||
dst_set_bandwidth(state, p->u.ofdm.bandwidth);
|
||||
else if (state->dst_type == DST_TYPE_IS_CABLE) {
|
||||
dst_set_fec(state, p->u.qam.fec_inner);
|
||||
dst_set_symbolrate(state, p->u.qam.symbol_rate);
|
||||
dst_set_modulation(state, p->u.qam.modulation);
|
||||
}
|
||||
dst_write_tuna(fe);
|
||||
}
|
||||
dst_write_tuna(fe);
|
||||
|
||||
if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
|
||||
dst_read_status(fe, status);
|
||||
|
||||
*delay = HZ/10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1445,7 +1455,7 @@ static struct dvb_frontend_ops dst_dvbt_ops = {
|
||||
|
||||
.release = dst_release,
|
||||
.init = dst_init,
|
||||
.set_frontend = dst_set_frontend,
|
||||
.tune = dst_set_frontend,
|
||||
.get_frontend = dst_get_frontend,
|
||||
.read_status = dst_read_status,
|
||||
.read_signal_strength = dst_read_signal_strength,
|
||||
@@ -1469,7 +1479,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = {
|
||||
|
||||
.release = dst_release,
|
||||
.init = dst_init,
|
||||
.set_frontend = dst_set_frontend,
|
||||
.tune = dst_set_frontend,
|
||||
.get_frontend = dst_get_frontend,
|
||||
.read_status = dst_read_status,
|
||||
.read_signal_strength = dst_read_signal_strength,
|
||||
@@ -1496,7 +1506,7 @@ static struct dvb_frontend_ops dst_dvbc_ops = {
|
||||
|
||||
.release = dst_release,
|
||||
.init = dst_init,
|
||||
.set_frontend = dst_set_frontend,
|
||||
.tune = dst_set_frontend,
|
||||
.get_frontend = dst_get_frontend,
|
||||
.read_status = dst_read_status,
|
||||
.read_signal_strength = dst_read_signal_strength,
|
||||
|
||||
@@ -283,16 +283,17 @@ static int handle_dst_tag(struct dst_state *state, struct ca_msg *p_ca_message,
|
||||
hw_buffer->msg[4] = 0x03;
|
||||
hw_buffer->msg[5] = length & 0xff;
|
||||
hw_buffer->msg[6] = 0x00;
|
||||
|
||||
/*
|
||||
* Need to compute length for EN50221 section 8.3.2, for the time being
|
||||
* assuming 8.3.2 is not applicable
|
||||
*/
|
||||
memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 length, u8 reply)
|
||||
{
|
||||
if ((dst_put_ci(state, hw_buffer->msg, length, hw_buffer->msg, reply)) < 0) {
|
||||
|
||||
@@ -600,7 +600,6 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
|
||||
struct dst_state* state = NULL;
|
||||
|
||||
switch(type) {
|
||||
#ifdef BTTV_BOARD_DVICO_DVBT_LITE
|
||||
case BTTV_BOARD_DVICO_DVBT_LITE:
|
||||
card->fe = mt352_attach(&thomson_dtt7579_config, card->i2c_adapter);
|
||||
if (card->fe != NULL) {
|
||||
@@ -608,22 +607,15 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
|
||||
card->fe->ops->info.frequency_max = 862000000;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
|
||||
case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
|
||||
lgdt330x_reset(card);
|
||||
card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter);
|
||||
if (card->fe != NULL)
|
||||
dprintk ("dvb_bt8xx: lgdt330x detected\n");
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef BTTV_BOARD_TWINHAN_VP3021
|
||||
case BTTV_BOARD_TWINHAN_VP3021:
|
||||
#else
|
||||
case BTTV_BOARD_NEBULA_DIGITV:
|
||||
#endif
|
||||
/*
|
||||
* It is possible to determine the correct frontend using the I2C bus (see the Nebula SDK);
|
||||
* this would be a cleaner solution than trying each frontend in turn.
|
||||
@@ -812,9 +804,7 @@ static int dvb_bt8xx_probe(struct device *dev)
|
||||
card->irq_err_ignore = 0;
|
||||
break;
|
||||
|
||||
#ifdef BTTV_BOARD_DVICO_DVBT_LITE
|
||||
case BTTV_BOARD_DVICO_DVBT_LITE:
|
||||
#endif
|
||||
card->gpio_mode = 0x0400C060;
|
||||
card->op_sync_orin = 0;
|
||||
card->irq_err_ignore = 0;
|
||||
@@ -823,19 +813,13 @@ static int dvb_bt8xx_probe(struct device *dev)
|
||||
* DA_APP(parallel) */
|
||||
break;
|
||||
|
||||
#ifdef BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
|
||||
case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
|
||||
#endif
|
||||
card->gpio_mode = 0x0400c060;
|
||||
card->op_sync_orin = BT878_RISC_SYNC_MASK;
|
||||
card->irq_err_ignore = BT878_AFBUS | BT878_AFDSR;
|
||||
break;
|
||||
|
||||
#ifdef BTTV_BOARD_TWINHAN_VP3021
|
||||
case BTTV_BOARD_TWINHAN_VP3021:
|
||||
#else
|
||||
case BTTV_BOARD_NEBULA_DIGITV:
|
||||
#endif
|
||||
case BTTV_BOARD_AVDVBT_761:
|
||||
card->gpio_mode = (1 << 26) | (1 << 14) | (1 << 5);
|
||||
card->op_sync_orin = 0;
|
||||
|
||||
@@ -21,35 +21,35 @@ config DVB_CINERGYT2_TUNING
|
||||
config DVB_CINERGYT2_STREAM_URB_COUNT
|
||||
int "Number of queued USB Request Blocks for Highspeed Stream Transfers"
|
||||
depends on DVB_CINERGYT2_TUNING
|
||||
default "32"
|
||||
default "32"
|
||||
help
|
||||
USB Request Blocks for Highspeed Stream transfers are scheduled in
|
||||
a queue for the Host Controller.
|
||||
|
||||
Usually the default value is a safe choice.
|
||||
|
||||
You may increase this number if you are using this device in a
|
||||
Server Environment with many high-traffic USB Highspeed devices
|
||||
You may increase this number if you are using this device in a
|
||||
Server Environment with many high-traffic USB Highspeed devices
|
||||
sharing the same USB bus.
|
||||
|
||||
|
||||
config DVB_CINERGYT2_STREAM_BUF_SIZE
|
||||
int "Size of URB Stream Buffers for Highspeed Transfers"
|
||||
depends on DVB_CINERGYT2_TUNING
|
||||
default "512"
|
||||
default "512"
|
||||
help
|
||||
Should be a multiple of native buffer size of 512 bytes.
|
||||
Default value is a safe choice.
|
||||
|
||||
You may increase this number if you are using this device in a
|
||||
Server Environment with many high-traffic USB Highspeed devices
|
||||
You may increase this number if you are using this device in a
|
||||
Server Environment with many high-traffic USB Highspeed devices
|
||||
sharing the same USB bus.
|
||||
|
||||
|
||||
config DVB_CINERGYT2_QUERY_INTERVAL
|
||||
int "Status update interval [milliseconds]"
|
||||
depends on DVB_CINERGYT2_TUNING
|
||||
default "250"
|
||||
default "250"
|
||||
help
|
||||
This is the interval for status readouts from the demodulator.
|
||||
You may try lower values if you need more responsive signal quality
|
||||
@@ -64,9 +64,9 @@ config DVB_CINERGYT2_QUERY_INTERVAL
|
||||
config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
|
||||
bool "Register the onboard IR Remote Control Receiver as Input Device"
|
||||
depends on DVB_CINERGYT2_TUNING
|
||||
default "yes"
|
||||
default "yes"
|
||||
help
|
||||
Enable this option if you want to use the onboard Infrared Remote
|
||||
Enable this option if you want to use the onboard Infrared Remote
|
||||
Control Receiver as Linux-Input device.
|
||||
|
||||
Right now only the keycode table for the default Remote Control
|
||||
@@ -77,7 +77,7 @@ config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
|
||||
config DVB_CINERGYT2_RC_QUERY_INTERVAL
|
||||
int "Infrared Remote Controller update interval [milliseconds]"
|
||||
depends on DVB_CINERGYT2_TUNING && DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE
|
||||
default "50"
|
||||
default "50"
|
||||
help
|
||||
If you have a very fast-repeating remote control you can try lower
|
||||
values, for normal consumer receivers the default value should be
|
||||
|
||||
@@ -131,6 +131,8 @@ struct cinergyt2 {
|
||||
|
||||
wait_queue_head_t poll_wq;
|
||||
int pending_fe_events;
|
||||
int disconnect_pending;
|
||||
atomic_t inuse;
|
||||
|
||||
void *streambuf;
|
||||
dma_addr_t streambuf_dmahandle;
|
||||
@@ -343,7 +345,7 @@ static int cinergyt2_start_feed(struct dvb_demux_feed *dvbdmxfeed)
|
||||
struct dvb_demux *demux = dvbdmxfeed->demux;
|
||||
struct cinergyt2 *cinergyt2 = demux->priv;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if (cinergyt2->streaming == 0)
|
||||
@@ -359,7 +361,7 @@ static int cinergyt2_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
|
||||
struct dvb_demux *demux = dvbdmxfeed->demux;
|
||||
struct cinergyt2 *cinergyt2 = demux->priv;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if (--cinergyt2->streaming == 0)
|
||||
@@ -479,23 +481,37 @@ static int cinergyt2_open (struct inode *inode, struct file *file)
|
||||
{
|
||||
struct dvb_device *dvbdev = file->private_data;
|
||||
struct cinergyt2 *cinergyt2 = dvbdev->priv;
|
||||
int err;
|
||||
int err = -ERESTARTSYS;
|
||||
|
||||
if ((err = dvb_generic_open(inode, file)))
|
||||
return err;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if ((err = dvb_generic_open(inode, file))) {
|
||||
up(&cinergyt2->sem);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
|
||||
cinergyt2_sleep(cinergyt2, 0);
|
||||
schedule_delayed_work(&cinergyt2->query_work, HZ/2);
|
||||
}
|
||||
|
||||
atomic_inc(&cinergyt2->inuse);
|
||||
|
||||
up(&cinergyt2->sem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cinergyt2_unregister(struct cinergyt2 *cinergyt2)
|
||||
{
|
||||
dvb_unregister_device(cinergyt2->fedev);
|
||||
dvb_unregister_adapter(&cinergyt2->adapter);
|
||||
|
||||
cinergyt2_free_stream_urbs(cinergyt2);
|
||||
kfree(cinergyt2);
|
||||
}
|
||||
|
||||
static int cinergyt2_release (struct inode *inode, struct file *file)
|
||||
{
|
||||
struct dvb_device *dvbdev = file->private_data;
|
||||
@@ -504,7 +520,7 @@ static int cinergyt2_release (struct inode *inode, struct file *file)
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
|
||||
if (!cinergyt2->disconnect_pending && (file->f_flags & O_ACCMODE) != O_RDONLY) {
|
||||
cancel_delayed_work(&cinergyt2->query_work);
|
||||
flush_scheduled_work();
|
||||
cinergyt2_sleep(cinergyt2, 1);
|
||||
@@ -512,6 +528,11 @@ static int cinergyt2_release (struct inode *inode, struct file *file)
|
||||
|
||||
up(&cinergyt2->sem);
|
||||
|
||||
if (atomic_dec_and_test(&cinergyt2->inuse) && cinergyt2->disconnect_pending) {
|
||||
warn("delayed unregister in release");
|
||||
cinergyt2_unregister(cinergyt2);
|
||||
}
|
||||
|
||||
return dvb_generic_release(inode, file);
|
||||
}
|
||||
|
||||
@@ -519,7 +540,14 @@ static unsigned int cinergyt2_poll (struct file *file, struct poll_table_struct
|
||||
{
|
||||
struct dvb_device *dvbdev = file->private_data;
|
||||
struct cinergyt2 *cinergyt2 = dvbdev->priv;
|
||||
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
poll_wait(file, &cinergyt2->poll_wq, wait);
|
||||
|
||||
up(&cinergyt2->sem);
|
||||
|
||||
return (POLLIN | POLLRDNORM | POLLPRI);
|
||||
}
|
||||
|
||||
@@ -564,10 +592,15 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
|
||||
(__u16 __user *) arg);
|
||||
|
||||
case FE_READ_UNCORRECTED_BLOCKS:
|
||||
/* UNC are already converted to host byte order... */
|
||||
return put_user(stat->uncorrected_block_count,
|
||||
(__u32 __user *) arg);
|
||||
{
|
||||
uint32_t unc_count;
|
||||
|
||||
unc_count = stat->uncorrected_block_count;
|
||||
stat->uncorrected_block_count = 0;
|
||||
|
||||
/* UNC are already converted to host byte order... */
|
||||
return put_user(unc_count,(__u32 __user *) arg);
|
||||
}
|
||||
case FE_SET_FRONTEND:
|
||||
{
|
||||
struct dvbt_set_parameters_msg *param = &cinergyt2->param;
|
||||
@@ -580,7 +613,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
|
||||
if (copy_from_user(&p, (void __user*) arg, sizeof(p)))
|
||||
return -EFAULT;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
param->cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
|
||||
@@ -691,7 +724,7 @@ static void cinergyt2_query_rc (void *data)
|
||||
struct cinergyt2_rc_event rc_events[12];
|
||||
int n, len, i;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return;
|
||||
|
||||
len = cinergyt2_command(cinergyt2, buf, sizeof(buf),
|
||||
@@ -786,7 +819,6 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
|
||||
static void cinergyt2_unregister_rc(struct cinergyt2 *cinergyt2)
|
||||
{
|
||||
cancel_delayed_work(&cinergyt2->rc_query_work);
|
||||
flush_scheduled_work();
|
||||
input_unregister_device(cinergyt2->rc_input_dev);
|
||||
}
|
||||
|
||||
@@ -817,7 +849,7 @@ static void cinergyt2_query (void *data)
|
||||
uint8_t lock_bits;
|
||||
uint32_t unc;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return;
|
||||
|
||||
unc = s->uncorrected_block_count;
|
||||
@@ -917,28 +949,25 @@ static void cinergyt2_disconnect (struct usb_interface *intf)
|
||||
{
|
||||
struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf);
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
return;
|
||||
flush_scheduled_work();
|
||||
|
||||
cinergyt2_unregister_rc(cinergyt2);
|
||||
|
||||
cinergyt2->demux.dmx.close(&cinergyt2->demux.dmx);
|
||||
dvb_net_release(&cinergyt2->dvbnet);
|
||||
dvb_dmxdev_release(&cinergyt2->dmxdev);
|
||||
dvb_dmx_release(&cinergyt2->demux);
|
||||
dvb_unregister_device(cinergyt2->fedev);
|
||||
dvb_unregister_adapter(&cinergyt2->adapter);
|
||||
cancel_delayed_work(&cinergyt2->query_work);
|
||||
wake_up_interruptible(&cinergyt2->poll_wq);
|
||||
|
||||
cinergyt2_free_stream_urbs(cinergyt2);
|
||||
up(&cinergyt2->sem);
|
||||
kfree(cinergyt2);
|
||||
cinergyt2->demux.dmx.close(&cinergyt2->demux.dmx);
|
||||
cinergyt2->disconnect_pending = 1;
|
||||
|
||||
if (!atomic_read(&cinergyt2->inuse))
|
||||
cinergyt2_unregister(cinergyt2);
|
||||
}
|
||||
|
||||
static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state)
|
||||
{
|
||||
struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf);
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if (state.event > PM_EVENT_ON) {
|
||||
@@ -961,7 +990,7 @@ static int cinergyt2_resume (struct usb_interface *intf)
|
||||
struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf);
|
||||
struct dvbt_set_parameters_msg *param = &cinergyt2->param;
|
||||
|
||||
if (down_interruptible(&cinergyt2->sem))
|
||||
if (cinergyt2->disconnect_pending || down_interruptible(&cinergyt2->sem))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
if (!cinergyt2->sleeping) {
|
||||
@@ -1014,4 +1043,3 @@ module_exit (cinergyt2_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Holger Waechtler, Daniel Mack");
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ config DVB_CORE
|
||||
help
|
||||
DVB core utility functions for device handling, software fallbacks etc.
|
||||
Say Y when you have a DVB card and want to use it. Say Y if your want
|
||||
to build your drivers outside the kernel, but need the DVB core. All
|
||||
to build your drivers outside the kernel, but need the DVB core. All
|
||||
in-kernel drivers will select this automatically if needed.
|
||||
If unsure say N.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \
|
||||
dvb_ca_en50221.o dvb_frontend.o \
|
||||
dvb_ca_en50221.o dvb_frontend.o \
|
||||
dvb_net.o dvb_ringbuffer.o
|
||||
|
||||
obj-$(CONFIG_DVB_CORE) += dvb-core.o
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user