Commit 76db93d0 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (4846): Create new lgh06xf atsc tuner module



This patch creates a new atsc tuner module for the LG TDVS-H06xF ATSC tuners,
called lgh06xf.  The purpose of this change is to reduce some duplicated
code, and to allow the lgh06xf tuner code to take advantage of dvb_attach().
As a side effect, the dependency of dvb-bt8xx on dvb-pll has been removed,
since the lgh06xf module itself will use dvb-pll, while remaining optional
for the dvb-bt8xx driver through the use of DVB_FE_CUSTOMISE
Acked-by: default avatarAndrew de Quincey <adq_dvb@lidskialf.net>

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f9a76156
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ config DVB_B2C2_FLEXCOP
	select DVB_STV0297 if !DVB_FE_CUSTOMISE
	select DVB_BCM3510 if !DVB_FE_CUSTOMISE
	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
	select DVB_TUNER_LGH06XF if !DVB_FE_CUSTOMISE
	help
	  Support for the digital TV receiver chip made by B2C2 Inc. included in
	  Technisats PCI cards and USB boxes.
+2 −8
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include "stv0297.h"
#include "mt312.h"
#include "lgdt330x.h"
#include "lg_h06xf.h"
#include "lgh06xf.h"
#include "dvb-pll.h"

/* lnb control */
@@ -303,12 +303,6 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir
	return request_firmware(fw, name, fc->dev);
}

static int lgdt3303_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
{
	struct flexcop_device *fc = fe->dvb->priv;
	return lg_h06xf_pll_set(fe, &fc->i2c_adap, params);
}

static struct lgdt330x_config air2pc_atsc_hd5000_config = {
	.demod_address       = 0x59,
	.demod_chip          = LGDT3303,
@@ -533,7 +527,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
	/* try the air atsc 3nd generation (lgdt3303) */
	if ((fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
		fc->dev_type          = FC_AIR_ATSC3;
		fc->fe->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
		dvb_attach(lgh06xf_attach, fc->fe, &fc->i2c_adap);
		info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address);
	} else
	/* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
+1 −1
Original line number Diff line number Diff line
config DVB_BT8XX
	tristate "BT8xx based PCI cards"
	depends on DVB_CORE && PCI && I2C && VIDEO_BT848
	select DVB_PLL
	select DVB_MT352 if !DVB_FE_CUSTOMISE
	select DVB_SP887X if !DVB_FE_CUSTOMISE
	select DVB_NXT6000 if !DVB_FE_CUSTOMISE
	select DVB_CX24110 if !DVB_FE_CUSTOMISE
	select DVB_OR51211 if !DVB_FE_CUSTOMISE
	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
	select DVB_TUNER_LGH06XF if !DVB_FE_CUSTOMISE
	select DVB_ZL10353 if !DVB_FE_CUSTOMISE
	select FW_LOADER
	help
+1 −8
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
#include "dvb_frontend.h"
#include "dvb-bt8xx.h"
#include "bt878.h"
#include "dvb-pll.h"

static int debug;

@@ -568,12 +567,6 @@ static struct mt352_config digitv_alps_tded4_config = {
	.demod_init = digitv_alps_tded4_demod_init,
};

static int tdvs_tua6034_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
{
	struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv;
	return lg_h06xf_pll_set(fe, card->i2c_adapter, params);
}

static struct lgdt330x_config tdvs_tua6034_config = {
	.demod_address    = 0x0e,
	.demod_chip       = LGDT3303,
@@ -616,7 +609,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
		lgdt330x_reset(card);
		card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter);
		if (card->fe != NULL) {
			card->fe->ops.tuner_ops.set_params = tdvs_tua6034_tuner_set_params;
			dvb_attach(lgh06xf_attach, card->fe, card->i2c_adapter);
			dprintk ("dvb_bt8xx: lgdt330x detected\n");
		}
		break;
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
#include "cx24110.h"
#include "or51211.h"
#include "lgdt330x.h"
#include "lg_h06xf.h"
#include "lgh06xf.h"
#include "zl10353.h"

struct dvb_bt8xx_card {
Loading