linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tevii S480 on Unicable SCR System
@ 2014-10-01 18:42 Ulrich Eckhardt
  2014-10-08 16:52 ` Ulrich Eckhardt
  2014-10-10 17:19 ` [PATCH][media] Fix LNB supply voltage of Tevii S480 on initialization Ulrich Eckhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Ulrich Eckhardt @ 2014-10-01 18:42 UTC (permalink / raw)
  To: linux-media

Hi,

i have a development computer with a Tevii S480 connected to a Satellite channel
router (EN50494). As long as I haven't started a video application this
computers blocks any other receiver connected to this cable. I have measured the
output of the Tevii card and found, that after start of the computer, the output
is set to 18V. This is not reset after loading and initializing the drivers. So
no other receiver could sent DiSEqC commands to the SCR until
a video application at this computer initializes the voltage correctly. I think
the voltage needs to be switched off until this card is really in use by an
application.

I have patched the file drivers/media/dvb-frontends/ds3000.c to initialize the
voltage to OFF, which works for me. But I am not sure, if this is really the
correct solution:

--- ds3000.orig 2014-10-01 19:41:37.611631299 +0200
+++ ds3000.c    2014-10-01 20:18:19.602930920 +0200
@@ -864,6 +864,7 @@
        memcpy(&state->frontend.ops, &ds3000_ops,
                        sizeof(struct dvb_frontend_ops));
        state->frontend.demodulator_priv = state;
+       ds3000_set_voltage (&state->frontend, SEC_VOLTAGE_OFF);
        return &state->frontend;

 error3:

-------------------------------------------------------

Best Regards
Uli
-- 
Ulrich Eckhardt                  http://www.uli-eckhardt.de

Ein Blitzableiter auf dem Kirchturm ist das denkbar stärkste
Misstrauensvotum gegen den lieben Gott. (Karl Krauss)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tevii S480 on Unicable SCR System
  2014-10-01 18:42 Tevii S480 on Unicable SCR System Ulrich Eckhardt
@ 2014-10-08 16:52 ` Ulrich Eckhardt
  2014-10-08 18:00   ` Mauro Carvalho Chehab
  2014-10-10 17:19 ` [PATCH][media] Fix LNB supply voltage of Tevii S480 on initialization Ulrich Eckhardt
  1 sibling, 1 reply; 5+ messages in thread
From: Ulrich Eckhardt @ 2014-10-08 16:52 UTC (permalink / raw)
  To: linux-media; +Cc: m.chehab

Hi,

I have digged a little bit deeper in the code and hopefully found a more general solution 
by initializing the voltage in dvb_frontend.c in the function dvb_register_frontend.
This should be a more global approach which may also fix this type of problems
with other cards. I will test this patch the next days on a different system with a 
CineS2 V5.5 card.

Any opinions about this patch or is my first attempt with patching only the code
for the Tevii S480 a better solution?

-----------------------------------------------------------------------------
diff -r f62f56c648b0 drivers/media/dvb-core/dvb_frontend.c
--- a/drivers/media/dvb-core/dvb_frontend.c     Wed Oct 08 17:30:52 2014 +0200
+++ b/drivers/media/dvb-core/dvb_frontend.c     Wed Oct 08 17:40:20 2014 +0200
@@ -2622,6 +2622,14 @@
                             fe, DVB_DEVICE_FRONTEND);
 
        /*
+        * Ensure that frontend voltage is switched off on initialization
+        */
+       if (dvb_powerdown_on_sleep) {
+               if (fe->ops.set_voltage)
+                       fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);
+       }
+
+       /*
         * Initialize the cache to the proper values according with the
         * first supported delivery system (ops->delsys[0])
         */

-----------------------------------------------------------------------------

Am 01.10.2014 um 20:42 schrieb Ulrich Eckhardt:
> Hi,
> 
> i have a development computer with a Tevii S480 connected to a Satellite channel
> router (EN50494). As long as I haven't started a video application this
> computers blocks any other receiver connected to this cable. I have measured the
> output of the Tevii card and found, that after start of the computer, the output
> is set to 18V. This is not reset after loading and initializing the drivers. So
> no other receiver could sent DiSEqC commands to the SCR until
> a video application at this computer initializes the voltage correctly. I think
> the voltage needs to be switched off until this card is really in use by an
> application.
> 
> I have patched the file drivers/media/dvb-frontends/ds3000.c to initialize the
> voltage to OFF, which works for me. But I am not sure, if this is really the
> correct solution:
-- 
Ulrich Eckhardt                  http://www.uli-eckhardt.de

Ein Blitzableiter auf dem Kirchturm ist das denkbar stärkste 
Misstrauensvotum gegen den lieben Gott. (Karl Krauss)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tevii S480 on Unicable SCR System
  2014-10-08 16:52 ` Ulrich Eckhardt
@ 2014-10-08 18:00   ` Mauro Carvalho Chehab
  2014-10-08 18:28     ` Ulrich Eckhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2014-10-08 18:00 UTC (permalink / raw)
  To: Ulrich Eckhardt; +Cc: linux-media

Em Wed, 08 Oct 2014 18:52:09 +0200
Ulrich Eckhardt <uli-lirc@uli-eckhardt.de> escreveu:

> Hi,
> 
> I have digged a little bit deeper in the code and hopefully found a more general solution 
> by initializing the voltage in dvb_frontend.c in the function dvb_register_frontend.
> This should be a more global approach which may also fix this type of problems
> with other cards. I will test this patch the next days on a different system with a 
> CineS2 V5.5 card.
> 
> Any opinions about this patch or is my first attempt with patching only the code
> for the Tevii S480 a better solution?

You forgot to add your Signed-off-by to your patch...

