linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17.3-1

Problems with packages? Post here, using [tags] of the package name.

linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17.3-1

Postby stast » Sun Jun 04, 2017 11:11 am

Upgrade of linux-odroid-c2 from 3.14.79-24 to 3.14.79-25 have broken HW accelerated decoding in kodi-c2 17.3-1.

When trying to play streams with H264 encoded video Kodi uses ffmpeg software decoding instead of AMLogic accelerated one. In kodi.log I saw the message before playback starts:
$this->bbcode_second_pass_code('', 'AML: no proper permission, please contact the device vendor. Skipping codec...')
Unfortunately I was not able to pinpoint the exact resource that Kodi process failed to access - I used strace for that but it gives me a lot of output and I couldn't pinpoint the problematic file.
I used this command for my checks:
$this->bbcode_second_pass_code('', 'sudo strace -f -e trace=file -p $(pgrep kodi.bin)')
Do you have any ideas of any what have changed in this kernel build that affected AMLogic codec libraries?

EDIT: It appears that installing alsa-lib 1.1.4.1-1 after upgrade to linux-odroid-c2 3.14.79-25 also breaks audio output in Kodi.
The tests I've performed:
- when I upgraded both linux-odroid-c2 and alsa-lib and trying to play streams Kodi froze
- then I downgraded alsa-lib and playback started working but without HW video acceleration
- then I downgraded linux-odroid-c2 it also fixed HW video acceleration
- then I upgraded alsa-lib again and it didn't break playback, HW video accel also worked

So for now I have to block upgrades for linux-odroid-c2 locally until it's fixed.
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby Taijian » Fri Jul 07, 2017 9:12 am

Unfortunately I seem to have the same problem, since 3.14.79-25 hw acceleration no longer works. 3.14.79-26 does not fix this bug, unfortunately.
Taijian
 
Posts: 8
Joined: Sat Feb 04, 2017 4:09 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby stast » Tue Jul 11, 2017 8:36 pm

Unfortunately the issue is still there as for linux-odroid-c2 3.14.79-27.

