Project

General

Profile

TV Headend running on AMLogic DVB-S2 "Android TV" box

Added by Stephen Neal almost 12 years ago

Hi all - should say this is early days and I haven't confirmed reception yet - but things are looking hopeful I'd say.

After I saw a DVB-S2 "Android" set top box which used the AMLogic M3 chipset (one of the few ARM SoCs with hardware acceleration properly being integrated into XBMC and with half-way decent GPL source code publishing) I thought I'd have a look at installing TV Headend on it. The box comes with Android 4.0 (ICS) and a pretty basic and unfriendly DVBPlayer app. But it was pretty cheap (<$100) and has a pretty decent IR remote, 3 x USB ports, SD Card slot, 10/100 Ethernet, 802.11n WiFi (possibly Bluetooth - not sure), HDMI and Composite video outputs, as well as optical Toslink audio. It's about the size of a Betamax tape (if you remember them!)

Another guy has bought one and put some pictures up here : dvbdroid.info - though mine came with a UART header already soldered in J2. The box appears to be sold variously as STV-502 (which is what the board is labelled inside), HTV-S36 (which is what I bought) and STV-20 (which appears to be visually identical).

The guys at Pivos have produced a Linux buildroot including XBMC and a kernel on github, and j1nx has forked it to make it easier to install on non-Pivos boxes. I've got a fork of the Pivos and j1nx stuff at "Stephen-Neal" on github.

I haven't got my box running XBMC yet, but have just managed to get TV Headend to start, and the DVB-S2 (an AV6211 chipset as also used in some AZBoxes like the Mini Me) front-end appears to be correctly recognised. I haven't been able

I'm using a UART interface to interrupt uBoot and am loading the kernel via TFTP and the filesystem via NFS - but have also booted from SD card.

If I get TV Headend to stream tomorrow - I'll be pretty happy.