> -----------------------------------------------------------------------------
> diff -r f62f56c648b0 drivers/media/dvb-core/dvb_frontend.c
> --- a/drivers/media/dvb-core/dvb_frontend.c     Wed Oct 08 17:30:52 2014 +0200
> +++ b/drivers/media/dvb-core/dvb_frontend.c     Wed Oct 08 17:40:20 2014 +0200
> @@ -2622,6 +2622,14 @@
>                              fe, DVB_DEVICE_FRONTEND);
>  
>         /*
> +        * Ensure that frontend voltage is switched off on initialization
> +        */
> +       if (dvb_powerdown_on_sleep) {

I'm wandering why to test if (dvb_powerdown_on_sleep) here...

MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB voltage off on sleep (default)");

That controls what happens when the frontend's thread stops, and not
what happens during device initialization.

So, IMHO, it doesn't apply here.

> +               if (fe->ops.set_voltage)
> +                       fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);

I actually have different feelings with regards to the above: I don't
think that the core should take care of it, as this is part of device
initialization. I mean: the frontend driver should be the one responsible
to power off the voltage during module initialization.

Adding this to the core will add an uneeded initialization for most
drivers that do it already.

On the other hand, adding it would help to avoid one additional bug
to be handled when the developer forgets to add such voltage off
setting at the driver's init code, and the board is bad enough to
turn voltage on at reset.

My vote is to fix it at the driver's level.

Regards,
Mauro

> +       }
> +
> +       /*
>          * Initialize the cache to the proper values according with the
>          * first supported delivery system (ops->delsys[0])
>          */
> 
> -----------------------------------------------------------------------------
> 
> Am 01.10.2014 um 20:42 schrieb Ulrich Eckhardt:
> > Hi,
> > 
> > i have a development computer with a Tevii S480 connected to a Satellite channel
> > router (EN50494). As long as I haven't started a video application this
> > computers blocks any other receiver connected to this cable. I have measured the
> > output of the Tevii card and found, that after start of the computer, the output
> > is set to 18V. This is not reset after loading and initializing the drivers. So
> > no other receiver could sent DiSEqC commands to the SCR until
> > a video application at this computer initializes the voltage correctly. I think
> > the voltage needs to be switched off until this card is really in use by an
> > application.
> > 
> > I have patched the file drivers/media/dvb-frontends/ds3000.c to initialize the
> > voltage to OFF, which works for me. But I am not sure, if this is really the
> > correct solution:

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tevii S480 on Unicable SCR System
  2014-10-08 18:00   ` Mauro Carvalho Chehab
@ 2014-10-08 18:28     ` Ulrich Eckhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Eckhardt @ 2014-10-08 18:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Am 08.10.2014 um 20:00 schrieb Mauro Carvalho Chehab:
> Em Wed, 08 Oct 2014 18:52:09 +0200
> Ulrich Eckhardt <uli-lirc@uli-eckhardt.de> escreveu:
>>  
>>         /*
>> +        * Ensure that frontend voltage is switched off on initialization
>> +        */
>> +       if (dvb_powerdown_on_sleep) {
> 
> I'm wandering why to test if (dvb_powerdown_on_sleep) here...
> 
> MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB voltage off on sleep (default)");
> 
> That controls what happens when the frontend's thread stops, and not
> what happens during device initialization.
> So, IMHO, it doesn't apply here.

OK, I agree.

> My vote is to fix it at the driver's level.

So if no other opinions turns up the next days and this problem occurs only on 
the Tevii card, I will reformat my patch in my first E-Mail correctly for 
submission. 
 
Best Regards
Uli
-- 
Ulrich Eckhardt                  http://www.uli-eckhardt.de

Ein Blitzableiter auf dem Kirchturm ist das denkbar stärkste 
Misstrauensvotum gegen den lieben Gott. (Karl Krauss)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH][media] Fix LNB supply voltage of Tevii S480 on initialization
  2014-10-01 18:42 Tevii S480 on Unicable SCR System Ulrich Eckhardt
  2014-10-08 16:52 ` Ulrich Eckhardt
@ 2014-10-10 17:19 ` Ulrich Eckhardt
  1 sibling, 0 replies; 5+ messages in thread
From: Ulrich Eckhardt @ 2014-10-10 17:19 UTC (permalink / raw)
  To: linux-media, m.chehab

The Tevii S480 outputs 18V on startup for the LNB supply voltage and does not 
automatically power down. This blocks other receivers connected 
to a satellite channel router (EN50494), since the receivers can not send the
required DiSEqC sequences when the Tevii card is connected to a the same SCR.

This patch switches off the LNB supply voltage on initialization of the frontend. 

Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de>

diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
--- a/drivers/media/dvb-frontends/ds3000.c
+++ b/drivers/media/dvb-frontends/ds3000.c
@@ -864,6 +864,7 @@
        memcpy(&state->frontend.ops, &ds3000_ops,
                        sizeof(struct dvb_frontend_ops));
        state->frontend.demodulator_priv = state;
+       ds3000_set_voltage (&state->frontend, SEC_VOLTAGE_OFF);
        return &state->frontend;
 
 error3:




-- 
Ulrich Eckhardt                  http://www.uli-eckhardt.de

Ein Blitzableiter auf dem Kirchturm ist das denkbar stärkste 
Misstrauensvotum gegen den lieben Gott. (Karl Krauss)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-10 17:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 18:42 Tevii S480 on Unicable SCR System Ulrich Eckhardt
2014-10-08 16:52 ` Ulrich Eckhardt
2014-10-08 18:00   ` Mauro Carvalho Chehab
2014-10-08 18:28     ` Ulrich Eckhardt
2014-10-10 17:19 ` [PATCH][media] Fix LNB supply voltage of Tevii S480 on initialization Ulrich Eckhardt

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).