本文整理汇总了C++中dvb_frontend_detach函数的典型用法代码示例。如果您正苦于以下问题:C++ dvb_frontend_detach函数的具体用法?C++ dvb_frontend_detach怎么用?C++ dvb_frontend_detach使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dvb_frontend_detach函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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
示例2: dvb_usbv2_adapter_frontend_exit
static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap)
{
int ret, i;
struct dvb_usb_device *d = adap_to_d(adap);
dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id);
for (i = MAX_NO_OF_FE_PER_ADAP - 1; i >= 0; i--) {
if (adap->fe[i]) {
dvb_unregister_frontend(adap->fe[i]);
dvb_frontend_detach(adap->fe[i]);
}
}
if (d->props->tuner_detach) {
ret = d->props->tuner_detach(adap);
if (ret < 0) {
dev_dbg(&d->udev->dev, "%s: tuner_detach() failed=%d\n",
__func__, ret);
}
}
if (d->props->frontend_detach) {
ret = d->props->frontend_detach(adap);
if (ret < 0) {
dev_dbg(&d->udev->dev,
"%s: frontend_detach() failed=%d\n",
__func__, ret);
}
}
return 0;
}
开发者ID:adbensi,项目名称:kernel-odroidc-3.10.80-rt102,代码行数:33,代码来源:dvb_usb_core.c
示例3: attach_xc3028
static int attach_xc3028(u8 addr, struct em28xx *dev)
{
struct dvb_frontend *fe;
struct xc2028_config cfg;
memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_adap;
cfg.i2c_addr = addr;
cfg.callback = em28xx_tuner_callback;
if (!dev->dvb->frontend) {
printk(KERN_ERR "%s/2: dvb frontend not attached. "
"Can't attach xc3028\n",
dev->name);
return -EINVAL;
}
fe = dvb_attach(xc2028_attach, dev->dvb->frontend, &cfg);
if (!fe) {
printk(KERN_ERR "%s/2: xc3028 attach failed\n",
dev->name);
dvb_frontend_detach(dev->dvb->frontend);
dev->dvb->frontend = NULL;
return -EINVAL;
}
printk(KERN_INFO "%s/2: xc3028 attached\n", dev->name);
return 0;
}
开发者ID:sserg31,项目名称:sca3_main,代码行数:30,代码来源:em28xx-dvb.c
示例4: saa716x_dvb_exit
void __devexit saa716x_dvb_exit(struct saa716x_dev *saa716x)
{
struct saa716x_adapter *saa716x_adap = saa716x->saa716x_adap;
int i;
for (i = 0; i < saa716x->config->adapters; i++) {
saa716x_fgpi_exit(saa716x, saa716x->config->adap_config[i].ts_port);
if (saa716x_adap->fe) {
dvb_unregister_frontend(saa716x_adap->fe);
dvb_frontend_detach(saa716x_adap->fe);
}
// tasklet_kill(&saa716x->tasklet);
dvb_net_release(&saa716x_adap->dvb_net);
saa716x_adap->demux.dmx.remove_frontend(&saa716x_adap->demux.dmx, &saa716x_adap->fe_mem);
saa716x_adap->demux.dmx.remove_frontend(&saa716x_adap->demux.dmx, &saa716x_adap->fe_hw);
dvb_dmxdev_release(&saa716x_adap->dmxdev);
dvb_dmx_release(&saa716x_adap->demux);
dprintk(SAA716x_DEBUG, 1, "dvb_unregister_adapter");
dvb_unregister_adapter(&saa716x_adap->dvb_adapter);
saa716x_adap++;
}
return;
}
开发者ID:mona66,项目名称:sifbox-beta4,代码行数:29,代码来源:saa716x_adap.c
示例5: attach_xc5000
/* ------------------------------------------------------------------ */
#if 0 /* Keep */
static int attach_xc5000(u8 addr, struct cx231xx *dev)
{
struct dvb_frontend *fe;
struct xc5000_config cfg;
memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_bus[1].i2c_adap;
cfg.i2c_addr = addr;
if (!dev->dvb->frontend) {
printk(KERN_ERR "%s/2: dvb frontend not attached. "
"Can't attach xc5000\n", dev->name);
return -EINVAL;
}
fe = dvb_attach(xc5000_attach, dev->dvb->frontend, &cfg);
if (!fe) {
printk(KERN_ERR "%s/2: xc5000 attach failed\n", dev->name);
dvb_frontend_detach(dev->dvb->frontend);
dev->dvb->frontend = NULL;
return -EINVAL;
}
printk(KERN_INFO "%s/2: xc5000 attached\n", dev->name);
return 0;
}
开发者ID:OpenStbV4l-dvb,项目名称:v4l-dvb,代码行数:30,代码来源:cx231xx-dvb.c
示例6: em28xx_attach_xc3028
static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
{
struct dvb_frontend *fe;
struct xc2028_config cfg;
struct xc2028_ctrl ctl;
memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_adap[dev->def_i2c_bus];
cfg.i2c_addr = addr;
memset(&ctl, 0, sizeof(ctl));
em28xx_setup_xc3028(dev, &ctl);
cfg.ctrl = &ctl;
if (!dev->dvb->fe[0]) {
em28xx_errdev("/2: dvb frontend not attached. "
"Can't attach xc3028\n");
return -EINVAL;
}
fe = dvb_attach(xc2028_attach, dev->dvb->fe[0], &cfg);
if (!fe) {
em28xx_errdev("/2: xc3028 attach failed\n");
dvb_frontend_detach(dev->dvb->fe[0]);
dev->dvb->fe[0] = NULL;
return -EINVAL;
}
em28xx_info("%s/2: xc3028 attached\n", dev->name);
return 0;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:32,代码来源:em28xx-dvb.c
示例7: mantis_dvb_exit
int __devexit mantis_dvb_exit(struct mantis_pci *mantis)
{
int err;
if (mantis->fe) {
/* */
err = mantis_frontend_shutdown(mantis);
if (err != 0)
dprintk(MANTIS_ERROR, 1, "Frontend exit while POWER ON! <%d>", err);
dvb_unregister_frontend(mantis->fe);
dvb_frontend_detach(mantis->fe);
}
tasklet_kill(&mantis->tasklet);
dvb_net_release(&mantis->dvbnet);
mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_hw);
dvb_dmxdev_release(&mantis->dmxdev);
dvb_dmx_release(&mantis->demux);
dprintk(MANTIS_DEBUG, 1, "dvb_unregister_adapter");
dvb_unregister_adapter(&mantis->dvb_adapter);
return 0;
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:27,代码来源:mantis_dvb.c
示例8: 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");
if (dvb == NULL || !dvb->enabled)
return;
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:AshishNamdev,项目名称:linux,代码行数:27,代码来源:cx18-dvb.c
示例9: pvr2_dvb_frontend_init
static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap)
{
struct pvr2_hdw *hdw = adap->channel.hdw;
const struct pvr2_dvb_props *dvb_props = hdw->hdw_desc->dvb_props;
int ret = 0;
if (dvb_props == NULL) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, "fe_props not defined!");
return -EINVAL;
}
ret = pvr2_channel_limit_inputs(
&adap->channel,
(1 << PVR2_CVAL_INPUT_DTV));
if (ret) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"failed to grab control of dtv input (code=%d)",
ret);
return ret;
}
if (dvb_props->frontend_attach == NULL) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"frontend_attach not defined!");
ret = -EINVAL;
goto done;
}
if ((dvb_props->frontend_attach(adap) == 0) && (adap->fe)) {
if (dvb_register_frontend(&adap->dvb_adap, adap->fe)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"frontend registration failed!");
dvb_frontend_detach(adap->fe);
adap->fe = NULL;
ret = -ENODEV;
goto done;
}
if (dvb_props->tuner_attach)
dvb_props->tuner_attach(adap);
if (adap->fe->ops.analog_ops.standby)
adap->fe->ops.analog_ops.standby(adap->fe);
/* */
adap->fe->ops.ts_bus_ctrl = pvr2_dvb_bus_ctrl;
} else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"no frontend was attached!");
ret = -ENODEV;
return ret;
}
done:
pvr2_channel_limit_inputs(&adap->channel, 0);
return ret;
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:59,代码来源:pvrusb2-dvb.c
示例10: frontend_init
static struct dvb_frontend * frontend_init(struct core_config *cfg, int i)
{
struct tuner_devctl *ctl = NULL;
struct dvb_frontend *frontend = NULL;
printk (KERN_INFO "%s >\n", __FUNCTION__);
#if defined(UFS912) || defined(HS7810A) || defined(HS7110) || defined(WHITEBOX) || defined(SPARK)
frontend = stv090x_attach(&tt1600_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_0, STV090x_TUNER1);
#else
if (i== 0)
frontend = stv090x_attach(&tt1600_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_0, STV090x_TUNER1);
else
/* Dagobert commented: is this correct? second tuner uses demod0 ??? */
frontend = stv090x_attach(&tt1600_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_0, STV090x_TUNER2);
#endif
if (frontend) {
printk("%s: attached\n", __FUNCTION__);
switch (tunerType) {
#if !defined(FORTIS_HDBOX)
case SHARP7306:
ctl = dvb_attach(ix7306_attach, frontend, &bs2s7hz7306a_config, cfg->i2c_adap);
break;
#endif
case STV6110X:
default:
ctl = dvb_attach(stv6110x_attach, frontend, &stv6110x_config, cfg->i2c_adap);
}
if(ctl) {
printk("%s: %s attached\n", __FUNCTION__, tuner);
tt1600_stv090x_config.tuner_init = ctl->tuner_init;
tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode;
tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency;
tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency;
tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth;
tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth;
tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain;
tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain;
tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk;
tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status;
} else {
printk (KERN_INFO "%s: error attaching %s\n", __FUNCTION__, tuner);
goto error_out;
}
} else {
printk (KERN_INFO "%s: error attaching\n", __FUNCTION__);
goto error_out;
}
return frontend;
error_out:
printk("core: Frontend registration failed!\n");
if (frontend)
dvb_frontend_detach(frontend);
return NULL;
}
开发者ID:EbertLiao,项目名称:STLinux.BSP-Duckbox,代码行数:59,代码来源:core.c
示例11: pvr2_dvb_frontend_exit
static int pvr2_dvb_frontend_exit(struct pvr2_dvb_adapter *adap)
{
if (adap->fe != NULL) {
dvb_unregister_frontend(adap->fe);
dvb_frontend_detach(adap->fe);
}
return 0;
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:8,代码来源:pvrusb2-dvb.c
示例12: as102_dvb_unregister_fe
int as102_dvb_unregister_fe(struct dvb_frontend *fe)
{
dvb_unregister_frontend(fe);
dvb_frontend_detach(fe);
return 0;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:10,代码来源:as102_fe.c
示例13: as102_dvb_unregister_fe
int as102_dvb_unregister_fe(struct dvb_frontend *fe)
{
/* unregister frontend */
dvb_unregister_frontend(fe);
/* detach frontend */
dvb_frontend_detach(fe);
return 0;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:10,代码来源:as102_fe.c
示例14: dvb_usb_adapter_frontend_init
int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap)
{
int ret, i;
/* register all given adapter frontends */
for (i = 0; i < adap->props.num_frontends; i++) {
if (adap->props.fe[i].frontend_attach == NULL) {
err("strange: '%s' #%d,%d "
"doesn't want to attach a frontend.",
adap->dev->desc->name, adap->id, i);
return 0;
}
ret = adap->props.fe[i].frontend_attach(adap);
if (ret || adap->fe_adap[i].fe == NULL) {
/* only print error when there is no FE at all */
if (i == 0)
err("no frontend was attached by '%s'",
adap->dev->desc->name);
return 0;
}
adap->fe_adap[i].fe->id = i;
/* re-assign sleep and wakeup functions */
adap->fe_adap[i].fe_init = adap->fe_adap[i].fe->ops.init;
adap->fe_adap[i].fe->ops.init = dvb_usb_fe_wakeup;
adap->fe_adap[i].fe_sleep = adap->fe_adap[i].fe->ops.sleep;
adap->fe_adap[i].fe->ops.sleep = dvb_usb_fe_sleep;
if (dvb_register_frontend(&adap->dvb_adap, adap->fe_adap[i].fe)) {
err("Frontend %d registration failed.", i);
dvb_frontend_detach(adap->fe_adap[i].fe);
adap->fe_adap[i].fe = NULL;
/* In error case, do not try register more FEs,
* still leaving already registered FEs alive. */
if (i == 0)
return -ENODEV;
else
return 0;
}
/* only attach the tuner if the demod is there */
if (adap->props.fe[i].tuner_attach != NULL)
adap->props.fe[i].tuner_attach(adap);
adap->num_frontends_initialized++;
}
return 0;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:54,代码来源:dvb-usb-dvb.c
示例15: dib7090_fe_release
static void dib7090_fe_release(struct aml_dvb *advb, struct aml_fe *fe)
{
if(fe && fe->fe) {
pr_dbg("release fe Dib7090 %d\n", fe->id);
dvb_unregister_frontend(fe->fe);
dvb_frontend_detach(fe->fe);
dib7090_fe_cfg_put(fe->cfg);
fe->fe = NULL;
fe->cfg = NULL;
fe->id = -1;
}
}
开发者ID:32743069,项目名称:amlogic_common_3050,代码行数:12,代码来源:dib7090p.c
示例16: cdx2834_fe_release
static void cdx2834_fe_release(struct aml_dvb *advb, struct aml_fe *fe)
{
if(fe && fe->fe) {
pr_dbg("release GX1001 frontend %d\n", fe->id);
dvb_unregister_frontend(fe->fe);
dvb_frontend_detach(fe->fe);
if(fe->cfg){
kfree(fe->cfg);
fe->cfg = NULL;
}
fe->id = -1;
}
}
开发者ID:j1nx,项目名称:tlbb-linux-kernel-m3,代码行数:13,代码来源:cxd2834frontend.c
示例17: ite9173_fe_release
static void ite9173_fe_release(struct aml_dvb *advb, struct aml_fe *fe)
{
if(fe && fe->fe) {
pr_dbg("release ite9173 frontend %d\n", fe->id);
mutex_destroy(&ite_lock);
dvb_unregister_frontend(fe->fe);
dvb_frontend_detach(fe->fe);
if(fe->cfg){
kfree(fe->cfg);
fe->cfg = NULL;
}
fe->id = -1;
}
}
开发者ID:j1nx,项目名称:tlbb-linux-kernel-m3,代码行数:14,代码来源:itefrontend.c
示例18: dvb_usb_adapter_frontend_exit
int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap)
{
int i = adap->num_frontends_initialized - 1;
/* unregister all given adapter frontends */
for (; i >= 0; i--) {
if (adap->fe_adap[i].fe != NULL) {
dvb_unregister_frontend(adap->fe_adap[i].fe);
dvb_frontend_detach(adap->fe_adap[i].fe);
}
}
adap->num_frontends_initialized = 0;
return 0;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:15,代码来源:dvb-usb-dvb.c
示例19: printk
static struct dvb_frontend *frontend_init(struct core_config *cfg, int i)
{
struct tuner_devctl *ctl = NULL;
struct dvb_frontend *frontend = NULL;
printk(KERN_INFO "%s >\n", __FUNCTION__);
frontend = stv090x_attach(&vitamin_hd5000_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_0, STV090x_TUNER1);
if (frontend)
{
printk("%s: DEMOD attached\n", __FUNCTION__);
ctl = dvb_attach(stv6110x_attach, frontend, &stv6110x_config, cfg->i2c_adap);
if (ctl)
{
printk("%s: TUNER attached\n", __FUNCTION__);
vitamin_hd5000_stv090x_config.tuner_init = ctl->tuner_init;
vitamin_hd5000_stv090x_config.tuner_set_mode = ctl->tuner_set_mode;
vitamin_hd5000_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency;
vitamin_hd5000_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency;
vitamin_hd5000_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth;
vitamin_hd5000_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth;
vitamin_hd5000_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain;
vitamin_hd5000_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain;
vitamin_hd5000_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk;
vitamin_hd5000_stv090x_config.tuner_get_status = ctl->tuner_get_status;
}
else
{
printk(KERN_INFO "%s: error attaching TUNER\n", __FUNCTION__);
goto error_out;
}
}
else
{
printk(KERN_INFO "%s: error attaching\n", __FUNCTION__);
goto error_out;
}
return frontend;
error_out:
printk("core: Frontend registration failed!\n");
if (frontend)
dvb_frontend_detach(frontend);
return NULL;
}
开发者ID:Audioniek,项目名称:driver,代码行数:47,代码来源:core.c
示例20: as102_dvb_unregister
void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{
/* unregister as102 frontend */
dvb_unregister_frontend(as102_dev->dvb_fe);
/* detach frontend */
dvb_frontend_detach(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:168519,项目名称:linux,代码行数:17,代码来源:as102_drv.c
注:本文中的dvb_frontend_detach函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论