There are more and more of these boxes appearing - and they could make very neat little TV Headend+XBMC set-ups - or even just neat little TV Headend backend and recorders. (They're not much more than the price of a DVB-S2 USB adaptor)

Thought it might be of interest.


Replies (14)

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

Well - tried it with an LNB feed this morning - and no real joy.

What is odd is that when I try to add a mux manually (say a BBC FTA DVB-S transponder on Astra 28.2E) I cannot enter 22000000 as a symbol rate - I always get the red underline squiggle and it won't save (whatever number I try) I believe that my buildroot is cross compiling TVHeadend from the tvheadend github sources.

I may need to recompile my kernel with TS0-2 adaptor support as well I guess (it could be that the AVL6211 appears as an adaptor, but the transport stream doesn't get to it?)

More work to do...

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

So :

TV Headend sees my on-board DVB-S2 tuner and reports it as "AM LOGIC DVB-S2" in the Adapter Config. When I select it it correctly identifies it's tuning range. I can add Astra 28.2E and it happily goes away and scans. Some of the time it reports "tuner lock is 0" on it's UART console, sometimes "tuner lock is 1" and it appears to report a BER (Bit Error Rate I assume?)

The tuner is controlled by TVHeadend via onboard I2C from the AMLogic SoC (looking at the output of a UART console) and gets lock on some frequencies :

[ 408.376622] avl6211=>frequency=1553154,symbol_rate=27500000
[ 408.422598] puiData is 0
[ 408.422617] lock status is 0pTuner->m_uiFrequency_100kHz is 15428,pTuner->m_uiLPF_100kHz is 275
[ 408.482230] BF is 134,BW is 22206
[ 408.671869] puiData is 1
[ 408.671892] lock status is 1puiData is 262
[ 408.672938] BER=610*10-9
[ 408.676000] puiData is baeaa2
[ 408.692608] puiData is 1
[ 408.713879] puiData is 1
[ 408.732601] puiData is 1
[ 408.752597] puiData is 1
[ 408.773870] puiData is 1
[ 408.774364] puiData is 119
[ 408.774858] puiData is 0
[ 408.776531] puiData is 1
[ 408.779044] puiData is 0
[ 408.781553] puiData is 886be2
[ 408.792222] Tuner test ok !
[ 408.852623] puiData is 0
[ 408.855811] puiData is 1
[ 408.855828] lock status is 1lock success !

I think the output of the AV6211 is fed to the CPU/SoC via one of the three Transport Stream interfaces on the SoC (so although it is reported as PCI I'm not sure it really is)

Has anyone ever got TV Headend running on set-top boxes with integrated DVB-API type tuners?

Here is some more stuff from the UART logs which might be useful to those who know more than I do :


[ 5.904740] DVB: registering new adapter (amlogic-dvb)
[ 5.909959] DVB: async fifo 0 buf size 524288, flush size 262144
[ 5.914019] DVB: async fifo 1 buf size 524288, flush size 262144
[ 5.920099] init avl6211 frontend 0
[ 5.923412] HDMI irq 0
[ 5.925669] HDMI Error: Unkown HDMI Interrupt source Process_Irq
[ 5.931665] HDMI DEBUG: hdmi_task_handle [1016]
[ 5.936213] set gpio1.20 input
[ 5.939189] DVB: registering adapter 0 frontend -1520246750 (AMLOGIC DVB-S2)...

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

And here is the output when I look at /dev/dvb/adapter0

@
/dev/dvb/adapter0 # ls
demux0 demux2 dvr0 dvr2 net0 net2
demux1 dsc0 dvr1 frontend0 net1
/dev/dvb/adapter0 # tvheadend <minus>C
LERT]:START: No configuration path set, settings and configuration will not be saved
ARNING]:accesscontrol: Created default wide open access c[ 91.885432] frontend_reset is 131096
[ 91.888412] set gpio2.24 output(0)
ontrole entry
[ 92.201450] set gpio2.24 output(1)
[ 92.311413] set gpio1.21 output(0)
[ 92.311940] puiData is f
[ 92.311958] r is 0,uiDeviceID is f
[ 92.315168] AVL_DVBSx_IBase_SetPLL in
[ 92.323312] i2c i2c-0: sendbytes: NAK bailout.
[ 92.323354] I2CWrite: writereg error, errno is <minus>5
[ 92.431408] AVL_DVBSx_IBase_DownloadFirmware in
[ 92.801391] AVL_DVBSx_IBase_GetStatus in
[ 92.801861] puiData is 1
[ 92.802715] puiData is a55a
[ 92.805143] Booted !
[ 92.807740] puiData is 1000002
[ 92.810774] puiData is 100001d
[ 92.813406] Chip Ver:{1}.{0}.{2} API Ver:{1}.{0}.{6} Patch Ver:{1}.{0}.{29}
[ 92.825528] Javy --- AVL_DVBSx_ExtAV2011_Initialize!!!
[ 92.828067] puiData is c0
[ 92.828269] rsj is (rc_tuner_slave_addr_addr)2800c0
[ 92.892172] regValue is 38
[ 92.892195]
[ 92.892199] Tuner slave address = 0xC0
[ 93.142165] reg_start is c,buff is d6
[ 93.583967] puiData is 0
[ 93.586075] Initialization success !
[ 93.586100] 0xc0(ptuner),0xc(pavchip)=========================demod init

NFO]:dvb: Found adapter /dev/dvb/adapter0 (AMLOGIC DVB-S2) via PCI
NFO]:dvr: Creating new configuration ''
ARNING]:dvr: Output directory for video recording is not yet configured for DVR configuration "". Defaulting to to "/". This can be changed from the web user interface.
NFO]:CSA: Using 32bit parallel descrambling
OTICE]:START: HTS Tvheadend version started, running as PID:257 UID:0 GID:0, settings located in 'No settings dir', dataroot: /usr/share/tvheadend
NFO]:AVAHI: Service 'Tvheadend' successfully established.
[NOTICE]:STOP: Exiting HTS Tvheadend
/dev/dvb/adapter0 # [ 210.791402] set gpio1.23 output(0)
@

I can compare much of this to the UART output of the same box running a DVBPlayer application under Android (which seems to use the same database structure as the Dreambox for its transponder database files...) and it all looks broadly similar - so I'm pretty hopeful this is going to lead somewhere?

One thing I've noticed is that my TV Headend build doesn't appear to have a version number, and neither does it let me enter Symbol Rates when I add a mux - I can do everything else (Frequency, DVB-S/S2 type, QPSK etc, FEC, H/V etc. all have drop downs or correct red squiggle warnings - but my Symbol Rate always gives me a red squiggle)

There are other issues with my environment though - so possibly it is that?

