当前位置: 首页>>代码示例>>C++>>正文


C++ dvb_attach函数代码示例

本文整理汇总了C++中dvb_attach函数的典型用法代码示例。如果您正苦于以下问题:C++ dvb_attach函数的具体用法?C++ dvb_attach怎么用?C++ dvb_attach使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dvb_attach函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: m920x_qt1010_tuner_attach

static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
{
	deb("%s\n",__func__);

	if (dvb_attach(qt1010_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL)
		return -ENODEV;

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:9,代码来源:m920x.c

示例2: mxl111sf_attach_demod

static int mxl111sf_attach_demod(struct dvb_usb_adapter *adap, u8 fe_id)
{
	struct dvb_usb_device *d = adap_to_d(adap);
	struct mxl111sf_state *state = d_to_priv(d);
	struct mxl111sf_adap_state *adap_state = &state->adap_state[fe_id];
	int ret;

	pr_debug("%s()\n", __func__);

	/* save a pointer to the dvb_usb_device in device state */
	state->d = d;
	adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 1 : 2;
	state->alt_mode = adap_state->alt_mode;

	if (usb_set_interface(d->udev, 0, state->alt_mode) < 0)
		pr_err("set interface failed");

	state->gpio_mode = MXL111SF_GPIO_MOD_DVBT;
	adap_state->gpio_mode = state->gpio_mode;
	adap_state->device_mode = MXL_SOC_MODE;
	adap_state->ep6_clockphase = 1;

	ret = mxl1x1sf_soft_reset(state);
	if (mxl_fail(ret))
		goto fail;
	ret = mxl111sf_init_tuner_demod(state);
	if (mxl_fail(ret))
		goto fail;

	ret = mxl1x1sf_set_device_mode(state, adap_state->device_mode);
	if (mxl_fail(ret))
		goto fail;

	ret = mxl111sf_enable_usb_output(state);
	if (mxl_fail(ret))
		goto fail;
	ret = mxl1x1sf_top_master_ctrl(state, 1);
	if (mxl_fail(ret))
		goto fail;

	/* dont care if this fails */
	mxl111sf_init_port_expander(state);

	adap->fe[fe_id] = dvb_attach(mxl111sf_demod_attach, state,
			      &mxl_demod_config);
	if (adap->fe[fe_id]) {
		state->num_frontends++;
		adap_state->fe_init = adap->fe[fe_id]->ops.init;
		adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init;
		adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep;
		adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep;
		return 0;
	}
	ret = -EIO;
fail:
	return ret;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:57,代码来源:mxl111sf.c

示例3: pvr2_lgdt3303_attach

static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
{
	adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
			      &adap->channel.hdw->i2c_adap);
	if (adap->fe)
		return 0;

	return -EIO;
}
开发者ID:andi34,项目名称:Dhollmen_Kernel,代码行数:9,代码来源:pvrusb2-devattr.c

示例4: dibusb_panasonic_tuner_attach

static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap)
{
	struct dibusb_state *st = adap->priv;

	st->tuner_addr = 0x60;

	dvb_attach(dvb_pll_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
		   DVB_PLL_TDA665X);
	return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:10,代码来源:dibusb-mb.c

示例5: m920x_tda8275_61_tuner_attach

static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap)
{
	deb("%s\n",__func__);

	if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL)
		return -ENODEV;

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:9,代码来源:m920x.c

示例6: pvr2_s5h1411_attach

static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap)
{
	adap->fe = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config,
			      &adap->channel.hdw->i2c_adap);
	if (adap->fe)
		return 0;

	return -EIO;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:9,代码来源:pvrusb2-devattr.c

示例7: pvr2_tda10048_attach

