Author: swordfish6975

Openelec Build for OPI PC and 2 now with HW decoding

  [Copy link]
Published in 2016-4-6 19:40:29 | Show all floors
@slaine: maybe someone will create a fork based on LibreELEC,
but, the main problem of "OpenELEC for OrangePi" is not OpenELEC but the old crappy kernel, video and graphics drivers.

There are some other reasons to create this fork, but don't expect that is "help with OrangePi".
Orange PI PC

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2016-4-7 02:19:55 | Show all floors
slaine replied at 2016-4-6 07:55
Guys from openelec founded new project - LibreElec. Maybe they should help with OrangePi.

Main help could come only from Allwinner - when they will release HDMI specs, PRCM registers specs and possibly also VPU specs.

7

threads

81

posts

317

credits

Intermediate member

Rank: 3Rank: 3

credits
317
Published in 2016-4-7 02:50:33 | Show all floors
jernej replied at 2016-4-6 19:19
Main help could come only from Allwinner - when they will release HDMI specs, PRCM registers specs ...

In the meantime - a BIG THANK YOU for making Openelec on OPI ONE such a pleasant experience !

0

threads

8

posts

60

credits

Registered member

Rank: 2

credits
60
Published in 2016-4-7 03:49:48 | Show all floors
Edited by tomaszd at 2016-4-7 03:53

Hi jernej, I'm having trouble with something that works perfectly fine in Armbian and doesn't in the latest OpenELEC fork I've compiled, which uses the same kernel, but different configuration.

I have a DVB-T tuner:
  1. 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle
Copy code
It works fine in Armbian after downloading correct firmware and not doing anything else, but it fails in OpenELEC:

1) OpenELEC loads the dvb-usb-af9035 module (which I can't even find anywhere, there's af9005, af9013, af9015, but not af9035...), which in turn doesn't register the DVB adapter frontend (device seems to be correctly loaded, but is invisible to all applications, "registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))..." is a lie) and some other errors occur.

Armbian loads the dvb-usb-it913x kernel module, not dvb-usb-af9035. Compare dmesg in Armbian:
  1. [ 447.566648] ehci_irq: highspeed device connect
  2. [ 447.840110] usb 4-1: new high-speed USB device number 3 using sunxi-ehci
  3. [ 447.997207] it913x: Chip Version=02 Chip Type=9135
  4. [ 447.999177] it913x: Remote HID mode NOT SUPPORTED
  5. [ 447.999679] it913x: Dual mode=0 Tuner Type=0
  6. [ 447.999700] it913x: Unknown tuner ID applying default 0x60
  7. [ 448.001075] dvb-usb: found a 'ITE 9135(9006) Generic' in cold state, will try to load a firmware
  8. [ 448.001356] dvb-usb: downloading firmware from file 'dvb-usb-it9135-02.fw'
  9. [ 448.001801] it913x: FRM Starting Firmware Download
  10. [ 448.231943] it913x: FRM Firmware Download Completed - Resetting Device
  11. [ 448.271446] it913x: Chip Version=02 Chip Type=9135
  12. [ 448.271930] it913x: Firmware Version 52953344
  13. [ 448.350607] dvb-usb: found a 'ITE 9135(9006) Generic' in warm state.
  14. [ 448.351414] dvb-usb: will use the device's hardware PID filter (table count: 31).
  15. [ 448.351893] DVB: registering new adapter (ITE 9135(9006) Generic)
  16. [ 448.353438] it913x-fe: ADF table value :00
  17. [ 448.357684] it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 01
  18. [ 448.393447] it913x-fe: Tuner LNA type :60
  19. [ 448.644963] DVB: registering adapter 0 frontend 0 (ITE 9135(9006) Generic_1)...
  20. [ 448.645545] dvb-usb: ITE 9135(9006) Generic successfully initialized and connected.
  21. [ 448.645572] it913x: DEV registering device driver
  22. [ 448.651938] generic-usb 0003:048D:9006.0007: input,hidraw0: USB HID v1.01 Keyboard [ITE Technologies, Inc. USB Deivce] on usb-sunxi-ehci-1/input1
Copy code
with OpenELEC (when it works, because it doesn't always initialize):
  1. [  278.010049] usb 3-1.1.2: new high-speed USB device number 13 using sunxi-ehci
  2. [  278.125320] it913x: DEV it913x Error
  3. [  278.127296] usb 3-1.1.2: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135
  4. [  278.127661] usb 3-1.1.2: dvb_usb_v2: found a 'ITE 9135(9006) Generic' in cold state
  5. [  278.197356] usb 3-1.1.2: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
  6. [  278.297406] usb 3-1.1.2: dvb_usb_af9035: firmware version=3.40.1.0
  7. [  278.297440] usb 3-1.1.2: dvb_usb_v2: found a 'ITE 9135(9006) Generic' in warm state
  8. [  278.298895] usb 3-1.1.2: dvb_usb_af9035: [0] overriding tuner from 00 to 60
  9. [  278.300725] usb 3-1.1.2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
  10. [  278.300790] DVB: registering new adapter (ITE 9135(9006) Generic)
  11. [  278.307280] af9033 1-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0
  12. [  278.307298] af9033 1-0038: Afatech AF9033 successfully attached
  13. [  278.307340] usb 3-1.1.2: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))...
  14. [  278.312042] it913x: probe of 1-001c failed with error -22
  15. [  278.316963] generic-usb 0003:048D:9006.000A: input,hidraw0: USB HID v1.01 Keyboard [ITE Technologies, Inc. USB Deivce] on usb-sunxi-ehci-1.1.2/input1
