Upgrading from DXR3 to FF, and not happy

Message ID 200504251747.10746.gfiala@s.netic.de
State New
Headers

Commit Message

Guido Fiala April 25, 2005, 3:47 p.m. UTC
  On Monday 25 April 2005 17:09, Markku Tavasti wrote:
> Guido Fiala <gfiala@s.netic.de> writes:
> >> > Very bad idea [tm] if you have a rev. 1.3 DVB-S card.
> >> > The ARM will crash very often without a sat signal.
> >
> > Nope - need to call FE_SLEEP after init of frontend (requires driver
> > patch), works since years stable for me.
>
> Pointer to patch, or patch itself would be welcome. I could not find
> it with google (wrong keywords in search).

Ok, once again i try to collect what i did, i changed 3 files, although 2 
would probably do:

required (dvb-kernel):
frontend.h (make FE_SLEEP public to be able to call it via ioctl)

requried (vdr):
dvbdevice.c (calls FE_SLEEP, it did not work when the FE_INIT was never 
called, we need to FE_INIT and after that call FE_SLEEP to make it work)

not sure (dvb-kernel):
ves1x93.c (mainly debug-output to see if it works plus one register-change 
which alone did not make it work, as far as i remember)

Attached are the diff's of the changes i made.
Of course you cannot use the patches when you use a dish, it is only good for 
signalless operation. (Obsessively using playmode switches+OSD occasionally 
arm-crashs anyway, sigh)

Hope it fixes your problems.
  

Comments

Markku Tavasti April 25, 2005, 4:31 p.m. UTC | #1
Guido Fiala <gfiala@s.netic.de> writes:

> requried (vdr):
> dvbdevice.c (calls FE_SLEEP, it did not work when the FE_INIT was never 
> called, we need to FE_INIT and after that call FE_SLEEP to make it work)

Your patch has only that FE_SLEEP ? And I can't call for FE_INIT in
dvbdevice.c?

Ok, anyway I prefer vdr would be untouched, so I try to make needed
changes to driver part only. FE_SLEEP is simple enough, so integrating it
to INIT would not be so hard. 

Let's see.
  
Guido Fiala April 25, 2005, 5:02 p.m. UTC | #2
On Monday 25 April 2005 18:31, Markku Tavasti wrote:
> Guido Fiala <gfiala@s.netic.de> writes:
> > requried (vdr):
> > dvbdevice.c (calls FE_SLEEP, it did not work when the FE_INIT was never
> > called, we need to FE_INIT and after that call FE_SLEEP to make it work)
>
> Your patch has only that FE_SLEEP ? And I can't call for FE_INIT in
> dvbdevice.c?
>
> Ok, anyway I prefer vdr would be untouched, so I try to make needed
> changes to driver part only. FE_SLEEP is simple enough, so integrating it
> to INIT would not be so hard.

I tried that myself and it seemed not to work (although it should, logically), 
but i might have made something wrong. Please let me/us know if you get it 
working with the driver change alone.

Guido
  
Johannes Stezenbach April 25, 2005, 5:37 p.m. UTC | #3
On Mon, Apr 25, 2005 at 05:47:10PM +0200, Guido Fiala wrote:
> On Monday 25 April 2005 17:09, Markku Tavasti wrote:
> > Guido Fiala <gfiala@s.netic.de> writes:
> > >> > Very bad idea [tm] if you have a rev. 1.3 DVB-S card.
> > >> > The ARM will crash very often without a sat signal.
> > >
> > > Nope - need to call FE_SLEEP after init of frontend (requires driver
> > > patch), works since years stable for me.
> >
> > Pointer to patch, or patch itself would be welcome. I could not find
> > it with google (wrong keywords in search).
> 
> Ok, once again i try to collect what i did, i changed 3 files, although 2 
> would probably do:
> 
> required (dvb-kernel):
> frontend.h (make FE_SLEEP public to be able to call it via ioctl)
> 
> requried (vdr):
> dvbdevice.c (calls FE_SLEEP, it did not work when the FE_INIT was never 
> called, we need to FE_INIT and after that call FE_SLEEP to make it work)

Why not just patch vdr to close the frontend fd? The driver
will then call FE_SLEEP automatically.

Johannes
  
Carsten Koch April 25, 2005, 5:58 p.m. UTC | #4
Johannes Stezenbach wrote:
...
> Why not just patch vdr to close the frontend fd? The driver
> will then call FE_SLEEP automatically.

Good idea.
That could even become part of the SourceCaps patch by
simply closing the frontend fd when the list of sources
for a certain card is empty.
Since Klaus mentioned long ago that he will incorporate
the SourceCaps feature into standard VDR, no patching
at all would be required this way.

Carsten.
  
Oliver Endriss April 25, 2005, 6:32 p.m. UTC | #5
Johannes Stezenbach wrote:
> Why not just patch vdr to close the frontend fd? The driver
> will then call FE_SLEEP automatically.

Good point!

Even better: The frontend driver should start in sleep mode, and vdr
should not open the frontend...

Maybe a useful setup option for vdr?
'Use primary device for replay only'

Oliver
  

Patch

--- drivers/media/dvb/frontends/ves1x93.c.orig	2004-03-11 18:06:49.000000000 +0100
+++ drivers/media/dvb/frontends/ves1x93.c	2004-03-24 19:25:58.000000000 +0100
@@ -68,6 +68,7 @@ 
 
 static u8 init_1893_tab [] = {
-	0xCB, 0xa4, 0x35, 0x81, 0x2a, 0x0d, 0x55, 0xc4,
+ 	0x01, 0xa4, 0x35, 0x81, 0x2a, 0x0d, 0x55, 0xc4,
 	0x09, 0x69, 0x00, 0x86, 0x4c, 0x28, 0x7f, 0x00,
 	0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x80, 0x00, 0x31, 0xb0, 0x14, 0x00, 0xdc, 0x00,
@@ -523,14 +524,17 @@ 
 	}
 
         case FE_SLEEP:
+		printk("FE_SLEEP\n");
 		if (board_type == BOARD_SIEMENS_PCI)
 			ves1x93_writereg (i2c, 0x1f, 0x00);    /*  LNB power off  */
 		return ves1x93_writereg (i2c, 0x00, 0x08);
 
         case FE_INIT:
+		printk("FE_INIT\n");
 		return ves1x93_init (i2c);
 
 	case FE_RESET:
+		printk("FE_RESET\n");
 		return ves1x93_clr_bit (i2c);
 
 	case FE_SET_TONE: