本文整理汇总了C++中dvb_dmxdev_release函数的典型用法代码示例。如果您正苦于以下问题:C++ dvb_dmxdev_release函数的具体用法?C++ dvb_dmxdev_release怎么用?C++ dvb_dmxdev_release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dvb_dmxdev_release函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: StmUnloadModule
static void __exit StmUnloadModule (void)
{
int i;
BackendDelete ();
for (i = 0; i < DVB_MAX_DEVICES_PER_ADAPTER; i++)
{
struct DeviceContext_s* DeviceContext = &DvbContext->DeviceContext[i];
struct dvb_demux* DvbDemux = &DeviceContext->DvbDemux;
struct dmxdev* DmxDevice = &DeviceContext->DmxDevice;
#if defined (USE_KERNEL_DEMUX)
if (DmxDevice != NULL)
{
/* We don't need to unregister DmxDevice->dvr_dvbdev as this will be done by dvb_dmxdev_release */
dvb_dmxdev_release (DmxDevice);
}
if (DvbDemux != NULL)
{
DvbDemux->dmx.remove_frontend (&DvbDemux->dmx, &DeviceContext->MemoryFrontend);
dvb_dmx_release (DvbDemux);
}
#else
dvb_unregister_device (DeviceContext->DemuxDevice);
dvb_unregister_device (DeviceContext->DvrDevice);
#endif
if (DeviceContext->AudioDevice != NULL)
dvb_unregister_device (DeviceContext->AudioDevice);
if (DeviceContext->VideoDevice != NULL)
dvb_unregister_device (DeviceContext->VideoDevice);
PlaybackDelete (DeviceContext->Playback);
DeviceContext->AudioStream = NULL;
DeviceContext->VideoStream = NULL;
DeviceContext->Playback = NULL;
kfree(DeviceContext->dvr_in);
kfree(DeviceContext->dvr_out);
}
if (DvbContext != NULL)
{
dvb_unregister_adapter (&DvbContext->DvbAdapter);
kfree (DvbContext);
}
DvbContext = NULL;
DVB_DEBUG("STM stream device unloaded\n");
return;
}
开发者ID:MarkusVolk,项目名称:martii-tdt,代码行数:52,代码来源:dvb_module.c
示例2: smsdvb_unregister_client
static void smsdvb_unregister_client(struct smsdvb_client_t *client)
{
/* must be called under clientslock */
list_del(&client->entry);
smscore_unregister_client(client->smsclient);
dvb_unregister_frontend(&client->frontend);
dvb_dmxdev_release(&client->dmxdev);
dvb_dmx_release(&client->demux);
dvb_unregister_adapter(&client->adapter);
kfree(client);
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:13,代码来源:smsdvb.c
示例3: dvb_usb_adapter_dvb_exit
int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap)
{
if (adap->state & DVB_USB_ADAP_STATE_DVB) {
deb_info("unregistering DVB part\n");
dvb_net_release(&adap->dvb_net);
adap->demux.dmx.close(&adap->demux.dmx);
dvb_dmxdev_release(&adap->dmxdev);
dvb_dmx_release(&adap->demux);
dvb_unregister_adapter(&adap->dvb_adap);
adap->state &= ~DVB_USB_ADAP_STATE_DVB;
}
return 0;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:13,代码来源:dvb-usb-dvb.c
示例4: as102_dvb_unregister
void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{
/* unregister as102 frontend */
as102_dvb_unregister_fe(&as102_dev->dvb_fe);
/* unregister demux device */
dvb_dmxdev_release(&as102_dev->dvb_dmxdev);
dvb_dmx_release(&as102_dev->dvb_dmx);
/* unregister dvb adapter */
dvb_unregister_adapter(&as102_dev->dvb_adap);
pr_info("Unregistered device %s", as102_dev->name);
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:14,代码来源:as102_drv.c
示例5: pd_dvb_usb_device_exit
void pd_dvb_usb_device_exit(struct poseidon *pd)
{
struct pd_dvb_adapter *pd_dvb = &pd->dvb_data;
while (atomic_read(&pd_dvb->users) != 0
|| atomic_read(&pd_dvb->active_feed) != 0) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ);
}
dvb_dmxdev_release(&pd_dvb->dmxdev);
dvb_unregister_frontend(&pd_dvb->dvb_fe);
dvb_unregister_adapter(&pd_dvb->dvb_adap);
pd_dvb_usb_device_cleanup(pd);
}
开发者ID:1703011,项目名称:asuswrt-merlin,代码行数:14,代码来源:pd-dvb.c
示例6: budget_unregister
static void budget_unregister(struct budget *budget)
{
struct dvb_demux *dvbdemux = &budget->demux;
dprintk(2, "budget: %p\n", budget);
dvb_net_release(&budget->dvb_net);
dvbdemux->dmx.close(&dvbdemux->dmx);
dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &budget->hw_frontend);
dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &budget->mem_frontend);
dvb_dmxdev_release(&budget->dmxdev);
dvb_dmx_release(&budget->demux);
}
开发者ID:03199618,项目名称:linux,代码行数:15,代码来源:budget-core.c
示例7: em28xx_unregister_dvb
static void em28xx_unregister_dvb(struct em28xx_dvb *dvb)
{
dvb_net_release(&dvb->net);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
dvb_dmxdev_release(&dvb->dmxdev);
dvb_dmx_release(&dvb->demux);
if (dvb->fe[1])
dvb_unregister_frontend(dvb->fe[1]);
dvb_unregister_frontend(dvb->fe[0]);
if (dvb->fe[1] && !dvb->dont_attach_fe1)
dvb_frontend_detach(dvb->fe[1]);
dvb_frontend_detach(dvb->fe[0]);
dvb_unregister_adapter(&dvb->adapter);
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:15,代码来源:em28xx-dvb.c
示例8: dvb_usbv2_adapter_dvb_exit
static int dvb_usbv2_adapter_dvb_exit(struct dvb_usb_adapter *adap)
{
dev_dbg(&adap_to_d(adap)->udev->dev, "%s: adap=%d\n", __func__,
adap->id);
if (adap->dvb_adap.priv) {
dvb_net_release(&adap->dvb_net);
adap->demux.dmx.close(&adap->demux.dmx);
dvb_dmxdev_release(&adap->dmxdev);
dvb_dmx_release(&adap->demux);
dvb_unregister_adapter(&adap->dvb_adap);
}
return 0;
}
开发者ID:adbensi,项目名称:kernel-odroidc-3.10.80-rt102,代码行数:15,代码来源:dvb_usb_core.c
示例9: as102_dvb_unregister
void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{
ENTER();
/* unregister as102 frontend */
as102_dvb_unregister_fe(&as102_dev->dvb_fe);
/* unregister demux device */
dvb_dmxdev_release(&as102_dev->dvb_dmxdev);
dvb_dmx_release(&as102_dev->dvb_dmx);
/* unregister dvb adapter */
dvb_unregister_adapter(&as102_dev->dvb_adap);
LEAVE();
}
开发者ID:Raxone,项目名称:STB8000_TDT_SH4,代码行数:15,代码来源:as102_drv.c
示例10: flexcop_dvb_exit
static void flexcop_dvb_exit(struct flexcop_device *fc)
{
if (fc->init_state & FC_STATE_DVB_INIT) {
dvb_net_release(&fc->dvbnet);
fc->demux.dmx.close(&fc->demux.dmx);
fc->demux.dmx.remove_frontend(&fc->demux.dmx,&fc->mem_frontend);
fc->demux.dmx.remove_frontend(&fc->demux.dmx,&fc->hw_frontend);
dvb_dmxdev_release(&fc->dmxdev);
dvb_dmx_release(&fc->demux);
dvb_unregister_adapter(&fc->dvb_adapter);
deb_info("deinitialized dvb stuff\n");
}
fc->init_state &= ~FC_STATE_DVB_INIT;
}
开发者ID:274914765,项目名称:C,代码行数:16,代码来源:flexcop.c
示例11: au0828_dvb_unregister
void au0828_dvb_unregister(struct au0828_dev *dev)
{
struct au0828_dvb *dvb = &dev->dvb;
dprintk(1, "%s()\n", __func__);
if (dvb->frontend == NULL)
return;
dvb_net_release(&dvb->net);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
dvb_dmxdev_release(&dvb->dmxdev);
dvb_dmx_release(&dvb->demux);
dvb_unregister_frontend(dvb->frontend);
dvb_frontend_detach(dvb->frontend);
dvb_unregister_adapter(&dvb->adapter);
}
开发者ID:AllenDou,项目名称:linux,代码行数:18,代码来源:au0828-dvb.c
示例12: vtunerc_exit
static void __exit vtunerc_exit(void)
{
struct dvb_demux *dvbdemux;
struct dmx_demux *dmx;
int idx;
vtunerc_unregister_ctrldev(&config);
for (idx = 0; idx < config.devices; idx++) {
struct vtunerc_ctx *ctx = vtunerc_tbl[idx];
if(!ctx)
continue;
vtunerc_tbl[idx] = NULL;
#ifdef CONFIG_PROC_FS
remove_proc_entry(ctx->procname, NULL);
kfree(ctx->procname);
#endif
vtunerc_frontend_clear(ctx);
dvbdemux = &ctx->demux;
dmx = &dvbdemux->dmx;
dmx->disconnect_frontend(dmx);
dmx->remove_frontend(dmx, &ctx->mem_frontend);
dmx->remove_frontend(dmx, &ctx->hw_frontend);
dvb_dmxdev_release(&ctx->dmxdev);
dvb_dmx_release(dvbdemux);
dvb_unregister_adapter(&ctx->dvb_adapter);
// free allocated buffer
if(ctx->kernel_buf != NULL) {
kfree(ctx->kernel_buf);
printk(KERN_INFO "vtunerc%d: deallocated buffer of %Zu bytes\n", idx, ctx->kernel_buf_size);
ctx->kernel_buf = NULL;
ctx->kernel_buf_size = 0;
}
kfree(ctx);
}
printk(KERN_NOTICE "vtunerc: unloaded successfully\n");
}
开发者ID:spali,项目名称:vtuner.linux-driver,代码行数:44,代码来源:vtunerc_main.c
示例13: cx18_dvb_unregister
void cx18_dvb_unregister(struct cx18_stream *stream)
{
struct cx18 *cx = stream->cx;
struct cx18_dvb *dvb = &stream->dvb;
struct dvb_adapter *dvb_adapter;
struct dvb_demux *dvbdemux;
struct dmx_demux *dmx;
CX18_INFO("unregister DVB\n");
dvb_adapter = &dvb->dvb_adapter;
dvbdemux = &dvb->demux;
dmx = &dvbdemux->dmx;
dmx->close(dmx);
dvb_net_release(&dvb->dvbnet);
dmx->remove_frontend(dmx, &dvb->mem_frontend);
dmx->remove_frontend(dmx, &dvb->hw_frontend);
dvb_dmxdev_release(&dvb->dmxdev);
dvb_dmx_release(dvbdemux);
dvb_unregister_frontend(dvb->fe);
dvb_frontend_detach(dvb->fe);
dvb_unregister_adapter(dvb_adapter);
}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:24,代码来源:cx18-dvb.c
示例14: as102_dvb_register
int as102_dvb_register(struct as102_dev_t *as102_dev)
{
struct device *dev = &as102_dev->bus_adap.usb_dev->dev;
int ret;
ret = dvb_register_adapter(&as102_dev->dvb_adap,
as102_dev->name, THIS_MODULE,
dev, adapter_nr);
if (ret < 0) {
dev_err(dev, "%s: dvb_register_adapter() failed: %d\n",
__func__, ret);
return ret;
}
as102_dev->dvb_dmx.priv = as102_dev;
as102_dev->dvb_dmx.filternum = pid_filtering ? 16 : 256;
as102_dev->dvb_dmx.feednum = 256;
as102_dev->dvb_dmx.start_feed = as102_dvb_dmx_start_feed;
as102_dev->dvb_dmx.stop_feed = as102_dvb_dmx_stop_feed;
as102_dev->dvb_dmx.dmx.capabilities = DMX_TS_FILTERING |
DMX_SECTION_FILTERING;
as102_dev->dvb_dmxdev.filternum = as102_dev->dvb_dmx.filternum;
as102_dev->dvb_dmxdev.demux = &as102_dev->dvb_dmx.dmx;
as102_dev->dvb_dmxdev.capabilities = 0;
ret = dvb_dmx_init(&as102_dev->dvb_dmx);
if (ret < 0) {
dev_err(dev, "%s: dvb_dmx_init() failed: %d\n", __func__, ret);
goto edmxinit;
}
ret = dvb_dmxdev_init(&as102_dev->dvb_dmxdev, &as102_dev->dvb_adap);
if (ret < 0) {
dev_err(dev, "%s: dvb_dmxdev_init() failed: %d\n",
__func__, ret);
goto edmxdinit;
}
ret = as102_dvb_register_fe(as102_dev, &as102_dev->dvb_fe);
if (ret < 0) {
dev_err(dev, "%s: as102_dvb_register_frontend() failed: %d",
__func__, ret);
goto efereg;
}
/* init bus mutex for token locking */
mutex_init(&as102_dev->bus_adap.lock);
/* init start / stop stream mutex */
mutex_init(&as102_dev->sem);
/*
* try to load as102 firmware. If firmware upload failed, we'll be
* able to upload it later.
*/
if (fw_upload)
try_then_request_module(as102_fw_upload(&as102_dev->bus_adap),
"firmware_class");
pr_info("Registered device %s", as102_dev->name);
return 0;
efereg:
dvb_dmxdev_release(&as102_dev->dvb_dmxdev);
edmxdinit:
dvb_dmx_release(&as102_dev->dvb_dmx);
edmxinit:
dvb_unregister_adapter(&as102_dev->dvb_adap);
return ret;
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:72,代码来源:as102_drv.c
示例15: dvb_usbv2_adapter_dvb_init
static int dvb_usbv2_adapter_dvb_init(struct dvb_usb_adapter *adap)
{
int ret;
struct dvb_usb_device *d = adap_to_d(adap);
dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id);
ret = dvb_register_adapter(&adap->dvb_adap, d->name, d->props->owner,
&d->udev->dev, d->props->adapter_nr);
if (ret < 0) {
dev_dbg(&d->udev->dev, "%s: dvb_register_adapter() failed=%d\n",
__func__, ret);
goto err_dvb_register_adapter;
}
adap->dvb_adap.priv = adap;
if (d->props->read_mac_address) {
ret = d->props->read_mac_address(adap,
adap->dvb_adap.proposed_mac);
if (ret < 0)
goto err_dvb_dmx_init;
dev_info(&d->udev->dev, "%s: MAC address: %pM\n",
KBUILD_MODNAME, adap->dvb_adap.proposed_mac);
}
adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING;
adap->demux.priv = adap;
adap->demux.filternum = 0;
adap->demux.filternum = adap->max_feed_count;
adap->demux.feednum = adap->demux.filternum;
adap->demux.start_feed = dvb_usb_start_feed;
adap->demux.stop_feed = dvb_usb_stop_feed;
adap->demux.write_to_decoder = NULL;
ret = dvb_dmx_init(&adap->demux);
if (ret < 0) {
dev_err(&d->udev->dev, "%s: dvb_dmx_init() failed=%d\n",
KBUILD_MODNAME, ret);
goto err_dvb_dmx_init;
}
adap->dmxdev.filternum = adap->demux.filternum;
adap->dmxdev.demux = &adap->demux.dmx;
adap->dmxdev.capabilities = 0;
ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap);
if (ret < 0) {
dev_err(&d->udev->dev, "%s: dvb_dmxdev_init() failed=%d\n",
KBUILD_MODNAME, ret);
goto err_dvb_dmxdev_init;
}
ret = dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx);
if (ret < 0) {
dev_err(&d->udev->dev, "%s: dvb_net_init() failed=%d\n",
KBUILD_MODNAME, ret);
goto err_dvb_net_init;
}
return 0;
err_dvb_net_init:
dvb_dmxdev_release(&adap->dmxdev);
err_dvb_dmxdev_init:
dvb_dmx_release(&adap->demux);
err_dvb_dmx_init:
dvb_unregister_adapter(&adap->dvb_adap);
err_dvb_register_adapter:
adap->dvb_adap.priv = NULL;
return ret;
}
开发者ID:adbensi,项目名称:kernel-odroidc-3.10.80-rt102,代码行数:69,代码来源:dvb_usb_core.c
示例16: saa716x_dvb_init
//.........这里部分代码省略.........
saa716x_adap->demux.filternum = 256;
saa716x_adap->demux.feednum = 256;
saa716x_adap->demux.start_feed = saa716x_dvb_start_feed;
saa716x_adap->demux.stop_feed = saa716x_dvb_stop_feed;
saa716x_adap->demux.write_to_decoder = NULL;
dprintk(SAA716x_DEBUG, 1, "dvb_dmx_init");
if ((result = dvb_dmx_init(&saa716x_adap->demux)) < 0) {
dprintk(SAA716x_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result);
goto err0;
}
saa716x_adap->dmxdev.filternum = 256;
saa716x_adap->dmxdev.demux = &saa716x_adap->demux.dmx;
saa716x_adap->dmxdev.capabilities = 0;
dprintk(SAA716x_DEBUG, 1, "dvb_dmxdev_init");
if ((result = dvb_dmxdev_init(&saa716x_adap->dmxdev,
&saa716x_adap->dvb_adapter)) < 0) {
dprintk(SAA716x_ERROR, 1, "dvb_dmxdev_init failed, ERROR=%d", result);
goto err1;
}
saa716x_adap->fe_hw.source = DMX_FRONTEND_0;
if ((result = saa716x_adap->demux.dmx.add_frontend(&saa716x_adap->demux.dmx,
&saa716x_adap->fe_hw)) < 0) {
dprintk(SAA716x_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result);
goto err2;
}
saa716x_adap->fe_mem.source = DMX_MEMORY_FE;
if ((result = saa716x_adap->demux.dmx.add_frontend(&saa716x_adap->demux.dmx,
&saa716x_adap->fe_mem)) < 0) {
dprintk(SAA716x_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result);
goto err3;
}
if ((result = saa716x_adap->demux.dmx.connect_frontend(&saa716x_adap->demux.dmx,
&saa716x_adap->fe_hw)) < 0) {
dprintk(SAA716x_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result);
goto err4;
}
dvb_net_init(&saa716x_adap->dvb_adapter, &saa716x_adap->dvb_net, &saa716x_adap->demux.dmx);
// tasklet_init(&saa716x_adap->tasklet, saa716x_dma_xfer, (unsigned long) saa716x);
dprintk(SAA716x_DEBUG, 1, "Frontend Init");
saa716x_adap->saa716x = saa716x;
if (config->frontend_attach) {
result = config->frontend_attach(saa716x_adap, i);
if (result < 0)
dprintk(SAA716x_ERROR, 1, "SAA716x frontend attach failed");
if (saa716x_adap->fe == NULL) {
dprintk(SAA716x_ERROR, 1, "A frontend driver was not found for [%04x:%04x] subsystem [%04x:%04x]\n",
saa716x->pdev->vendor,
saa716x->pdev->device,
saa716x->pdev->subsystem_vendor,
saa716x->pdev->subsystem_device);
} else {
result = dvb_register_frontend(&saa716x_adap->dvb_adapter, saa716x_adap->fe);
if (result < 0) {
dprintk(SAA716x_ERROR, 1, "SAA716x register frontend failed");
goto err6;
}
}
} else {
dprintk(SAA716x_ERROR, 1, "Frontend attach = NULL");
}
saa716x_fgpi_init(saa716x, config->adap_config[i].ts_port);
saa716x_adap++;
}
return 0;
/* Error conditions */
err6:
dvb_frontend_detach(saa716x_adap->fe);
err4:
saa716x_adap->demux.dmx.remove_frontend(&saa716x_adap->demux.dmx, &saa716x_adap->fe_mem);
err3:
saa716x_adap->demux.dmx.remove_frontend(&saa716x_adap->demux.dmx, &saa716x_adap->fe_hw);
err2:
dvb_dmxdev_release(&saa716x_adap->dmxdev);
err1:
dvb_dmx_release(&saa716x_adap->demux);
err0:
dvb_unregister_adapter(&saa716x_adap->dvb_adapter);
return result;
}
开发者ID:mona66,项目名称:sifbox-beta4,代码行数:101,代码来源:saa716x_adap.c
示例17: em28xx_register_dvb
//.........这里部分代码省略.........
/* Ensure all frontends negotiate bus access */
dvb->fe[0]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
if (dvb->fe[1])
dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
dvb->adapter.priv = &dev->i2c_bus[dev->def_i2c_bus];
/* register frontend */
result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]);
if (result < 0) {
printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n",
dev->name, result);
goto fail_frontend0;
}
/* register 2nd frontend */
if (dvb->fe[1]) {
result = dvb_register_frontend(&dvb->adapter, dvb->fe[1]);
if (result < 0) {
printk(KERN_WARNING "%s: 2nd dvb_register_frontend failed (errno = %d)\n",
dev->name, result);
goto fail_frontend1;
}
}
/* register demux stuff */
dvb->demux.dmx.capabilities =
DMX_TS_FILTERING | DMX_SECTION_FILTERING |
DMX_MEMORY_BASED_FILTERING;
dvb->demux.priv = dvb;
dvb->demux.filternum = 256;
dvb->demux.feednum = 256;
dvb->demux.start_feed = em28xx_start_feed;
dvb->demux.stop_feed = em28xx_stop_feed;
result = dvb_dmx_init(&dvb->demux);
if (result < 0) {
printk(KERN_WARNING "%s: dvb_dmx_init failed (errno = %d)\n",
dev->name, result);
goto fail_dmx;
}
dvb->dmxdev.filternum = 256;
dvb->dmxdev.demux = &dvb->demux.dmx;
dvb->dmxdev.capabilities = 0;
result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter);
if (result < 0) {
printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n",
dev->name, result);
goto fail_dmxdev;
}
dvb->fe_hw.source = DMX_FRONTEND_0;
result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw);
if (result < 0) {
printk(KERN_WARNING "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n",
dev->name, result);
goto fail_fe_hw;
}
dvb->fe_mem.source = DMX_MEMORY_FE;
result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem);
if (result < 0) {
printk(KERN_WARNING "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n",
dev->name, result);
goto fail_fe_mem;
}
result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw);
if (result < 0) {
printk(KERN_WARNING "%s: connect_frontend failed (errno = %d)\n",
dev->name, result);
goto fail_fe_conn;
}
/* register network adapter */
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
return 0;
fail_fe_conn:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
fail_fe_mem:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
fail_fe_hw:
dvb_dmxdev_release(&dvb->dmxdev);
fail_dmxdev:
dvb_dmx_release(&dvb->demux);
fail_dmx:
if (dvb->fe[1])
dvb_unregister_frontend(dvb->fe[1]);
dvb_unregister_frontend(dvb->fe[0]);
fail_frontend1:
if (dvb->fe[1])
dvb_frontend_detach(dvb->fe[1]);
fail_frontend0:
dvb_frontend_detach(dvb->fe[0]);
dvb_unregister_adapter(&dvb->adapter);
fail_adapter:
return result;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:101,代码来源:em28xx-dvb.c
示例18: cx18_dvb_register
int cx18_dvb_register(struct cx18_stream *stream)
{
struct cx18 *cx = stream->cx;
struct cx18_dvb *dvb = stream->dvb;
struct dvb_adapter *dvb_adapter;
struct dvb_demux *dvbdemux;
struct dmx_demux *dmx;
int ret;
if (!dvb)
return -EINVAL;
dvb->enabled = 0;
dvb->stream = stream;
ret = dvb_register_adapter(&dvb->dvb_adapter,
CX18_DRIVER_NAME,
THIS_MODULE, &cx->pci_dev->dev, adapter_nr);
if (ret < 0)
goto err_out;
dvb_adapter = &dvb->dvb_adapter;
dvbdemux = &dvb->demux;
dvbdemux->priv = (void *)stream;
dvbdemux->filternum = 256;
dvbdemux->feednum = 256;
dvbdemux->start_feed = cx18_dvb_start_feed;
dvbdemux->stop_feed = cx18_dvb_stop_feed;
dvbdemux->dmx.capabilities = (DMX_TS_FILTERING |
DMX_SECTION_FILTERING | DMX_MEMORY_BASED_FILTERING);
ret = dvb_dmx_init(dvbdemux);
if (ret < 0)
goto err_dvb_unregister_adapter;
dmx = &dvbdemux->dmx;
dvb->hw_frontend.source = DMX_FRONTEND_0;
dvb->mem_frontend.source = DMX_MEMORY_FE;
dvb->dmxdev.filternum = 256;
dvb->dmxdev.demux = dmx;
ret = dvb_dmxdev_init(&dvb->dmxdev, dvb_adapter);
if (ret < 0)
goto err_dvb_dmx_release;
ret = dmx->add_frontend(dmx, &dvb->hw_frontend);
if (ret < 0)
goto err_dvb_dmxdev_release;
ret = dmx->add_frontend(dmx, &dvb->mem_frontend);
if (ret < 0)
goto err_remove_hw_frontend;
ret = dmx->connect_frontend(dmx, &dvb->hw_frontend);
if (ret < 0)
goto err_remove_mem_frontend;
ret = dvb_register(stream);
if (ret < 0)
goto err_disconnect_frontend;
dvb_net_init(dvb_adapter, &dvb->dvbnet, dmx);
CX18_INFO("DVB Frontend registered\n");
CX18_INFO("Registered DVB adapter%d for %s (%d x %d.%02d kB)\n",
stream->dvb->dvb_adapter.num, stream->name,
stream->buffers, stream->buf_size/1024,
(stream->buf_size * 100 / 1024) % 100);
mutex_init(&dvb->feedlock);
dvb->enabled = 1;
return ret;
err_disconnect_frontend:
dmx->disconnect_frontend(dmx);
err_remove_mem_frontend:
dmx->remove_frontend(dmx, &dvb->mem_frontend);
err_remove_hw_frontend:
dmx->remove_frontend(dmx, &dvb->hw_frontend);
err_dvb_dmxdev_release:
dvb_dmxdev_release(&dvb->dmxdev);
err_dvb_dmx_release:
dvb_dmx_release(dvbdemux);
err_dvb_unregister_adapter:
dvb_unregister_adapter(dvb_adapter);
err_out:
return ret;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:91,代码来源:cx18-dvb.c
示例19: flexcop_dvb_init
static int flexcop_dvb_init(struct flexcop_device *fc)
{
int ret = dvb_register_adapter(&fc->dvb_adapter,
"FlexCop Digital TV device", fc->owner,
fc->dev, adapter_nr);
if (ret < 0) {
err("error registering DVB adapter");
return ret;
}
fc->dvb_adapter.priv = fc;
fc->demux.dmx.capabilities = (DMX_TS_FILTERING | DMX_SECTION_FILTERING
| DMX_MEMORY_BASED_FILTERING);
fc->demux.priv = fc;
fc->demux.filternum = fc->demux.feednum = FC_MAX_FEED;
fc->demux.start_feed = flexcop_dvb_start_feed;
fc->demux.stop_feed = flexcop_dvb_stop_feed;
fc->demux.write_to_decoder = NULL;
ret = dvb_dmx_init(&fc->demux);
if (ret < 0) {
err("dvb_dmx failed: error %d", ret);
goto err_dmx;
}
fc->hw_frontend.source = DMX_FRONTEND_0;
fc->dmxdev.filternum = fc->demux.feednum;
fc->dmxdev.demux = &fc->demux.dmx;
fc->dmxdev.capabilities = 0;
ret = dvb_dmxdev_init(&fc->dmxdev, &fc->dvb_adapter);
if (ret < 0) {
err("dvb_dmxdev_init failed: error %d", ret);
goto err_dmx_dev;
}
ret = fc->demux.dmx.add_frontend(&fc->demux.dmx, &fc->hw_frontend);
if (ret < 0) {
err("adding hw_frontend to dmx failed: error %d", ret);
goto err_dmx_add_hw_frontend;
}
fc->mem_frontend.source = DMX_MEMORY_FE;
ret = fc->demux.dmx.add_frontend(&fc->demux.dmx, &fc->mem_frontend);
if (ret < 0) {
err("adding mem_frontend to dmx failed: error %d", ret);
goto err_dmx_add_mem_frontend;
}
ret = fc->demux.dmx.connect_frontend(&fc->demux.dmx, &fc->hw_frontend);
if (ret < 0) {
err("connect frontend failed: error %d", ret);
goto err_connect_frontend;
}
ret = dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx);
if (ret < 0) {
err("dvb_net_init failed: error %d", ret);
goto err_net;
}
fc->init_state |= FC_STATE_DVB_INIT;
return 0;
err_net:
fc->demux.dmx.disconnect_frontend(&fc->demux.dmx);
err_connect_frontend:
fc->demux.dmx.remove_frontend(&fc->demux.dmx, &fc->mem_frontend);
err_dmx_add_mem_frontend:
fc->demux.dmx.remove_frontend(&fc->demux.dmx, &fc->hw_frontend);
err_dmx_add_hw_frontend:
dvb_dmxdev_release(&fc->dmxdev);
err_dmx_dev:
dvb_dmx_release(&fc->demux);
err_dmx:
dvb_unregister_adapter(&fc->dvb_adapter);
return ret;
}
开发者ID:forgivemyheart,项目名称:linux,代码行数:78,代码来源:flexcop.c
示例20: fdtv_dvb_register
int fdtv_dvb_register(struct firedtv *fdtv, const char *name)
{
int err;
err = dvb_register_adapter(&fdtv->adapter, name,
THIS_MODULE, fdtv->device, adapter_nr);
if (err < 0)
goto fail_log;
/*DMX_TS_FILTERING | DMX_SECTION_FILTERING*/
fdtv->demux.dmx.capabilities = 0;
fdtv->demux.priv = fdtv;
fdtv->demux.filternum = 16;
fdtv->demux.feednum = 16;
fdtv->demux.start_feed = fdtv_start_feed;
fdtv->demux.stop_feed = fdtv_stop_feed;
fdtv->demux.write_to_decoder = NULL;
err = dvb_dmx_init(&fdtv->demux);
if (err)
goto fail_unreg_adapter;
fdtv->dmxdev.filternum = 16;
fdtv->dmxdev.demux = &fdtv->demux.dmx;
fdtv->dmxdev.capabilities = 0;
err = dvb_dmxdev_init(&fdtv->dmxdev, &fdtv->adapter);
if (err)
goto fail_dmx_release;
fdtv->frontend.source = DMX_FRONTEND_0;
err = fdtv->demux.dmx.add_frontend(&fdtv->demux.dmx, &fdtv->frontend);
if (err)
goto fail_dmxdev_release;
err = fdtv->demux.dmx.connect_frontend(&fdtv->demux.dmx,
&fdtv->frontend);
if (err)
goto fail_rem_frontend;
err = dvb_net_init(&fdtv->adapter, &fdtv->dvbnet, &fdtv->demux.dmx);
if (err)
goto fail_disconnect_frontend;
fdtv_frontend_init(fdtv, name);
err = dvb_register_frontend(&fdtv->adapter, &fdtv->fe);
if (err)
goto fail_net_release;
err = fdtv_ca_register(fdtv);
if (err)
dev_info(fdtv->device,
"Conditional Access Module not enabled\n");
return 0;
fail_net_release:
dvb_net_release(&fdtv->dvbnet);
fail_disconnect_frontend:
fdtv->demux.dmx.close(&fdtv->demux.dmx);
fail_rem_frontend:
fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx, &fdtv->frontend);
fail_dmxdev_release:
dvb_dmxdev_release(&fdtv->dmxdev);
fail_dmx_release:
dvb_dmx_release(&fdtv->demux);
fail_unreg_adapter:
dvb_unregister_adapter(&fdtv->adapter);
fail_log:
dev_err(fdtv->device, "DVB initialization failed\n");
return err;
}
开发者ID:020gzh,项目名称:linux,代码行数:73,代码来源:firedtv-dvb.c
注:本文中的dvb_dmxdev_release函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论