* [PATCH 1/3] mt2063: add get_if_frequency call
@ 2011-12-17 20:57 linuxtv
2011-12-17 20:57 ` [PATCH 2/3] drxk: correction frontend attatching linuxtv
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: linuxtv @ 2011-12-17 20:57 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, Stefan Ringel
From: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
---
drivers/media/common/tuners/mt2063.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c
index 6743ffe..5b4b1ec 100644
--- a/drivers/media/common/tuners/mt2063.c
+++ b/drivers/media/common/tuners/mt2063.c
@@ -2211,18 +2211,29 @@ static int mt2063_get_frequency(struct dvb_frontend *fe, u32 *freq)
if (!state->init)
return -ENODEV;
- /*
- * FIXME: This is an API abuse at DRX-K driver: in order to allow
- * tda18271 to change the IF based on the standard, it uses this
- * callback as "get_if_frequency".
- */
- *freq = state->reference * 1000;
+ *freq = state->frequency;
dprintk(1, "frequency: %d\n", *freq);
return 0;
}
+static int mt2063_get_if_frequency(struct dvb_frontend *fe, u32 *freq)
+{
+ struct mt2063_state *state = fe->tuner_priv;
+
+ dprintk(2, "\n");
+
+ if (!state->init)
+ return -ENODEV;
+
+ *freq = state->AS_Data.f_out;
+
+ dprintk(1, "if frequency: %d\n", *freq);
+
+ return 0;
+}
+
static int mt2063_get_bandwidth(struct dvb_frontend *fe, u32 *bw)
{
struct mt2063_state *state = fe->tuner_priv;
@@ -2253,6 +2264,7 @@ static struct dvb_tuner_ops mt2063_ops = {
.set_analog_params = mt2063_set_analog_params,
.set_params = mt2063_set_params,
.get_frequency = mt2063_get_frequency,
+ .get_if_frequency = mt2063_get_if_frequency,
.get_bandwidth = mt2063_get_bandwidth,
.release = mt2063_release,
};
--
1.7.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] drxk: correction frontend attatching
2011-12-17 20:57 [PATCH 1/3] mt2063: add get_if_frequency call linuxtv
@ 2011-12-17 20:57 ` linuxtv
2011-12-17 23:39 ` Oliver Endriss
2011-12-17 20:57 ` [PATCH 3/3] cx23885: add Terratec Cinergy T pcie dual linuxtv
2011-12-17 21:54 ` [PATCH 1/3] mt2063: add get_if_frequency call Antti Palosaari
2 siblings, 1 reply; 9+ messages in thread
From: linuxtv @ 2011-12-17 20:57 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, Stefan Ringel
From: Stefan Ringel <linuxtv@stefanringel.de>
all drxk have dvb-t, but not dvb-c.
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
---
drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 038e470..8a59801 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
init_state(state);
if (init_drxk(state) < 0)
goto error;
- *fe_t = &state->t_frontend;
- return &state->c_frontend;
+ if (state->m_hasDVBC)
+ *fe_t = &state->c_frontend;
+
+ return &state->t_frontend;
error:
printk(KERN_ERR "drxk: not found\n");
--
1.7.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] cx23885: add Terratec Cinergy T pcie dual
2011-12-17 20:57 [PATCH 1/3] mt2063: add get_if_frequency call linuxtv
2011-12-17 20:57 ` [PATCH 2/3] drxk: correction frontend attatching linuxtv
@ 2011-12-17 20:57 ` linuxtv
2011-12-17 21:54 ` [PATCH 1/3] mt2063: add get_if_frequency call Antti Palosaari
2 siblings, 0 replies; 9+ messages in thread
From: linuxtv @ 2011-12-17 20:57 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, Stefan Ringel
From: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
---
drivers/media/video/cx23885/cx23885-cards.c | 13 +++++
drivers/media/video/cx23885/cx23885-dvb.c | 66 +++++++++++++++++++++++++++
drivers/media/video/cx23885/cx23885.h | 1 +
3 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ac03c26..4704289 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -467,6 +467,13 @@ struct cx23885_board cx23885_boards[] = {
CX25840_VIN7_CH3,
},
},
+ [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL] = {
+ .name = "TerraTec Cinergy T PCIe Dual",
+ .porta = CX23885_ANALOG_VIDEO,
+ .portb = CX23885_MPEG_DVB,
+ .portc = CX23885_MOEG_DVB,
+ .num_fds_portc = 2,
+ },
}
};
const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -671,6 +678,10 @@ struct cx23885_subid cx23885_subids[] = {
.subvendor = 0x14f1,
.subdevice = 0x8502,
.card = CX23885_BOARD_MYGICA_X8507,
+ }, {
+ .subvendor = 0x153b,
+ .subdevice = 0x117e,
+ .card = CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
},
};
const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1431,6 +1442,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
break;
case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF:
+ case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
@@ -1504,6 +1516,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
case CX23885_BOARD_HAUPPAUGE_HVR1500:
case CX23885_BOARD_MPX885:
case CX23885_BOARD_MYGICA_X8507:
+ case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
&dev->i2c_bus[2].i2c_adap,
"cx25840", 0x88 >> 1, NULL);
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index bcb45be..c3b8285 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -61,6 +61,8 @@
#include "cx23885-f300.h"
#include "altera-ci.h"
#include "stv0367.h"
+#include "drxk.h"
+#include "mt2063.h"
static unsigned int debug;
@@ -617,6 +619,24 @@ static struct xc5000_config netup_xc5000_config[] = {
},
};
+struct static drxk_config terratec_drxk_config[] = {
+ {
+ .adr = 0x29,
+ .no_i2c_bridge = 1,
+ }, {
+ .adr = 0x2a,
+ .no_i2c_bridge = 1,
+ },
+}
+
+struct static mt2063_config terratec_mt2063_config[] = {
+ {
+ .tuner_address = 0x60,
+ }, {
+ .tuner_address = 0x67,
+ },
+};
+
int netup_altera_fpga_rw(void *device, int flag, int data, int read)
{
struct cx23885_dev *dev = (struct cx23885_dev *)device;
@@ -1118,6 +1138,52 @@ static int dvb_register(struct cx23885_tsport *port)
goto frontend_detach;
}
break;
+ case CX23885_BOARD_TERRATREC_CINERGY_T_PCIE_DUAL:
+ i2c_bus = &dev->i2c_bus[0];
+ i2c_bus2 = &dev->i2c_bus[1];
+ mfe_shared = 1;
+ fe1 = videobuf_dvb_get_frontend(&port->frontend, 2);
+
+ switch (port->nr) {
+ /* port B */
+ case 1:
+ /* fe0 dvb-t */
+ fe0->dvb.frontend = dvb_attach(drxk_attach,
+ &terratec_drxk_config[0],
+ &i2c_bus->i2c_adap, NULL);
+
+ if (fe0->dvb.frontend != NULL) {
+ if (!dvb_attach(mt2063_attach,
+ fe0->dvb.frontend,
+ &terratec_mt2063_config[0],
+ &i2c_bus2->i2c_adap))
+ goto frontend_deatch;
+ }
+ break;
+ /* port C */
+ case 2:
+ /* fe0 dvb-t, fe1 dvb-c */
+ fe0->dvb.frontend = dvb_attach(drxk_attach,
+ &terratec_drxk_config[1],
+ &i2c_bus->i2c_adap, &fe1->dvb.frontend);
+
+ if (fe0->dvb.frontend != NULL) {
+ if (!dvb_attach(mt2063_attach,
+ fe0->dvb.frontend,
+ &terratec_mt2063_config[1],
+ &i2c_bus2->i2c_adap))
+ goto frontend_deatch;
+ }
+
+ if (fe1->dvb.frontend != NULL) {
+ if (!dvb_attach(mt2063_attach,
+ fe1->dvb.frontend,
+ &terratec_mt2063_config[1],
+ &i2c_bus2->i2c_adap))
+ goto frontend_deatch;
+ }
+ }
+ break;
default:
printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
" isn't supported yet\n",
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 519f40d..066f181 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -88,6 +88,7 @@
#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31
#define CX23885_BOARD_MPX885 32
#define CX23885_BOARD_MYGICA_X8507 33
+#define CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL 34
#define GPIO_0 0x00000001
#define GPIO_1 0x00000002
--
1.7.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] mt2063: add get_if_frequency call
2011-12-17 20:57 [PATCH 1/3] mt2063: add get_if_frequency call linuxtv
2011-12-17 20:57 ` [PATCH 2/3] drxk: correction frontend attatching linuxtv
2011-12-17 20:57 ` [PATCH 3/3] cx23885: add Terratec Cinergy T pcie dual linuxtv
@ 2011-12-17 21:54 ` Antti Palosaari
2011-12-17 21:59 ` Mauro Carvalho Chehab
2 siblings, 1 reply; 9+ messages in thread
From: Antti Palosaari @ 2011-12-17 21:54 UTC (permalink / raw)
To: linuxtv; +Cc: linux-media, mchehab
On 12/17/2011 10:57 PM, linuxtv@stefanringel.de wrote:
> From: Stefan Ringel<linuxtv@stefanringel.de>
>
> Signed-off-by: Stefan Ringel<linuxtv@stefanringel.de>
> ---
> drivers/media/common/tuners/mt2063.c | 24 ++++++++++++++++++------
> 1 files changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c
> index 6743ffe..5b4b1ec 100644
> --- a/drivers/media/common/tuners/mt2063.c
> +++ b/drivers/media/common/tuners/mt2063.c
> @@ -2211,18 +2211,29 @@ static int mt2063_get_frequency(struct dvb_frontend *fe, u32 *freq)
> if (!state->init)
> return -ENODEV;
>
> - /*
> - * FIXME: This is an API abuse at DRX-K driver: in order to allow
> - * tda18271 to change the IF based on the standard, it uses this
> - * callback as "get_if_frequency".
> - */
> - *freq = state->reference * 1000;
> + *freq = state->frequency;
>
> dprintk(1, "frequency: %d\n", *freq);
>
> return 0;
> }
>
> +static int mt2063_get_if_frequency(struct dvb_frontend *fe, u32 *freq)
> +{
> + struct mt2063_state *state = fe->tuner_priv;
> +
> + dprintk(2, "\n");
> +
> + if (!state->init)
> + return -ENODEV;
> +
> + *freq = state->AS_Data.f_out;
> +
> + dprintk(1, "if frequency: %d\n", *freq);
> +
> + return 0;
> +}
> +
> static int mt2063_get_bandwidth(struct dvb_frontend *fe, u32 *bw)
> {
> struct mt2063_state *state = fe->tuner_priv;
> @@ -2253,6 +2264,7 @@ static struct dvb_tuner_ops mt2063_ops = {
> .set_analog_params = mt2063_set_analog_params,
> .set_params = mt2063_set_params,
> .get_frequency = mt2063_get_frequency,
> + .get_if_frequency = mt2063_get_if_frequency,
> .get_bandwidth = mt2063_get_bandwidth,
> .release = mt2063_release,
> };
Without looking the code itself that seems like a little bit suspicious.
As a understand .get_frequency was abused as .get_if_frequency and you
changed it correctly now. Anyhow, earlier is was returning IF as
(state->reference * 1000) and now it does (state->AS_Data.f_out). Is
that correct? And if yes, why there is two variables in state having IF ?
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] mt2063: add get_if_frequency call
2011-12-17 21:54 ` [PATCH 1/3] mt2063: add get_if_frequency call Antti Palosaari
@ 2011-12-17 21:59 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2011-12-17 21:59 UTC (permalink / raw)
To: Antti Palosaari; +Cc: linuxtv, linux-media
Em 17-12-2011 19:54, Antti Palosaari escreveu:
> On 12/17/2011 10:57 PM, linuxtv@stefanringel.de wrote:
>> From: Stefan Ringel<linuxtv@stefanringel.de>
>>
>> Signed-off-by: Stefan Ringel<linuxtv@stefanringel.de>
>> ---
>> drivers/media/common/tuners/mt2063.c | 24 ++++++++++++++++++------
>> 1 files changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c
>> index 6743ffe..5b4b1ec 100644
>> --- a/drivers/media/common/tuners/mt2063.c
>> +++ b/drivers/media/common/tuners/mt2063.c
>> @@ -2211,18 +2211,29 @@ static int mt2063_get_frequency(struct dvb_frontend *fe, u32 *freq)
>> if (!state->init)
>> return -ENODEV;
>>
>> - /*
>> - * FIXME: This is an API abuse at DRX-K driver: in order to allow
>> - * tda18271 to change the IF based on the standard, it uses this
>> - * callback as "get_if_frequency".
>> - */
>> - *freq = state->reference * 1000;
>> + *freq = state->frequency;
>>
>> dprintk(1, "frequency: %d\n", *freq);
>>
>> return 0;
>> }
>>
>> +static int mt2063_get_if_frequency(struct dvb_frontend *fe, u32 *freq)
>> +{
>> + struct mt2063_state *state = fe->tuner_priv;
>> +
>> + dprintk(2, "\n");
>> +
>> + if (!state->init)
>> + return -ENODEV;
>> +
>> + *freq = state->AS_Data.f_out;
>> +
>> + dprintk(1, "if frequency: %d\n", *freq);
>> +
>> + return 0;
>> +}
>> +
>> static int mt2063_get_bandwidth(struct dvb_frontend *fe, u32 *bw)
>> {
>> struct mt2063_state *state = fe->tuner_priv;
>> @@ -2253,6 +2264,7 @@ static struct dvb_tuner_ops mt2063_ops = {
>> .set_analog_params = mt2063_set_analog_params,
>> .set_params = mt2063_set_params,
>> .get_frequency = mt2063_get_frequency,
>> + .get_if_frequency = mt2063_get_if_frequency,
>> .get_bandwidth = mt2063_get_bandwidth,
>> .release = mt2063_release,
>> };
>
> Without looking the code itself that seems like a little bit suspicious. As a understand .get_frequency was abused as .get_if_frequency and you changed it correctly now. Anyhow, earlier is was returning IF as (state->reference * 1000) and now it does (state->AS_Data.f_out). Is that correct? And if yes, why there is two variables in state having IF ?
Antti,
Stefan based his patch on my az6007 development tree:
http://git.linuxtv.org/mchehab/experimental.git/shortlog/refs/heads/az6007-2
As there is a driver there for mt2063.
Regards,
Mauro.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] drxk: correction frontend attatching
2011-12-17 20:57 ` [PATCH 2/3] drxk: correction frontend attatching linuxtv
@ 2011-12-17 23:39 ` Oliver Endriss
2011-12-17 23:47 ` Oliver Endriss
2011-12-18 6:03 ` Stefan Ringel
0 siblings, 2 replies; 9+ messages in thread
From: Oliver Endriss @ 2011-12-17 23:39 UTC (permalink / raw)
To: linuxtv; +Cc: linux-media, mchehab
On Saturday 17 December 2011 21:57:16 linuxtv@stefanringel.de wrote:
> From: Stefan Ringel <linuxtv@stefanringel.de>
>
> all drxk have dvb-t, but not dvb-c.
>
> Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
> ---
> drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
> index 038e470..8a59801 100644
> --- a/drivers/media/dvb/frontends/drxk_hard.c
> +++ b/drivers/media/dvb/frontends/drxk_hard.c
> @@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
> init_state(state);
> if (init_drxk(state) < 0)
> goto error;
> - *fe_t = &state->t_frontend;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> - return &state->c_frontend;
^^^^^^^^^^^^^^^^^^^^^^^^^^
> + if (state->m_hasDVBC)
> + *fe_t = &state->c_frontend;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> + return &state->t_frontend;
^^^^^^^^^^^^^^^^^^^
>
> error:
> printk(KERN_ERR "drxk: not found\n");
NAK, this changes the behaviour for existing drivers.
What is the point to swap DVB-T and DVB-C frontends?
If you really need this, please add an option to the config struct
with default that does not change anything for existing drivers.
CU
Oliver
--
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] drxk: correction frontend attatching
2011-12-17 23:39 ` Oliver Endriss
@ 2011-12-17 23:47 ` Oliver Endriss
[not found] ` <4EED829E.6020407@stefanringel.de>
2011-12-18 6:03 ` Stefan Ringel
1 sibling, 1 reply; 9+ messages in thread
From: Oliver Endriss @ 2011-12-17 23:47 UTC (permalink / raw)
To: linux-media; +Cc: linuxtv, mchehab
On Sunday 18 December 2011 00:39:49 Oliver Endriss wrote:
> On Saturday 17 December 2011 21:57:16 linuxtv@stefanringel.de wrote:
> > From: Stefan Ringel <linuxtv@stefanringel.de>
> >
> > all drxk have dvb-t, but not dvb-c.
> >
> > Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
> > ---
> > drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
> > 1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
> > index 038e470..8a59801 100644
> > --- a/drivers/media/dvb/frontends/drxk_hard.c
> > +++ b/drivers/media/dvb/frontends/drxk_hard.c
> > @@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
> > init_state(state);
> > if (init_drxk(state) < 0)
> > goto error;
> > - *fe_t = &state->t_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > - return &state->c_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> > + if (state->m_hasDVBC)
> > + *fe_t = &state->c_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > + return &state->t_frontend;
> ^^^^^^^^^^^^^^^^^^^
> >
> > error:
> > printk(KERN_ERR "drxk: not found\n");
>
> NAK, this changes the behaviour for existing drivers.
>
> What is the point to swap DVB-T and DVB-C frontends?
> If you really need this, please add an option to the config struct
> with default that does not change anything for existing drivers.
Correction:
Better do something like this (untested):
if (state->m_hasDVBC) {
*fe_t = &state->t_frontend;
return state->c_frontend;
} else
return &state->t_frontend;
CU
Oliver
--
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
Oliver Endriss ESCAPE GmbH
e-mail: o.endriss@escape-edv.de EDV-Loesungen
phone: +49 (0)7722 21504 Birkenweg 9
fax: +49 (0)7722 21510 D-78098 Triberg
----------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] drxk: correction frontend attatching
2011-12-17 23:39 ` Oliver Endriss
2011-12-17 23:47 ` Oliver Endriss
@ 2011-12-18 6:03 ` Stefan Ringel
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Ringel @ 2011-12-18 6:03 UTC (permalink / raw)
To: linux-media; +Cc: Oliver Endriss, mchehab
Am 18.12.2011 00:39, schrieb Oliver Endriss:
> On Saturday 17 December 2011 21:57:16linuxtv@stefanringel.de wrote:
>> From: Stefan Ringel<linuxtv@stefanringel.de>
>>
>> all drxk have dvb-t, but not dvb-c.
>>
>> Signed-off-by: Stefan Ringel<linuxtv@stefanringel.de>
>> ---
>> drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
>> index 038e470..8a59801 100644
>> --- a/drivers/media/dvb/frontends/drxk_hard.c
>> +++ b/drivers/media/dvb/frontends/drxk_hard.c
>> @@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
>> init_state(state);
>> if (init_drxk(state)< 0)
>> goto error;
>> - *fe_t =&state->t_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> - return&state->c_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>> + if (state->m_hasDVBC)
>> + *fe_t =&state->c_frontend;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> +
>> + return&state->t_frontend;
> ^^^^^^^^^^^^^^^^^^^
>>
>> error:
>> printk(KERN_ERR "drxk: not found\n");
> NAK, this changes the behaviour for existing drivers.
>
> What is the point to swap DVB-T and DVB-C frontends?
broking by attaching or deattaching the frontend driver, if no dvb-c
frontend drxk can use(i.e. drx-3916k). Do you add a frontend which is
not physically present? Look to my 3rd patch. I tested many ways to
attach that.
Stefan
> If you really need this, please add an option to the config struct
> with default that does not change anything for existing drivers.
>
> CU
> Oliver
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] drxk: correction frontend attatching
[not found] ` <4EED829E.6020407@stefanringel.de>
@ 2012-01-05 20:46 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2012-01-05 20:46 UTC (permalink / raw)
To: Stefan Ringel; +Cc: linux-media, Oliver Endriss
On 18-12-2011 04:05, Stefan Ringel wrote:
> Am 18.12.2011 00:47, schrieb Oliver Endriss:
>> On Sunday 18 December 2011 00:39:49 Oliver Endriss wrote:
>>> On Saturday 17 December 2011 21:57:16 linuxtv@stefanringel.de wrote:
>>>> From: Stefan Ringel<linuxtv@stefanringel.de>
>>>>
>>>> all drxk have dvb-t, but not dvb-c.
>>>>
>>>> Signed-off-by: Stefan Ringel<linuxtv@stefanringel.de>
>>>> ---
>>>> drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
>>>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
>>>> index 038e470..8a59801 100644
>>>> --- a/drivers/media/dvb/frontends/drxk_hard.c
>>>> +++ b/drivers/media/dvb/frontends/drxk_hard.c
>>>> @@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
>>>> init_state(state);
>>>> if (init_drxk(state)< 0)
>>>> goto error;
>>>> - *fe_t =&state->t_frontend;
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>
>>>> - return&state->c_frontend;
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> + if (state->m_hasDVBC)
>>>> + *fe_t =&state->c_frontend;
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> +
>>>> + return&state->t_frontend;
>>> ^^^^^^^^^^^^^^^^^^^
>>>>
>>>> error:
>>>> printk(KERN_ERR "drxk: not found\n");
>>> NAK, this changes the behaviour for existing drivers.
>>>
>>> What is the point to swap DVB-T and DVB-C frontends?
>>> If you really need this, please add an option to the config struct
>>> with default that does not change anything for existing drivers.
>> Correction:
>> Better do something like this (untested):
>>
>> if (state->m_hasDVBC) {
>> *fe_t =&state->t_frontend;
>> return state->c_frontend;
>> } else
>> return&state->t_frontend;
>>
>> CU
>> Oliver
>>
> What shall be that, explain? For me not practicable.
The right thing to do here is to create just one frontend per DRX-K.
This were already discussed in the past. Now that we have enough
dvb-core infrastructure to support it, I've made the patches for it:
http://news.gmane.org/gmane.linux.drivers.video-input-infrastructure
I took the m_hasDVBC and m_hasDVBT states into account, so DRX-K
drivers that implement just one of the types should now be properly
reported.
It also made the attachment logic simpler.
Regards,
Mauro
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-05 20:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-17 20:57 [PATCH 1/3] mt2063: add get_if_frequency call linuxtv
2011-12-17 20:57 ` [PATCH 2/3] drxk: correction frontend attatching linuxtv
2011-12-17 23:39 ` Oliver Endriss
2011-12-17 23:47 ` Oliver Endriss
[not found] ` <4EED829E.6020407@stefanringel.de>
2012-01-05 20:46 ` Mauro Carvalho Chehab
2011-12-18 6:03 ` Stefan Ringel
2011-12-17 20:57 ` [PATCH 3/3] cx23885: add Terratec Cinergy T pcie dual linuxtv
2011-12-17 21:54 ` [PATCH 1/3] mt2063: add get_if_frequency call Antti Palosaari
2011-12-17 21:59 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).