Page 1 of 4

Samy Going Open source (sh4 A7/8/9)

Posted: Sat Feb 16, 2013 1:38 pm
by tom_van
Hi all,

Samsung released last update for my LExxA956 four years ago and many problems left unsolved. Do we have an alternative?

Recently I spotted Duckbox project. This is an open source software collection for satellite receivers with digital TV chips from STMicroelectronics based on sh4.
The most interesting part of Duckbox project is Havana player2. This is an open source multimedia player from STMicroelectronics (producer of dtv chip). Original Samsung sw includes STAPI based version 1 of this player and uses it for both TV and multimedia playing. Version 2 is much better integrated into linux and can play more input formats. And hopefully is much better debugged after several years of using on sat boxes.

Can we port this software to Samsung TV?

LExxA956 is not a sat box, is has only DVB-T tuner. On the other side, TV comprises hardware that sat boxes do not: FRC (frame rate converter), FBE2 (picture enhancer, commercially called DNIe) and local dimming control. There is also secondary CPU for analog TV: MTK8226

I started the experiment and after couple of weeks I've got basically working software:
  • linux-sh4- loaded over nfs and with nfs root
    driver for dvb-t tuner s5h1432
    sw for initialization of FRC, FBE and local dimming
    basic communication with MTK8226
    havana player2 191
    lirc config
Enigma 2 is primarily for sat. It's not by far ideal for a TV, but it 's doing its job - can scan DVB-T channels and tune them.
I don't like media player in enigma. Much better working is command line eplayer3 ;)
I also tested XBMC - but it is very veeryyy slooooow on 266MHz CPU and hangs the graphic soon.

Experimental sw solves problems with H264 decoder

Lot of work remains to get an usable state. Any volunteers to help? Any ideas?

Edit: wiki page ... A7/8/9_SH4

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Thu Feb 21, 2013 4:44 pm
by marcjero
Hi Tom,

that's very interesting of course.

What is working or not ? I understand enigma is the standard TV interface and havana is used for multimedia ?
I'm afraid that replacing the whole Samsung stuff will be very complicated.

Does the network work ? What about the remote control ? Does it support DLNA ?

I can be volunteer but I'm lacking of ideas :roll:

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Thu Feb 21, 2013 10:06 pm
by tom_van
Havana player is a backend. Conforms v4l2 / dvb api and is used for both media and dvb-t
Enigma is here used mostly as gui / frontend

upnp and DLNA support is question of software. There are some plugins for enigma to act as DLNA player and renderer
- I have not tested them.
I'm still loking for more suitable frontend - nice and quick. Now trying to port

Networking works (whole system is on nfs share).
Infrared RC input is decoded by lircd. Using micom input would be quicker, this is another TODO.
But lircd can decode almost any remote controller, not only samsung's...

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Fri Feb 22, 2013 10:02 pm
by marcjero
Ok I understand ! So backend is working fine and you "just" need to provide a good UI and fix the remote control right ?

What is wrong with enigma ? It's doing the job you said. Did you try to playback mkv files ? Is playback smooth ?

Isn't it possible to just customize enigma ? Showtime is only for media playback so enigma would be used for TV right ?

If you can share your nfs image I can take a look at this as well. But I will need a short howto to start it. Is it possible to boostrap nfs using an usb pendrive ?

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Sat Feb 23, 2013 8:44 am
by tom_van
enigma is written in python and TV has CPU clocked only on 266 MHz. So initialization takes longer then it should.
Also there is lot of code intended for satellite. Enigma2 would by good choice for TV with sat tuner.

Full HD mkv plays well on cmd line eplayer3 (this is direct interface to Havana player in kernel module).
Enigma has problems with some formats - even if it calls the same API.

I mean showtime as the only app - if it will be fast enough. There is no problem with adding dvb-t reception - this is just short code.

I'll would be happy to share image. For the moment the only way to load it is U-Boot command (this is similar for both nfs and usb disk). So Ex-link cable is the must. Do you have one?
You have A865 - so there is no local dimming: We need add control of backlight. It should be simple.

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Sat Feb 23, 2013 2:46 pm
by marcjero
Yes I own A856 but I don't have the cable you mention.

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Sat Feb 23, 2013 2:49 pm
by tom_van
Make one. No cable, no hacking ;)

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Mon Feb 25, 2013 2:16 pm
by marcjero
ok db9 connector ordered...

Did you see the configure file for Raspberry Pi ? Could be a good start to build a sh4 version of showtime. Did you already build it ?

UPDATE : I found that the neutrinohd frontend is written in C++ and supports DLNA. Enigma 1 is 100% C++ as well but older. Threre are tons of forks of these players and demos on youtube. Could easier to use them than integrating showtime ?

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Tue Mar 05, 2013 10:38 am
by tom_van
Good news with showtime: graphic user interface is working. It was not easy - showtime normally uses 3D OpenGL. I tried with stgles library from duckbox project. The library is fake GL ES which "renders" only rectangles with 2D accelerator and DirectFB. Unfortunately it implemented only minimum needed for XBMC. Using with showtime required substantial rework of library.

Finally the result is VERY NICE and speed is so-so... let say acceptable. One can't expect wonders from 266MHz CPU. Speed of animated GUI is worse than simple GUI of enigma and neutrino, however much faster than XBMC. There are some graphic imperfections due to lack or real 3D renderer, just minor issues.

I'm moving to integrating havana player. It does not fit to showtime's video player conception, I'd better discuss it with showtime author.
Testing version can play from file, http and upnp - still many issues to resolve.

NeutrinoHD: yes, I tested it and the player worked well. But actual version has no DVB-T support. There is a patched version with DVB-T, but much older than the one ported to sh4/havana and not easy to merge.
To be honest I'm afraid of the number of enigma (and neutrino) forks. Each group has its own one. And tons of patches everywhere. I feel little bit disoriented.
On the other hand showtime has ONE (!!!) author and code is clean and portable.

Re: Samy Going Open source (sh4 A7/8/9)

Posted: Tue Mar 05, 2013 10:50 pm
by marcjero
Again very impressive work Tom.
I did have time to prepare the cable but it's coming. :oops:

How do you plan to support DVB-T in showtime ?