Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Jan 12, 2006
2 parents 983d5db + f9cfc08 commit 593195f
Show file tree
Hide file tree
Showing 108 changed files with 1,608 additions and 1,299 deletions.
1 change: 1 addition & 0 deletions Documentation/video4linux/CARDLIST.bttv
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,4 @@
141 -> Asound Skyeye PCTV
142 -> Sabrent TV-FM (bttv version)
143 -> Hauppauge ImpactVCB (bt878) [0070:13eb]
144 -> MagicTV
2 changes: 1 addition & 1 deletion Documentation/video4linux/CARDLIST.cx88
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
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]
21 -> DViCO FusionHDTV DVB-T Plus [18ac:db10,18ac:db11]
22 -> pcHDTV HD3000 HDTV [7063:3000]
23 -> digitalnow DNTV Live! DVB-T [17de:a8a6]
24 -> Hauppauge WinTV 28xxx (Roslyn) models [0070:2801]
Expand Down
9 changes: 3 additions & 6 deletions drivers/media/common/saa7146_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,9 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
struct page *pg;
int i;

sglist = kmalloc(sizeof(struct scatterlist)*nr_pages, GFP_KERNEL);
sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL);
if (NULL == sglist)
return NULL;
memset(sglist,0,sizeof(struct scatterlist)*nr_pages);
for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) {
pg = vmalloc_to_page(virt);
if (NULL == pg)
Expand Down Expand Up @@ -306,15 +305,13 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
struct saa7146_dev *dev;
int err = -ENOMEM;

dev = kmalloc(sizeof(struct saa7146_dev), GFP_KERNEL);
/* clear out mem for sure */
dev = kzalloc(sizeof(struct saa7146_dev), GFP_KERNEL);
if (!dev) {
ERR(("out of memory.\n"));
goto out;
}

/* clear out mem for sure */
memset(dev, 0x0, sizeof(struct saa7146_dev));

DEB_EE(("pci:%p\n",pci));

err = pci_enable_device(pci);
Expand Down
6 changes: 2 additions & 4 deletions drivers/media/common/saa7146_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,12 @@ static int fops_open(struct inode *inode, struct file *file)
}

/* allocate per open data */
fh = kmalloc(sizeof(*fh),GFP_KERNEL);
fh = kzalloc(sizeof(*fh),GFP_KERNEL);
if (NULL == fh) {
DEB_S(("cannot allocate memory for per open data.\n"));
result = -ENOMEM;
goto out;
}
memset(fh,0,sizeof(*fh));

file->private_data = fh;
fh->dev = dev;
Expand Down Expand Up @@ -464,12 +463,11 @@ static struct video_device device_template =

int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
{
struct saa7146_vv *vv = kmalloc (sizeof(struct saa7146_vv),GFP_KERNEL);
struct saa7146_vv *vv = kzalloc (sizeof(struct saa7146_vv),GFP_KERNEL);
if( NULL == vv ) {
ERR(("out of memory. aborting.\n"));
return -1;
}
memset(vv, 0x0, sizeof(*vv));

DEB_EE(("dev:%p\n",dev));

Expand Down
6 changes: 2 additions & 4 deletions drivers/media/dvb/b2c2/flexcop.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,18 @@ EXPORT_SYMBOL(flexcop_reset_block_300);
struct flexcop_device *flexcop_device_kmalloc(size_t bus_specific_len)
{
void *bus;
struct flexcop_device *fc = kmalloc(sizeof(struct flexcop_device), GFP_KERNEL);
struct flexcop_device *fc = kzalloc(sizeof(struct flexcop_device), GFP_KERNEL);
if (!fc) {
err("no memory");
return NULL;
}
memset(fc, 0, sizeof(struct flexcop_device));

bus = kmalloc(bus_specific_len, GFP_KERNEL);
bus = kzalloc(bus_specific_len, GFP_KERNEL);
if (!bus) {
err("no memory");
kfree(fc);
return NULL;
}
memset(bus, 0, bus_specific_len);

fc->bus_specific = bus;

Expand Down
3 changes: 1 addition & 2 deletions drivers/media/dvb/bt8xx/dvb-bt8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,9 @@ static int dvb_bt8xx_probe(struct device *dev)
struct pci_dev* bttv_pci_dev;
int ret;

if (!(card = kmalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL)))
if (!(card = kzalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL)))
return -ENOMEM;