(For some reason it won't let me enclose this sequence with "at" signs to flag i)t as code - and I've had to replace minus/hyphen with <minus> to avoid strike-through

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

Hmm - looks as if the AVL 6211 driver I have has been hacked from a DVB-T driver - and not particularly well. The driver code contains the following :

.info = {
.name = "AMLOGIC DVB-S2",
.type = FE_QPSK,
.frequency_min = 850000,
.frequency_max = 2300000,
.frequency_stepsize = 0,
.frequency_tolerance = 0,
.caps =
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
FE_CAN_QPSK | FE_CAN_QAM_16 |
FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
FE_CAN_TRANSMISSION_MODE_AUTO |
FE_CAN_GUARD_INTERVAL_AUTO |
FE_CAN_HIERARCHY_AUTO |
FE_CAN_RECOVER |
FE_CAN_MUTE_TS
},

No Symbol rate min or max - which is presumably why TV Headend won't let me enter any symbolrates - as it thinks none will be valid? Also - where did the QAM 16 / 64 / GUARD INTERVAL come from for DVB-S/S2 - aren't they DVB-T or C? No S2 modulation support flagged etc.

It looks as if my box supports MPEG2 demuxing with Video, Audio, Subtitle PIDs etc. Not sure if it will do both this and raw or if I have to force demux? Also it appears that the chipset supports Transport Stream via Parallel, Parallel + Parity or Serial - does TV Headend get involved at this low level?

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

There's also lots of stuff in the driver to do with Blindscanning.

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Stephen Neal almost 12 years ago

Have updated AVL driver to include max and min symbolrates and now TV Headend lets me enter valid symbol rates when manually adding muxes. Will update when I manage to connect to an LNB feed.

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Digi Hoe over 11 years ago

How have you got on with this?

I too would like tvheadend to run un such box, but it seems hard. I have found a guy called Mikrohard that has made a port that he says should work with XBMC, I have however not got it to work :(

Here's his forks and sources:

https://github.com/innbox/tvheadend/tree/tvheadend-android

And his service script that should be run within XBMC:

https://github.com/innbox/service.multimedia.tvheadend

The original posts comes from the xda forums:

http://forum.xda-developers.com/showthread.php?t=2171412

I have no good knowleadge of linux/android/cross-compiling but I do think some guys around this forum might find this useful.

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Yaroslav N over 10 years ago

Stephen Neal wrote:

Have updated AVL driver to include max and min symbolrates and now TV Headend lets me enter valid symbol rates when manually adding muxes. Will update when I manage to connect to an LNB feed.

Hello Stephen
I have the same problem. Please tell us in detail how you solved it?

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Gennady NoNaMe almost 10 years ago

hi all
is pleased to announce that there was a man who did it! on this assembly there is a driver for the DEMO: AVL6211 TUNER: AV2012
openelec-g18ref_dvbs2_vitmod_1.1
service.multimedia.tvheadend-3.4_dvbcsa
Full mux reception Off

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Digi Hoe almost 10 years ago

Too bad the sources are not released also. Would like to see the drivers for M3 devices too... ;)

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Gennady NoNaMe almost 10 years ago

OpenELEC-G18REF dvbs2 vitmod 1.2 - for VS-IP015 based OpenELEC 4.2.1 (Gotham 13.2), install through recovery

Changes in this version:
- Remote working mother
- Working wi-fi (activated in Annex Openelec)
- Mac address no longer flies
- Added signal levels / quality (still needs to be calibrated)
- Added support for CEC (on my tv Sony is working on the navigation menu buttons do not work OK, exit, as on other TV do not know)
- Optimization for HD channels
- By default skin Aeon Nox c PVR additions sat for parts on home skin can switch settings

-------------------------------------------------- ------
Installation on sd card
-------------------------------------------------- ------
1. sews through native bootloader recovery
2. Download the image OpenElec VITMOD v.1.2 SDCard and a program for his record on sd card
3. Unpack the archive with the image and write it (oe_vitmod_1.2.img) on the sd card through the program Win32DiskImager (size sd card should be 2Gb or more)
Warning! All information on the sd card will be overwritten!
4. Turn off the box, insert the sd card with the image, turn on the power, OpenElec will load automatically
Without sd card will boot android from internal flash memory

[[http://xbmc.ru/forum/showthread.php?t=4691]]

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by Smart HD almost 10 years ago

Can you supply us the sourcecode or a binary for Linux 2.6.34 (used on Amlogic Meson 3)?

RE: TV Headend running on AMLogic DVB-S2 "Android TV" box - Added by mike her about 7 years ago

Greetings could someone work these boxes with tvheadend?

    (1-14/14)