static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap)
{
	adap->fe = dvb_attach(tda10048_attach, &hauppauge_tda10048_config,
			      &adap->channel.hdw->i2c_adap);
	if (adap->fe)
		return 0;

	return -EIO;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:9,代码来源:pvrusb2-devattr.c

示例8: edc1051_init_frontend

/******************************************************************
* FUNCTION IMPLEMENTATION                                         *
*******************************************************************/
struct dvb_frontend* edc1051_init_frontend(struct i2c_adapter *adapter)
{
	struct dvb_frontend * fe = NULL;

	fe = dvb_attach(tda10023_attach, &EDC_1051_tda10024_config,
				adapter, 0);
	if( !fe ) {
		dprintk("cant attach tda10024\n");
		return NULL;
	}
	dprintk("tda10023 attached\n");
	dvb_attach(dvb_pll_attach, fe, 0x61,
			adapter,
			DVB_PLL_TDA665X);

	printk("EDC-1051 successfully initialized\n");
	return fe;
}
开发者ID:ElecardSTB,项目名称:sdk830,代码行数:21,代码来源:edc-1051.c

示例9: rtl2831u_tuner_attach

static int rtl2831u_tuner_attach(struct dvb_usb_adapter *adap)
{
	int ret;
	struct dvb_usb_device *d = adap_to_d(adap);
	struct rtl28xxu_priv *priv = d_to_priv(d);
	struct i2c_adapter *rtl2830_tuner_i2c;
	struct dvb_frontend *fe;

	dev_dbg(&d->udev->dev, "%s:\n", __func__);

	/* use rtl2830 driver I2C adapter, for more info see rtl2830 driver */
	rtl2830_tuner_i2c = rtl2830_get_tuner_i2c_adapter(adap->fe[0]);

	switch (priv->tuner) {
	case TUNER_RTL2830_QT1010:
		fe = dvb_attach(qt1010_attach, adap->fe[0],
				rtl2830_tuner_i2c, &rtl28xxu_qt1010_config);
		break;
	case TUNER_RTL2830_MT2060:
		fe = dvb_attach(mt2060_attach, adap->fe[0],
				rtl2830_tuner_i2c, &rtl28xxu_mt2060_config,
				1220);
		break;
	case TUNER_RTL2830_MXL5005S:
		fe = dvb_attach(mxl5005s_attach, adap->fe[0],
				rtl2830_tuner_i2c, &rtl28xxu_mxl5005s_config);
		break;
	default:
		fe = NULL;
		dev_err(&d->udev->dev, "%s: unknown tuner=%d\n", KBUILD_MODNAME,
				priv->tuner);
	}

	if (fe == NULL) {
		ret = -ENODEV;
		goto err;
	}

	return 0;
err:
	dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
	return ret;
}
开发者ID:rofehr,项目名称:linux-wetek,代码行数:43,代码来源:rtl28xxu.c

示例10: frontend_init

static struct dvb_frontend * frontend_init(struct core_config *cfg, int i)
{
	
	struct dvb_frontend *frontend = NULL;

	printk (KERN_INFO "%s >\n", __FUNCTION__);


	if (i== 0)
		frontend = stv090x_attach(&tt1600_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_0, STV090x_TUNER1);
	else

		frontend = stv090x_attach(&tt1600_stv090x_config, cfg->i2c_adap, STV090x_DEMODULATOR_1, STV090x_TUNER2);
	
	if (frontend) {
		printk("%s: stv0900 attached\n", __FUNCTION__);
	if (i == 0){
				if (dvb_attach(stb6100_attach, frontend, &stb6100_config, cfg->i2c_adap,STB1) == 0) {
					printk (KERN_INFO "error attaching stb6100\n");
					goto error_out;
					}
				}else{
			
				if (dvb_attach(stb6100_attach,frontend, &stb6100_config_1, cfg->i2c_adap,STB2) == 0) {
					printk(KERN_INFO " error attaching stb6100\n");
					goto error_out;
				}
				 }
				
				
					printk("fe_core : stb6100 attached OK \n");
			} else {
				printk (KERN_INFO "%s: error attaching stv0900\n", __FUNCTION__);
				goto error_out;
			}

	return frontend;
error_out:
	printk("core: Frontend registration failed!\n");
	if (frontend) 
		dvb_frontend_detach(frontend);
	return NULL;
}
开发者ID:Greder,项目名称:OpenPli-RUnigma,代码行数:43,代码来源:core.c

示例11: digitv_frontend_attach

static int digitv_frontend_attach(struct dvb_usb_adapter *adap)
{
	struct digitv_state *st = adap->dev->priv;

	adap->fe_adap[0].fe = dvb_attach(mt352_attach, &digitv_mt352_config,
					 &adap->dev->i2c_adap);
	if ((adap->fe_adap[0].fe) != NULL) {
		st->is_nxt6000 = 0;
		return 0;
	}
	adap->fe_adap[0].fe = dvb_attach(nxt6000_attach,
					 &digitv_nxt6000_config,
					 &adap->dev->i2c_adap);
	if ((adap->fe_adap[0].fe) != NULL) {
		st->is_nxt6000 = 1;
		return 0;
	}
	return -EIO;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:19,代码来源:digitv.c

示例12: ttusb2_frontend_tda10023_attach

static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap)
{
	if (usb_set_interface(adap->dev->udev, 0, 3) < 0)
		err("set interface to alts=3 failed");
	if ((adap->fe = dvb_attach(tda10023_attach, &tda10023_config, &adap->dev->i2c_adap, 0x48)) == NULL) {
		deb_info("TDA10023 attach failed\n");
		return -ENODEV;
	}
	return 0;
}
开发者ID:rrowicki,项目名称:Chrono_Kernel-1,代码行数:10,代码来源:ttusb2.c

示例13: dibusb_thomson_tuner_attach

static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap)
{
	struct dibusb_state *st = adap->priv;

	st->tuner_addr = 0x61;

	dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
		   DVB_PLL_TUA6010XS);
	return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:10,代码来源:dibusb-mb.c

示例14: gl861_frontend_attach

static int gl861_frontend_attach(struct dvb_usb_adapter *adap)
{

	adap->fe[0] = dvb_attach(zl10353_attach, &gl861_zl10353_config,
		&adap_to_d(adap)->i2c_adap);
	if (adap->fe[0] == NULL)
		return -EIO;

	return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:10,代码来源:gl861.c

示例15: dm04_lme2510_tuner

static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap)
{
	struct lme2510_state *st = adap->dev->priv;
	char *tun_msg[] = {"", "TDA8263", "IX2505V", "DVB_PLL_OPERA"};
	int ret = 0;

	switch (st->tuner_config) {
	case TUNER_LG:
		if (dvb_attach(tda826x_attach, adap->fe, 0xc0,
			&adap->dev->i2c_adap, 1))
			ret = st->tuner_config;
		break;
	case TUNER_S7395:
		if (dvb_attach(ix2505v_attach , adap->fe, &lme_tuner,
			&adap->dev->i2c_adap))
			ret = st->tuner_config;
		break;
	case TUNER_S0194:
		if (dvb_attach(dvb_pll_attach , adap->fe, 0xc0,
			&adap->dev->i2c_adap, DVB_PLL_OPERA1))
			ret = st->tuner_config;
		break;
	default:
		break;
	}

	if (ret)
		info("TUN Found %s tuner", tun_msg[ret]);
	else {
		info("TUN No tuner found --- reseting device");
		lme_coldreset(adap->dev->udev);
		return -ENODEV;
	}

	/* Start the Interrupt*/
	ret = lme2510_int_read(adap);
	if (ret < 0) {
		info("INT Unable to start Interrupt Service");
		return -ENODEV;
	}

	return ret;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:43,代码来源:lmedm04.c


注:本文中的dvb_attach函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。