After linux kernel upgrade I tried to play media with H264 video on Kodi - it opened the URL, no playback appeared and I saw these kernel messages in dmesg output:
$this->bbcode_second_pass_code('', '
[Tue Jul 11 22:09:32 2017] vfm_map_store:rm default
[Tue Jul 11 22:09:32 2017] vfm_map_store:add default decoder ppmgr deinterlace amlvideo amvideo
[Tue Jul 11 22:09:32 2017] codec:vdec_clock_set-----2
[Tue Jul 11 22:09:32 2017] codec:vdec1_set_clk 0, 1
[Tue Jul 11 22:09:32 2017] codec:vdec_clock_set 2 to 500
[Tue Jul 11 22:09:32 2017] codec:Video stbuf alloced at 0000000060b00000, size = 15728640
[Tue Jul 11 22:09:32 2017] codec:vdec_dev_reg.mem[0x0 -- 0x0]
[Tue Jul 11 22:09:32 2017] codec:vdec base memory alloced 0000000061a00000
[Tue Jul 11 22:09:32 2017] codec:amvdec_h264 mem-addr=61a00000,buff_offset=60a00000,buf_start=61b3e000
[Tue Jul 11 22:09:32 2017] codec:H264 sysinfo: 1280x720 duration=4000, pts_outside=1,
[Tue Jul 11 22:09:32 2017] codec:sync_outside=0, use_idr_framerate=0
[Tue Jul 11 22:09:32 2017] codec:264 ucode swap area: phyaddr 000000005dc78000, cpu vaddr ffffff8009f37000
[Tue Jul 11 22:09:32 2017] codec:start load orignal firmware ...
[Tue Jul 11 22:09:32 2017] codec:loading firmware vh264_mc to vdec ram ok!
[Tue Jul 11 22:09:32 2017] codec:video first pts = 0
[Tue Jul 11 22:09:32 2017] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[Tue Jul 11 22:09:32 2017] pgd = ffffffc059981000
[Tue Jul 11 22:09:32 2017] [00000000] *pgd=000000005934c003, *pmd=0000000000000000
[Tue Jul 11 22:09:32 2017] Internal error: Oops: 96000046 [#1] PREEMPT SMP
[Tue Jul 11 22:09:32 2017] Modules linked in: fuse xt_CHECKSUM iptable_mangle tun ebtable_filter ebtables sr_mod cdrom spidev spi_gpio spi_bitbang joydev w1_gpio wire me
[Tue Jul 11 22:09:32 2017] CPU: 2 PID: 961 Comm: VideoPlayer Not tainted 3.14.79-26-ARCH #1
[Tue Jul 11 22:09:32 2017] task: ffffffc04e7e4c80 ti: ffffffc04b8a0000 task.ti: ffffffc04b8a0000
[Tue Jul 11 22:09:32 2017] PC is at __copy_from_user+0x14/0x60
[Tue Jul 11 22:09:32 2017] LR is at threadrw_write+0xe4/0x3e8
[Tue Jul 11 22:09:32 2017] pc : [<ffffffc001451634>] lr : [<ffffffc0016ecba4>] pstate: 20000145
[Tue Jul 11 22:09:32 2017] sp : ffffffc04b8a3d40
[Tue Jul 11 22:09:32 2017] x29: ffffffc04b8a3d40
[Tue Jul 11 22:09:32 2017] x28: ffffff8009f420a0

[Tue Jul 11 22:09:32 2017] x27: ffffff8009f42000
[Tue Jul 11 22:09:32 2017] x26: 0000007f180bb090

[Tue Jul 11 22:09:32 2017] x25: ffffff8009f42108
[Tue Jul 11 22:09:32 2017] x24: 0000000000000025

[Tue Jul 11 22:09:32 2017] x23: 0000000000000025
[Tue Jul 11 22:09:32 2017] x22: 0000000000000025

[Tue Jul 11 22:09:32 2017] x21: ffffff8009f420c0
[Tue Jul 11 22:09:32 2017] x20: 0000000000000000

[Tue Jul 11 22:09:32 2017] x19: 0000000000000025
[Tue Jul 11 22:09:32 2017] x18: 00000000000000e8

[Tue Jul 11 22:09:32 2017] x17: 0000007ef7e40758
[Tue Jul 11 22:09:32 2017] x16: ffffffc00119d588

[Tue Jul 11 22:09:32 2017] x15: 0000007f8afcce00
[Tue Jul 11 22:09:32 2017] x14: 0000007f8afcec48

[Tue Jul 11 22:09:32 2017] x13: 20efeb6801000000
[Tue Jul 11 22:09:32 2017] x12: 9088c17880010300

[Tue Jul 11 22:09:32 2017] x11: 0000000000000000 x10: 0101010101010101
[Tue Jul 11 22:09:32 2017] x9 : 0000009088c17880 x8 : 0000000000000040
[Tue Jul 11 22:09:32 2017] x7 : 0000008000000000 x6 : 0000000000000001
[Tue Jul 11 22:09:32 2017] x5 : ffffffc05944fc20 x4 : 0000007f180bb0b5
[Tue Jul 11 22:09:32 2017] x3 : 1f404d6701000000 x2 : 0000000000000015
[Tue Jul 11 22:09:32 2017] x1 : 0000007f180bb098 x0 : 0000000000000000
[Tue Jul 11 22:09:32 2017]
PC: 0xffffffc0014515b4:
[Tue Jul 11 22:09:32 2017] 15b4 8b010000 f2402c1f 54ffffa1 d65f03c0 00000000 00000000 00000000 aa0103e2
[Tue Jul 11 22:09:32 2017] 15d4 f1002021 54000084 f800841f f1002021 54ffffc5 b1001021 54000064 b800441f
[Tue Jul 11 22:09:32 2017] 15f4 d1001021 b1000821 54000064 7800241f d1000821 b1000421 54000044 3900001f
[Tue Jul 11 22:09:32 2017] 1614 d2800000 d65f03c0 00000000 8b020024 f1002042 540000a4 f8408423 f1002042
[Tue Jul 11 22:09:32 2017] 1634 f8008403 54ffffa5 b1001042 54000084 b8404423 d1001042 b8004403 b1000842
[Tue Jul 11 22:09:32 2017] 1654 54000084 78402423 d1000842 78002403 b1000442 54000064 39400023 39000003
[Tue Jul 11 22:09:32 2017] 1674 d2800000 d65f03c0 00000000 8b020004 f1002042 540000a4 f8408423 f1002042
[Tue Jul 11 22:09:32 2017] 1694 f8008403 54ffffa5 b1001042 54000084 b8404423 d1001042 b8004403 b1000842
[Tue Jul 11 22:09:32 2017]
LR: 0xffffffc0016ecb24:
[Tue Jul 11 22:09:32 2017] cb24 f9001bb7 b9007fbf f9003ba0 29400381 6b00003f 540005c0 b9400b82 f9400b81
[Tue Jul 11 22:09:32 2017] cb44 0a020000 f94047a3 f8607839 8b34c07a d5033abf b9400780 910003e1 9272c424
[Tue Jul 11 22:09:32 2017] cb64 aa1a03e2 11000400 b9000780 b9401b21 f9400487 6b18003f f9400320 1a989037
[Tue Jul 11 22:09:32 2017] cb84 2a1703f3 ab130042 fa473042 9a9f27e1 b4000621 aa1303e2 aa1a03e1 97f592a0
[Tue Jul 11 22:09:32 2017] cba4 aa0003e9 b4000649 29408b80 b940a361 4b000020 6b02001f 54000aa8 f9400b80
[Tue Jul 11 22:09:32 2017] cbc4 0a020021 f821781a d5033abf b940a360 7100029f 11000400 b900a360 540009ec
[Tue Jul 11 22:09:32 2017] cbe4 128001a2 93407c58 14000061 b940bf60 93407c13 34000a60 2a1303e2 6b18027f
[Tue Jul 11 22:09:32 2017] cc04 540005cb aa1503e0 940908f7 b940d362 aa0003e1 aa1503e0 0b160056 b900d376
[Tue Jul 11 22:09:32 2017]
SP: 0xffffffc04b8a3cc0:

[Tue Jul 11 22:09:32 2017] 3cc0 00000000 00000000 09f420c0 ffffff80 00000025 00000000 00000025 00000000
[Tue Jul 11 22:09:32 2017] 3ce0 00000025 00000000 09f42108 ffffff80 180bb090 0000007f 09f42000 ffffff80
[Tue Jul 11 22:09:32 2017] 3d00 09f420a0 ffffff80 4b8a3d40 ffffffc0 016ecba4 ffffffc0 4b8a3d40 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d20 01451634 ffffffc0 20000145 00000000 00000117 0000000a 59348601 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d40 4b8a3e00 ffffffc0 016e814c ffffffc0 01d20c38 ffffffc0 599bb300 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d60 01d20ff8 ffffffc0 180bb090 0000007f 00000025 00000000 00000015 00000000
[Tue Jul 11 22:09:32 2017] 3d80 00000117 00000000 00000040 00000000 01cc0000 ffffffc0 4b8a0000 ffffffc0
[Tue Jul 11 22:09:32 2017] 3da0 4b8a3db0 ffffffc0 4b8a3df0 ffffffc0 09f420e8 ffffff80 00000025 00000000
[Tue Jul 11 22:09:32 2017]
X5: 0xffffffc05944fba0:
[Tue Jul 11 22:09:32 2017] fba0 5944fba0 ffffffc0 5944fba0 ffffffc0 00000000 00000000 00000005 00000000
[Tue Jul 11 22:09:32 2017] fbc0 00000000 00000000 01f26990 ffffffc0 5944fbd8 ffffffc0 00000000 00000000
[Tue Jul 11 22:09:32 2017] fbe0 00200000 00000000 00000000 00000000 00000000 00000000 5944fbf8 ffffffc0
[Tue Jul 11 22:09:32 2017] fc00 5944fbf8 ffffffc0 5944fc08 ffffffc0 5944fc08 ffffffc0 00010001 00000000
[Tue Jul 11 22:09:32 2017] fc20 000521b6 00000000 0000005b 00000000 00000000 00000000 00000000 00000000
[Tue Jul 11 22:09:32 2017] fc40 01948280 ffffffc0 5b554000 ffffffc0 5944fd70 ffffffc0 00000000 00000000
[Tue Jul 11 22:09:32 2017] fc60 000005cf 00000000 00000001 0ff00000 00000000 00000000 5965301c 00000000
[Tue Jul 11 22:09:32 2017] fc80 06778c50 00000000 5965301c 00000000 06778c50 00000000 5965301c 00000000
[Tue Jul 11 22:09:32 2017]
X16: 0xffffffc00119d508:
[Tue Jul 11 22:09:32 2017] d508 aa1603e2 f9403a84 aa0003f3 f81f8c64 aa1403e0 97fffcf9 aa0003f5 b7f80060
[Tue Jul 11 22:09:32 2017] d528 f9401fa0 f9003a80 37080113 37000153 f9400bb3 aa1503e0 f94017f6 a941d7f4
[Tue Jul 11 22:09:32 2017] d548 a8c47bfd d65f03c0 91012280 941e42a7 3607ff13 aa1403e0 940005b0 aa1503e0
[Tue Jul 11 22:09:32 2017] d568 f9400bb3 a941d7f4 f94017f6 a8c47bfd d65f03c0 d503201f 92800115 17ffffee
[Tue Jul 11 22:09:32 2017] d588 a9bc7bfd 910003fd a901d7f4 aa0103f5 f90017f6 aa0203f6 9400772a f27ef414
[Tue Jul 11 22:09:32 2017] d5a8 54000440 f9000bb3 910103a3 aa1503e1 aa1603e2 f9403a84 aa0003f3 f81f8c64
[Tue Jul 11 22:09:32 2017] d5c8 aa1403e0 97fffd35 aa0003f5 b7f80060 f9401fa0 f9003a80 37080113 37000153
[Tue Jul 11 22:09:32 2017] d5e8 f9400bb3 aa1503e0 f94017f6 a941d7f4 a8c47bfd d65f03c0 91012280 941e427b
[Tue Jul 11 22:09:32 2017]
X29: 0xffffffc04b8a3cc0:
[Tue Jul 11 22:09:32 2017] 3cc0 00000000 00000000 09f420c0 ffffff80 00000025 00000000 00000025 00000000
[Tue Jul 11 22:09:32 2017] 3ce0 00000025 00000000 09f42108 ffffff80 180bb090 0000007f 09f42000 ffffff80
[Tue Jul 11 22:09:32 2017] 3d00 09f420a0 ffffff80 4b8a3d40 ffffffc0 016ecba4 ffffffc0 4b8a3d40 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d20 01451634 ffffffc0 20000145 00000000 00000117 0000000a 59348601 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d40 4b8a3e00 ffffffc0 016e814c ffffffc0 01d20c38 ffffffc0 599bb300 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d60 01d20ff8 ffffffc0 180bb090 0000007f 00000025 00000000 00000015 00000000
[Tue Jul 11 22:09:32 2017] 3d80 00000117 00000000 00000040 00000000 01cc0000 ffffffc0 4b8a0000 ffffffc0
[Tue Jul 11 22:09:32 2017] 3da0 4b8a3db0 ffffffc0 4b8a3df0 ffffffc0 09f420e8 ffffff80 00000025 00000000

[Tue Jul 11 22:09:32 2017] Process VideoPlayer (pid: 961, stack limit = 0xffffffc04b8a0058)
[Tue Jul 11 22:09:32 2017] Stack: (0xffffffc04b8a3d40 to 0xffffffc04b8a4000)
[Tue Jul 11 22:09:32 2017] 3d40: 4b8a3e00 ffffffc0 016e814c ffffffc0 01d20c38 ffffffc0 599bb300 ffffffc0
[Tue Jul 11 22:09:32 2017] 3d60: 01d20ff8 ffffffc0 180bb090 0000007f 00000025 00000000 00000015 00000000
[Tue Jul 11 22:09:32 2017] 3d80: 00000117 00000000 00000040 00000000 01cc0000 ffffffc0 4b8a0000 ffffffc0
[Tue Jul 11 22:09:32 2017] 3da0: 4b8a3db0 ffffffc0 4b8a3df0 ffffffc0 09f420e8 ffffff80 00000025 00000000
[Tue Jul 11 22:09:32 2017] 3dc0: 5b0777d8 ffffffc0 180bb090 0000007f 4b8a3df0 ffffffc0 011bd564 ffffffc0
[Tue Jul 11 22:09:32 2017] 3de0: 5b550dc0 ffffffc0 011b4490 ffffffc0 4b8a3e20 ffffffc0 011bd6d4 ffffffc0
[Tue Jul 11 22:09:32 2017] 3e00: 4b8a3e10 ffffffc0 016ddd50 ffffffc0 4b8a3e50 ffffffc0 0119cb48 ffffffc0
[Tue Jul 11 22:09:32 2017] 3e20: 599bb300 ffffffc0 4b8a3ec8 ffffffc0 00000025 00000000 4b8a0000 ffffffc0
[Tue Jul 11 22:09:32 2017] 3e40: 180bb090 0000007f 4b8a3ec8 ffffffc0 4b8a3e90 ffffffc0 0119d5d0 ffffffc0
[Tue Jul 11 22:09:32 2017] 3e60: 599bb301 ffffffc0 599bb300 ffffffc0 180bb090 0000007f 00000025 00000000
[Tue Jul 11 22:09:32 2017] 3e80: 80000000 00000000 0108816c ffffffc0 2f7fe560 0000007f 0108426c ffffffc0
[Tue Jul 11 22:09:32 2017] 3ea0: 00000000 00000000 00000042 00000000 ffffffff ffffffff 8afdcc3c 0000007f
[Tue Jul 11 22:09:32 2017] 3ec0: 02303000 00000000 00000000 00000000 00000042 00000000 180bb090 0000007f
[Tue Jul 11 22:09:32 2017] 3ee0: 00000025 00000000 2f7ff7d0 0000007f ffffffbb 00000000 2f7fefd0 0000007f
[Tue Jul 11 22:09:32 2017] 3f00: 00000000 00000000 00ab4bf8 00000000 00000040 00000000 88c17880 00000090
[Tue Jul 11 22:09:32 2017] 3f20: 01010101 01010101 00000000 00000000 80010300 9088c178 01000000 20efeb68
[Tue Jul 11 22:09:32 2017] 3f40: 8afcec48 0000007f 8afcce00 0000007f 00000000 00000000 f7e40758 0000007e
[Tue Jul 11 22:09:32 2017] 3f60: 000000e8 00000000 00000000 00000000 00000042 00000000 700b9040 0000007f
[Tue Jul 11 22:09:32 2017] 3f80: 00000000 00000000 700b9040 0000007f 00000001 00000000 00ab4bf8 00000000
[Tue Jul 11 22:09:32 2017] 3fa0: 00000002 00000000 000002d0 00000000 00000500 00000000 2f7fe560 0000007f
[Tue Jul 11 22:09:32 2017] 3fc0: 8afdcc28 0000007f 2f7fe520 0000007f 8afdcc3c 0000007f 80000000 00000000
[Tue Jul 11 22:09:32 2017] 3fe0: 00000042 00000000 00000040 00000000 00000000 00000000 07f3c020 00000000
[Tue Jul 11 22:09:32 2017] Call trace:
[Tue Jul 11 22:09:32 2017] [<ffffffc001451634>] __copy_from_user+0x14/0x60
[Tue Jul 11 22:09:32 2017] [<ffffffc0016e814c>] esparser_write+0x14/0x30
[Tue Jul 11 22:09:32 2017] [<ffffffc0016ddd50>] amstream_vbuf_write+0x80/0xd0
[Tue Jul 11 22:09:32 2017] [<ffffffc00119cb48>] vfs_write+0xa8/0x1e0
[Tue Jul 11 22:09:32 2017] [<ffffffc00119d5d0>] SyS_write+0x48/0xb0
[Tue Jul 11 22:09:32 2017] Code: f1002042 540000a4 f8408423 f1002042 (f8008403)
[Tue Jul 11 22:09:32 2017] codec:vdec_clock_set-----100
[Tue Jul 11 22:09:32 2017] codec:vdec1_set_clk 2, 4
[Tue Jul 11 22:09:32 2017] codec:vdec_clock_set 2 to 100
[Tue Jul 11 22:09:32 2017] codec:vdec1 video changed to 1280 x 720 24 fps clk->100MHZ
[Tue Jul 11 22:09:32 2017] ---[ end trace e1e5d76d082e828d ]---
[Tue Jul 11 22:09:32 2017] aiu i2s playback disable
[Tue Jul 11 22:09:32 2017] audio_hw_958_enable 0
[Tue Jul 11 22:09:32 2017] [aml-i2s-dai]i2s dma ffffff8000586000,phy addr 1573257216,mode 2,ch 2
[Tue Jul 11 22:09:32 2017] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[Tue Jul 11 22:09:32 2017] aml_set_spdif_clk rate
[Tue Jul 11 22:09:32 2017] divider=22,frac=13030400,SDMval=2364
[Tue Jul 11 22:09:32 2017] set normal 512 fs /4 fs
[Tue Jul 11 22:09:32 2017] iec958 mode PCM24
[Tue Jul 11 22:09:32 2017] IEC958 24bit
[Tue Jul 11 22:09:32 2017] hdmitx: audio: aout notify rate 44100
[Tue Jul 11 22:09:32 2017] hdmitx: audio: aout notify size 32
[Tue Jul 11 22:09:32 2017] 958 with i2s
[Tue Jul 11 22:09:32 2017] buf=0
[Tue Jul 11 22:09:32 2017] IEC958_mode_raw=0
[Tue Jul 11 22:09:32 2017] AESink[624]: syscall 279
[Tue Jul 11 22:09:32 2017] Code: aa0503e4 aa0603e5 aa0703e6 d4000001 (b13ffc1f)
[Tue Jul 11 22:09:32 2017] CPU: 3 PID: 624 Comm: AESink Tainted: G D 3.14.79-26-ARCH #1
[Tue Jul 11 22:09:32 2017] task: ffffffc0583fe000 ti: ffffffc0582e4000 task.ti: ffffffc0582e4000
[Tue Jul 11 22:09:32 2017] PC is at 0x7f89e11cf4
[Tue Jul 11 22:09:32 2017] LR is at 0x7f8956eb14
[Tue Jul 11 22:09:32 2017] pc : [<0000007f89e11cf4>] lr : [<0000007f8956eb14>] pstate: 60000000
[Tue Jul 11 22:09:32 2017] sp : 0000007f7bffb2b0
[Tue Jul 11 22:09:32 2017] x29: 0000007f7bffb2c0 x28: 0000000000000001
[Tue Jul 11 22:09:32 2017] x27: 0000007f7bffe130 x26: 0000007f8b46f000
[Tue Jul 11 22:09:32 2017] x25: 0000000000000002 x24: 0000000000001000
[Tue Jul 11 22:09:32 2017] x23: 00000000000001c0 x22: 0000000000000001
[Tue Jul 11 22:09:32 2017] x21: 0000007f895a2000 x20: 0000007f6c00f0e8
[Tue Jul 11 22:09:32 2017] x19: 0000000004000000 x18: 00000000000006af
[Tue Jul 11 22:09:32 2017] x17: 0000007f89e11cd0 x16: 0000007f895a3be0
[Tue Jul 11 22:09:32 2017] x15: 1205051f0c1a1c4f x14: 0000000000000015
[Tue Jul 11 22:09:32 2017] x13: 666e6f632e746e65 x12: 696c632f65736c75
[Tue Jul 11 22:09:32 2017] x11: 0101010101010101 x10: 000000000000000d
[Tue Jul 11 22:09:32 2017] x9 : ffffff80ffffffe8 x8 : 0000000000000117
[Tue Jul 11 22:09:32 2017] x7 : 000000000000007c x6 : 000000000000007c
[Tue Jul 11 22:09:32 2017] x5 : 0000000000000000 x4 : 0000007f7bffefd0
[Tue Jul 11 22:09:32 2017] x3 : 0000007f7bfff1e8 x2 : 0000000000000000
[Tue Jul 11 22:09:32 2017] x1 : 0000000000000002 x0 : 0000007f89580ce8

[Tue Jul 11 22:09:33 2017] [aml-i2s-dai]i2s dma ffffff8000586000,phy addr 1573257216,mode 2,ch 2
[Tue Jul 11 22:09:33 2017] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[Tue Jul 11 22:09:33 2017] aml_set_spdif_clk rate
[Tue Jul 11 22:09:33 2017] divider=22,frac=13030400,SDMval=2364
[Tue Jul 11 22:09:33 2017] set normal 512 fs /4 fs
[Tue Jul 11 22:09:33 2017] iec958 mode PCM24
[Tue Jul 11 22:09:33 2017] IEC958 24bit
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify rate 44100
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify size 32
[Tue Jul 11 22:09:33 2017] 958 with i2s
[Tue Jul 11 22:09:32 2017] x1 : 0000000000000002 x0 : 0000007f89580ce8

[Tue Jul 11 22:09:33 2017] [aml-i2s-dai]i2s dma ffffff8000586000,phy addr 1573257216,mode 2,ch 2
[Tue Jul 11 22:09:33 2017] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[Tue Jul 11 22:09:33 2017] aml_set_spdif_clk rate
[Tue Jul 11 22:09:33 2017] divider=22,frac=13030400,SDMval=2364
[Tue Jul 11 22:09:33 2017] set normal 512 fs /4 fs
[Tue Jul 11 22:09:33 2017] iec958 mode PCM24
[Tue Jul 11 22:09:33 2017] IEC958 24bit
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify rate 44100
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify size 32
[Tue Jul 11 22:09:33 2017] 958 with i2s
[Tue Jul 11 22:09:33 2017] [aml-i2s-dai]i2s dma ffffff8000586000,phy addr 1573257216,mode 2,ch 2
[Tue Jul 11 22:09:33 2017] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[Tue Jul 11 22:09:33 2017] aml_set_spdif_clk rate
[Tue Jul 11 22:09:33 2017] divider=22,frac=13030400,SDMval=2364
[Tue Jul 11 22:09:33 2017] set normal 512 fs /4 fs
[Tue Jul 11 22:09:33 2017] iec958 mode PCM24
[Tue Jul 11 22:09:33 2017] IEC958 24bit
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify rate 44100
[Tue Jul 11 22:09:33 2017] hdmitx: audio: aout notify size 32
[Tue Jul 11 22:09:33 2017] 958 with i2s
[Tue Jul 11 22:09:33 2017] aiu i2s playback enable
[Tue Jul 11 22:09:33 2017] audio_hw_958_enable 1
[Tue Jul 11 22:09:34 2017] switch_vpu_mem_pd: viu_vd1 OFF
[Tue Jul 11 22:09:34 2017] switch_vpu_mem_pd: afbc_dec OFF
[Tue Jul 11 22:09:34 2017] switch_vpu_mem_pd: di_post OFF
')
Kodi log says:
$this->bbcode_second_pass_code('', '
22:09:29.652 T:546266149088 NOTICE: [plugin.video.youtube] Running: YouTube (5.4.0) on Krypton (Kodi-17.3) with Python 2.7.13
22:09:29.784 T:546266149088 ERROR: /var/lib/kodi/.kodi/addons/script.module.requests/lib/requests/packages/urllib3/connectionpool.py:843: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
22:09:30.233 T:547712000016 NOTICE: VideoPlayer: Opening: https://r1---sn-mn4vg5aa-5hnz.googlevideo.com/videoplayback?pl=47&id=o-AEriFTXQb-lT0T7RNseZ1iRcLy60V9Ghg66Zug2zUG78&mn=sn-mn4vg5aa-5hnz&dur=2124.068&ipbits=0&mm=31&itag=22&ei=eTBlWablMJm31gK_1Ib4DQ&expire=1499825369&ratebypass=yes&signature=58AD64EDF5B0479210CD6489E39E9C1B6C8961BA.9BBB2522E03F9A2327E2465C29F46CCDEF3A1A77&lmt=1471162369647231&requiressl=yes&mt=1499803517&ip=2001%3A985%3Ad7f%3A1%3A6b04%3Ac22c%3A390e%3A453b&key=yt6&ms=au&mime=video%2Fmp4&mv=u&sparams=dur%2Cei%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&source=youtube
22:09:30.233 T:547712000016 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:09:30.324 T:546266149088 NOTICE: Creating InputStream
22:09:30.591 T:546266149088 NOTICE: Creating Demuxer
22:09:33.436 T:546266149088 NOTICE: Opening stream: 0 source: 256
22:09:33.436 T:546266149088 NOTICE: Creating video codec with codec id: 28
22:09:33.438 T:546266149088 ERROR: Unable to load libamplayer.so, reason: libamplayer.so: cannot open shared object file: No such file or directory
22:09:33.438 T:546266149088 WARNING: CAMLCodec::CAMLCodec libamplayer.so not found, trying libamcodec.so instead
22:09:33.440 T:546266149088 NOTICE: Creating video thread
22:09:33.441 T:546266149088 NOTICE: Opening stream: 1 source: 256
22:09:33.441 T:546257760480 NOTICE: running thread: video_thread
22:09:33.441 T:546266149088 NOTICE: Finding audio codec for: 86018
22:09:33.442 T:546266149088 NOTICE: Creating audio thread
22:09:33.443 T:545278001376 NOTICE: running thread: CVideoPlayerAudio::Process()
22:09:33.483 T:545278001376 NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
22:16:23.264 T:547541217504 ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
')
Some more details:
$this->bbcode_second_pass_code('', '
$ uname -a
Linux alarm 3.14.79-26-ARCH #1 SMP PREEMPT Tue Jul 4 20:58:48 MDT 2017 aarch64 GNU/Linux
$ pacman -Q linux-odroid-c2 kodi-c2 odroid-c2-libgl-fb alsa-lib alsa-plugins aml-libs-c2
linux-odroid-c2 3.14.79-26
kodi-c2 17.3-1
odroid-c2-libgl-fb r6p1-2
alsa-lib 1.1.4.1-1
alsa-plugins 1.1.4-1
aml-libs-c2 r9.296f39b-1
')
Hope it will give some clue. Just to remind: the issue was introduced in linux-odroid-c2 3.14.79-25. Specifically I suspect this change in PKGBUILD which hopefully fixed "#1486" but broke aml-accelerated video playback:
$this->bbcode_second_pass_code('', '
@@ -246,7 +246,7 @@ _package-headers() {
done

# remove unneeded architectures
- rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
+ rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
}

pkgname=("${pkgbase}" "${pkgbase}-headers")
')
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby stast » Tue Jul 11, 2017 10:10 pm

I've made another experiment: I've re-built aml-libs-c2 and upgraded it just after the kernel upgrade. Then I rebooted the box and started the same video on Kodi. Still the same issue :cry:
$this->bbcode_second_pass_code('', '
[Tue Jul 11 23:54:03 2017] vfm_map_store:rm default
[Tue Jul 11 23:54:03 2017] vfm_map_store:add default decoder ppmgr deinterlace amlvideo amvideo
...
[Tue Jul 11 23:54:03 2017] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[Tue Jul 11 23:54:03 2017] pgd = ffffffc05a28e000
[Tue Jul 11 23:54:03 2017] [00000000] *pgd=000000005a3ff003, *pmd=0000000000000000
[Tue Jul 11 23:54:03 2017] Internal error: Oops: 96000046 [#1] PREEMPT SMP
...
[Tue Jul 11 23:54:04 2017] Call trace:
[Tue Jul 11 23:54:04 2017] [<ffffffc001451634>] __copy_from_user+0x14/0x60
[Tue Jul 11 23:54:04 2017] [<ffffffc0016e814c>] esparser_write+0x14/0x30
[Tue Jul 11 23:54:04 2017] [<ffffffc0016ddd50>] amstream_vbuf_write+0x80/0xd0
[Tue Jul 11 23:54:04 2017] [<ffffffc00119cb48>] vfs_write+0xa8/0x1e0
[Tue Jul 11 23:54:04 2017] [<ffffffc00119d5d0>] SyS_write+0x48/0xb0
...
')
I have no other choice than to revert changes made in 3.14.79-25 and 3.14.79-25 and make a pull request.
I'm curious what is the policy of archlinuxarm in case when a pull request fixes one issue and introduces another?

EDIT: I may also try to bump Kodi version to rebuild it with a newer kernel installed. However I'm not sure if it would make sense.
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby Taijian » Fri Jul 14, 2017 2:55 pm

For what it's worth I did try rebuilding Kodi, but that didn't help. Maybe first rebuilding aml-libs-c2 and only then rebuilding Kodi would help? Gonna try that when I get home.
Taijian
 
Posts: 8
Joined: Sat Feb 04, 2017 4:09 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby Taijian » Fri Jul 14, 2017 10:11 pm

Yeah, that didn't work. So, anybody else have any ideas?
Taijian
 
Posts: 8
Joined: Sat Feb 04, 2017 4:09 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby stast » Sat Jul 15, 2017 10:37 am

Taijian: First of all - thank you for the checks you've made.
I have two other ideas.
First I'm going to build kodi-c2 with a latest Owersun's commit: https://github.com/Owersun/xbmc/commit/1aa79fd7894a2880a5f12a5c95f670b9987ebb1c. That commit may be related because the comment says: "AML: Fix bug with h264 streams requiring bitstream convert". Also I thought that gcc upgrade to v. 7.1.1 which happened in the end of May might cause the issue, but after Taijian's checks I doubt it was the case.
Second: Since the regression was introduced in linux-odroid-c2 3.14.79-25 when "arm" kernel sub-architecture was enabled - I propose to have another version of Linux kernel for ODROID-C2 where this subarch is disabled, as it was for linux-odroid-c2 3.14.79-24. And of course the package should have different name, e.g. "linux-odroid-c2-nosubarch".
After I make a test today and depending on the outcome - I will add a package request to "Package Requests" subforum.
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby Taijian » Sun Aug 20, 2017 9:20 pm

FWIW: I have gone and compiled the most recent kernel 3.14.79-27 with gcc 6.3.1-2 and voilà: HW accel works again 8-) . So it appears to be less of a kernel version issue and more of a gcc issue. Just thought I'd leave that here.
Taijian
 
Posts: 8
Joined: Sat Feb 04, 2017 4:09 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby stast » Mon Aug 28, 2017 10:03 am

@Taijian: Thank you again for this check.

Now it's clear that new GCC introduced something that breaks aml hw acceleration. It might be a bug in gcc but not necessary. It might be e.g. some memory protection mechanism that prevents aml drivers from accessing particular memory ranges. If that's the case - we can think of altering GCC compiler options for aml stuff.

I'll try to read GCC changelogs to understand what has been introduced.
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

Re: linux-odroid-c2 3.14.79-25 breaks HW accel in kodi-c2 17

Postby Holzhaus » Thu Aug 31, 2017 10:01 am

$this->bbcode_second_pass_quote('Taiian', 'F')WIW: I have gone and compiled the most recent kernel 3.14.79-27 with gcc 6.3.1-2 and voilà: HW accel works again . So it appears to be less of a kernel version issue and more of a gcc issue. Just thought I'd leave that here.


Thanks, that fixed it for me, too.
Holzhaus
 
Posts: 60
Joined: Wed Jan 21, 2015 12:40 pm

Next

Return to Packages

Who is online

Users browsing this forum: No registered users and 1 guest