memset(card, 0, sizeof(*card));
init_MUTEX(&card->lock);
card->bttv_nr = sub->core->nr;
strncpy(card->card_name, sub->core->name, sizeof(sub->core->name));
Expand Down
8 changes: 2 additions & 6 deletions drivers/media/dvb/dvb-core/dvb_ca_en50221.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,21 +1649,17 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
return -EINVAL;

/* initialise the system data */
if ((ca =
(struct dvb_ca_private *) kmalloc(sizeof(struct dvb_ca_private),
GFP_KERNEL)) == NULL) {
if ((ca = kzalloc(sizeof(struct dvb_ca_private), GFP_KERNEL)) == NULL) {
ret = -ENOMEM;
goto error;
}
memset(ca, 0, sizeof(struct dvb_ca_private));
ca->pub = pubca;
ca->flags = flags;
ca->slot_count = slot_count;
if ((ca->slot_info = kmalloc(sizeof(struct dvb_ca_slot) * slot_count, GFP_KERNEL)) == NULL) {
if ((ca->slot_info = kcalloc(slot_count, sizeof(struct dvb_ca_slot), GFP_KERNEL)) == NULL) {
ret = -ENOMEM;
goto error;
}
memset(ca->slot_info, 0, sizeof(struct dvb_ca_slot) * slot_count);
init_waitqueue_head(&ca->wait_queue);
ca->thread_pid = 0;
init_waitqueue_head(&ca->thread_queue);
Expand Down
3 changes: 1 addition & 2 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,13 +1024,12 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
if (down_interruptible (&frontend_mutex))
return -ERESTARTSYS;

fe->frontend_priv = kmalloc(sizeof(struct dvb_frontend_private), GFP_KERNEL);
fe->frontend_priv = kzalloc(sizeof(struct dvb_frontend_private), GFP_KERNEL);
if (fe->frontend_priv == NULL) {
up(&frontend_mutex);
return -ENOMEM;
}
fepriv = fe->frontend_priv;
memset(fe->frontend_priv, 0, sizeof(struct dvb_frontend_private));

init_MUTEX (&fepriv->sem);
init_waitqueue_head (&fepriv->wait_queue);
Expand Down
152 changes: 150 additions & 2 deletions drivers/media/dvb/dvb-usb/cxusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,26 @@ static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
return 0;
}

static int cxusb_mt352_demod_init(struct dvb_frontend* fe)
{ /* used in both lgz201 and th7579 */
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 };
static u8 reset [] = { RESET, 0x80 };
static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 };
static u8 gpp_ctl_cfg [] = { GPP_CTL, 0x33 };
static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 };

mt352_write(fe, clock_config, sizeof(clock_config));
udelay(200);
mt352_write(fe, reset, sizeof(reset));
mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));

mt352_write(fe, agc_cfg, sizeof(agc_cfg));
mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg));
mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));
return 0;
}

struct cx22702_config cxusb_cx22702_config = {
.demod_address = 0x63,

Expand All @@ -274,6 +294,13 @@ struct mt352_config cxusb_dee1601_config = {
.pll_set = dvb_usb_pll_set,
};

struct mt352_config cxusb_mt352_config = {
/* used in both lgz201 and th7579 */
.demod_address = 0x0f,
.demod_init = cxusb_mt352_demod_init,
.pll_set = dvb_usb_pll_set,
};

/* Callbacks for DVB USB */
static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d)
{
Expand Down Expand Up @@ -302,6 +329,20 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d)
return 0;
}

static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d)
{
d->pll_addr = 0x61;
d->pll_desc = &dvb_pll_lg_z201;
return 0;
}

static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d)
{
d->pll_addr = 0x60;
d->pll_desc = &dvb_pll_thomson_dtt7579;
return 0;
}

static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d)
{
u8 b;
Expand Down Expand Up @@ -329,6 +370,19 @@ static int cxusb_lgdt330x_frontend_attach(struct dvb_usb_device *d)
return -EIO;
}

static int cxusb_mt352_frontend_attach(struct dvb_usb_device *d)
{ /* used in both lgz201 and th7579 */
if (usb_set_interface(d->udev,0,0) < 0)
err("set interface failed");

cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);

if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL)
return 0;

return -EIO;
}