Copy code
It looks like it tries loading both modules at the same time, but even if I unload and/or blacklist dvb-usb-af9035, it913x still fails.

Important configuration differences between Armbian and your OpenELEC fork, your fork has:
  1. CONFIG_DVB_NET=y
  2. # CONFIG_DVB_DYNAMIC_MINORS is not set
Copy code
Armbian:
  1. # CONFIG_DVB_NET is not set
  2. CONFIG_DVB_DYNAMIC_MINORS=y
Copy code
While I can just swap these around before I try building your fork again, I don't know how to deal with the second issue:

2) OpenELEC comes with older firmware dvb-usb-it9135-02.fw (3.40.1.0), my tuner needs 3.6.0.0, which is available here:
  1. wget -c http://www.ite.com.tw/uploads/firmware/v3.6.0.0/dvb-usb-it9135.zip
  2. unzip dvb-usb-it9135.zip
  3. dd if=dvb-usb-it9135.fw ibs=1 skip=12866 count=5817 of=dvb-usb-it9135-02.fw
Copy code
How do I swap the firmware before the image gets built?

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2016-4-8 21:11:53 | Show all floors
tomaszd replied at 2016-4-6 20:49
Hi jernej, I'm having trouble with something that works perfectly fine in Armbian and doesn't in the ...

I don't have any DVB dongle, so I can give you just some basic pointers so you can fix it and possibly make a pull request.

1) This fork is using http://git.linuxtv.org/media_build.git at commit 66f4030 for backported drivers. Not sure how old is this, but I believe the code is from year 2014. AFAIK, Armbian doesn't use backported media drivers.
2) DVB firmware comes directly from https://github.com/OpenELEC/dvb-firmware.git If you would want inject or change something, this repo should be cloned and adjusted. Then you need to fix the repo address here: packages/linux-firmware/dvb-firmware/package.mk

0

threads

8

posts

60

credits

Registered member

Rank: 2

credits
60
Published in 2016-4-8 23:17:38 | Show all floors
Backported drivers mess everything up, I've noticed at least one patch fails to apply, new drivers conflict with old ones (af9035 and it913x both detect 048d:9006, briefly fight for it and both fail), the DVB stack and drivers that come with Armbian's kernel works fine in my case.

I have repackaged the dvb-firmware source with the firmware I needed and disabled backported drivers.

OrangePi PC image and add-ons for 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle

https://mega.nz/#F!QZdBVYyC!DBRDQTBpPMFzkxnSklHtCw

A powered USB hub is strongly recommended, the dongle will need to be unplugged and plugged in each boot and the pvr.hts TV addon froze the system at least once for me, you need a strong TV signal...

All in all a waste of time for any sort of "production" home entertainment system, I'd have to simulate unplugging and plugging the dongle in each boot... but it was fun to figure it out ;)

0

threads

19

posts

518

credits

Senior member

Rank: 4

credits
518
Published in 2016-4-9 17:17:59 | Show all floors
hi, how to off blink green led in last img(OpenELEC-H3.OPiPC.arm-6.95.1.img) or off all leds, script.fex?

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2016-4-9 17:25:43 | Show all floors
c0013r replied at 2016-4-9 10:17
hi, how to off blink green led in last img(OpenELEC-H3.OPiPC.arm-6.95.1.img) or off all leds, script ...

In this case image name doesn't help, because there is no date/commit number. However, the only image which has blinking LED is test image with newer version of Allwinner's kernel. I didn't put any effort to figure out why it blink. I recommend that you try latest image from "Latest prebuild image" topic, or just try to disable all leds from fex file (deleting LED section should do)

0

threads

19

posts

518

credits

Senior member

Rank: 4

credits
518
Published in 2016-4-9 19:16:15 | Show all floors
jernej replied at 2016-4-9 17:25
In this case image name doesn't help, because there is no date/commit number. However, the only im ...

this image  24/03/2016
leds blink off - delete [leds_para], after edit - green led ON, but does not blink. http://linux-sunxi.org/Fex_Guide no work
And have 1 bug this build: power button/menu/IR don't power off orange pi - all suspend off(sleep) , return to work after press power button.
What last buid without "power off" bugs, 22/03/2016?

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2016-4-9 19:55:35 | Show all floors
c0013r replied at 2016-4-9 12:16
this image  24/03/2016
leds blink off - delete [leds_para], after edit - green led ON, but does no ...

As it already stated in FAQ sleep/power button functionality newer worked and it doesn't work. I already spent too much time on this.

Green led is by design used as power on indicator and red as suspend (but it doesn't work correctly). If you want to change this, you have to change the source and build your own image.

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list