Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OSD bugging me....



Plamen Ganev writes:
 > > They should have put 4MB SDRAM on the card instead of 2MB. The AV7110
 > > has nice graphics capabilities if one has the memory for it.
 > 
 > I guess they've reserved this for the "Power DVB/2" version of the card.
 > Maybe I should get those datasheets and write a hacker guide on how to
 > solder some more SDRAM on the board.
 



 > Ok.... let's get constructive (speaking about myself :-) I knew you were
 > under NDA, but I had to ask....
 > 
 > So, without being able to see the code, I have to guess, so if I don't get
 > it, ignore me.
 > 
 > So, from your words, I guess that you're using malloc. And I guess that
 > malloc is used somewhere else in the driver (maybe you need some extra
 > memory in the tuner routines?). What can happen is that you have a small
 > piece of allocated memory in the middle of the big memory (this can be due
 > to uneven malloc/free or even memory leakage leaving allocated blocks
 > around). Anyway, you have this total of 100K split in 49K + 2K + 49K and the
 > user application requires an OSD that would take 55K.... the firmware is
 > stuck. But if the app makes it's OSD let's say 40K then it shows up.... but
 > only until the memory is more fragmented and you end up with 29K + 2K + 29K
 > + 2K + .......

Actually, the firmware includes its own memory management routines and 
DRAM and SDRAM are handled seperately. On the SDRAM side only OSD
memory is managed dnyamically.
All other buffering for filters, CI, etc. is done in DRAM.
The part in SDRAM for MPEG2 buffering and decoding is statically
allocated after the first reset. 
So, if you delete all windows everything should be free again. Since
it looks like it isnīt there must be a memory leak or a bug in the 
allocation/deallocation.


 > This happened to me all the time in the past (remember, I am an embedded
 > systems programmer) until I decided to actually ignore malloc, and allocate
 > memory once and then use it as is (static allocation of everything).
 > 
 > So... the question is: Is it possible for the driver to lock the OSD memory
 > (let's say allocate a predefined maximum array that will be the one that is
 > used always) ...... or ....... Is there a mode where the user application
 > can allocate some memory for OSD (i.e. get the firmware to allocate it) and
 > then just show/hide it (this would allow the apllication to draw off-screen
 > and then quickly show the stuff that was pre-drawn). I guess the third
 > choice (garbadge collectors and heap defragmentation) is too much of a pain
 > to implement.

You can use the OSD_Show and OSD_Hide functions of the
VIDIOCSOSDCOMMAND ioctl to accomplish the second choice.

 
 > > Sorry, but we are bound by NDAs not to release the firmware.
 > 
 > What a pitty... but better an NDA driver than no driver at all.

Well, at least the PC side of the driver is open, which btw. includes
all the tuning except for setting PIDs and 22KHz/DiSEqC control. 
You mentioned that you did something with VLSI chips? 
If you know something about adjusting e.g. the VLSI1893 to work at low
bitrates, feel free to hack around in VES1893.c :-)



Ralph


Home | Main Index | Thread Index