static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d)
{
if (usb_set_interface(d->udev,0,0) < 0)
Expand Down Expand Up @@ -370,13 +424,17 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, const
static struct dvb_usb_properties cxusb_medion_properties;
static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties;
static struct dvb_usb_properties cxusb_bluebird_dee1601_properties;
static struct dvb_usb_properties cxusb_bluebird_lgz201_properties;
static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties;

static int cxusb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
if (dvb_usb_device_init(intf,&cxusb_medion_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_lgh064f_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0) {
dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0) {
return 0;
}

Expand All @@ -389,6 +447,12 @@ static struct usb_device_id cxusb_table [] = {
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LG064F_WARM) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DEE1601_COLD) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DEE1601_WARM) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LGZ201_COLD) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LGZ201_WARM) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_TH7579_COLD) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_TH7579_WARM) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DEE1601_COLD) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DEE1601_WARM) },
{} /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, cxusb_table);
Expand Down Expand Up @@ -505,12 +569,96 @@ static struct dvb_usb_properties cxusb_bluebird_dee1601_properties = {
}
},

.num_device_descs = 1,
.num_device_descs = 2,
.devices = {
{ "DViCO FusionHDTV DVB-T Dual USB",
{ &cxusb_table[3], NULL },
{ &cxusb_table[4], NULL },
},
{ "DigitalNow DVB-T Dual USB",
{ &cxusb_table[9], NULL },
{ &cxusb_table[10], NULL },
},
}
};

static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,

.usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-bluebird-01.fw",
.download_firmware = bluebird_patch_dvico_firmware_download,
/* use usb alt setting 0 for EP4 transfer (dvb-t),
use usb alt setting 7 for EP2 transfer (atsc) */

.size_of_priv = sizeof(struct cxusb_state),

.streaming_ctrl = cxusb_streaming_ctrl,
.power_ctrl = cxusb_power_ctrl,
.frontend_attach = cxusb_mt352_frontend_attach,
.tuner_attach = cxusb_lgz201_tuner_attach,

.i2c_algo = &cxusb_i2c_algo,

.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
.type = DVB_USB_BULK,
.count = 5,
.endpoint = 0x04,
.u = {
.bulk = {
.buffersize = 8192,
}
}
},

.num_device_descs = 1,
.devices = {
{ "DViCO FusionHDTV DVB-T USB (LGZ201)",
{ &cxusb_table[5], NULL },
{ &cxusb_table[6], NULL },
},
}
};

static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,

.usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-bluebird-01.fw",
.download_firmware = bluebird_patch_dvico_firmware_download,
/* use usb alt setting 0 for EP4 transfer (dvb-t),
use usb alt setting 7 for EP2 transfer (atsc) */

.size_of_priv = sizeof(struct cxusb_state),

.streaming_ctrl = cxusb_streaming_ctrl,
.power_ctrl = cxusb_power_ctrl,
.frontend_attach = cxusb_mt352_frontend_attach,
.tuner_attach = cxusb_dtt7579_tuner_attach,

.i2c_algo = &cxusb_i2c_algo,

.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
.type = DVB_USB_BULK,
.count = 5,
.endpoint = 0x04,
.u = {
.bulk = {
.buffersize = 8192,
}
}
},

.num_device_descs = 1,
.devices = {
{ "DViCO FusionHDTV DVB-T USB (TH7579)",
{ &cxusb_table[7], NULL },
{ &cxusb_table[8], NULL },
},
}
};

Expand Down
3 changes: 1 addition & 2 deletions drivers/media/dvb/dvb-usb/dtt200u-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,9 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
struct dtt200u_fe_state* state = NULL;

/* allocate memory for the internal state */
state = (struct dtt200u_fe_state*) kmalloc(sizeof(struct dtt200u_fe_state), GFP_KERNEL);
state = kzalloc(sizeof(struct dtt200u_fe_state), GFP_KERNEL);
if (state == NULL)
goto error;
memset(state,0,sizeof(struct dtt200u_fe_state));

deb_info("attaching frontend dtt200u\n");

Expand Down
2 changes: 2 additions & 0 deletions drivers/media/dvb/dvb-usb/dvb-usb-ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
#define USB_PID_DVICO_BLUEBIRD_TH7579_WARM 0xdb11
#define USB_PID_DVICO_BLUEBIRD_DEE1601_COLD 0xdb50
#define USB_PID_DVICO_BLUEBIRD_DEE1601_WARM 0xdb51
#define USB_PID_DIGITALNOW_BLUEBIRD_DEE1601_COLD 0xdb54
#define USB_PID_DIGITALNOW_BLUEBIRD_DEE1601_WARM 0xdb55
#define USB_PID_MEDION_MD95700 0x0932
#define USB_PID_KYE_DVB_T_COLD 0x701e
#define USB_PID_KYE_DVB_T_WARM 0x701f
Expand Down
Loading

0 comments on commit 593195f

Please sign in to comment.