Skip to contentSkip to conversation

ngene: separate demodulator and tuner attach

PATCH In review Patrice Chotard 2 participants 2 messages Dec 15, 2012 – Dec 16, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ngene: separate demodulator and tuner attach

Previously, demodulator and tuner attach was done in the demod_attach callback. Migrate the tuner part in the tuner_attach callback in ngene_info to do thing in right place.

---
 drivers/media/pci/ngene/ngene-cards.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
(quoted diff) +0 -0

b/drivers/media/pci/ngene/ngene-cards.c
index 96a13ed..8db3fa1 100644

drivers/media/pci/ngene/ngene-cards.c +0 -0
@@ -328,6 +328,15 @@ static int demod_attach_drxd(struct ngene_channel

*chan)
return -ENODEV;
}

+ return 0;
+}
+
+static int tuner_attach_dtt7520x(struct ngene_channel *chan) +{
+ struct drxd_config *feconf;
+
+ feconf = chan->dev->card_info->fe_config[chan->number];
+
if (!dvb_attach(dvb_pll_attach, chan->fe, feconf->pll_address,
&chan->i2c_adapter, feconf->pll_type)) {
@@ -722,6 +731,7 @@ static struct ngene_info ngene_info_terratec = {

 	.name           = "Terratec Integra/Cinergy2400i Dual DVB-T",
 	.io_type        = {NGENE_IO_TSIN, NGENE_IO_TSIN},
 	.demod_attach   = {demod_attach_drxd, demod_attach_drxd},

+ .tuner_attach = {tuner_attach_dtt7520x, tuner_attach_dtt7520x},
.fe_config = {&fe_terratec_dvbt_0, &fe_terratec_dvbt_1},
.i2c_access = 1,
};

Signature · 1 line
1.7.10.4
Reviewed-by on v1 2/2
#1 lore raw
Quoted 33 lines · Patrice Chotard

Previously, demodulator and tuner attach was done in the demod_attach callback. Migrate the tuner part in the tuner_attach callback in ngene_info to do thing in right place.

---
  drivers/media/pci/ngene/ngene-cards.c |   10 ++++++++++
  1 file changed, 10 insertions(+)
drivers/media/pci/ngene/ngene-cards.c +9 -0
index 96a13ed..8db3fa1 100644
@@ -328,6 +328,15 @@ static int demod_attach_drxd(struct ngene_channel
 *chan)
  		return -ENODEV;
  	}
 
+	return 0;
+}
+
+static int tuner_attach_dtt7520x(struct ngene_channel *chan)
+{
+	struct drxd_config *feconf;
+
+	feconf = chan->dev->card_info->fe_config[chan->number];
+
  	if (!dvb_attach(dvb_pll_attach, chan->fe, feconf->pll_address,
  			&chan->i2c_adapter,
  			feconf->pll_type)) {

drivers/media/pci/ngene/ngene-cards.c static struct ngene_info ngene_info_terratec = { · line 737

Quoted 7 lines
drivers/media/pci/ngene/ngene-cards.c +1 -0
@@ -722,6 +731,7 @@ static struct ngene_info ngene_info_terratec = {
  	.name           = "Terratec Integra/Cinergy2400i Dual DVB-T",
  	.io_type        = {NGENE_IO_TSIN, NGENE_IO_TSIN},
  	.demod_attach   = {demod_attach_drxd, demod_attach_drxd},
+	.tuner_attach	= {tuner_attach_dtt7520x, tuner_attach_dtt7520x},
  	.fe_config      = {&fe_terratec_dvbt_0, &fe_terratec_dvbt_1},
  	.i2c_access     = 1,
  };

Looks very correct, but I am not familiar with n-gene.

regards
Antti

Signature · 1 line
http://palosaari.fi/