11-30-2018, 08:12 AM
(This post was last modified: 11-30-2018, 08:26 AM by fosf0r.
Edit Reason: another fix
)
4.4.154 has broken HDMI sound, it's being looked into. I suspect it's the synopsys bridge driver. This weekend I was going to bring-forward the 4.4.138 version and see if it works in 4.4.154.
4.4.138-1100 is the best version (in my opinion) to switch to.
Then you'd need to rebuild the DTB to enable rkvdec by using dtedit.
https://forum.pine64.org/showthread.php?tid=6896
The idea is in the second post but I only spoke about it offhandedly and I didn't include a step-by-step guide.
1) You really gotta backup your current DTB first. Run 'dtedit' once and then cancel out of the editor, that will generate /boot/dtb-4.4.x-ayufan-whatever. Then copy that file again so you have another one, call it "/boot/dtb-4.4.x-WORKING" or something.
2) Backup your current /boot/extlinux/extlinux.conf
3) Make sure you have a way to mount your root filesystem in case something gets messed up, so you can rearrange extlinux.conf or whatever, if it breaks. It's partition # 7.
4) Edit /boot/dts-4.4.x-ayufan-whatever (notice the "s" in "dts" this time, not "b"). This is the script file that gets compiled to create the "dtb" version.
5) Find "rkvdec"'s braced area and set its status = "okay" like other devices are. It's set to "disabled"
6) dtc /boot/dts-4.4.x-ayufan-whatever > /boot/dtb-4.4.x-RKVDEC
7) Edit /boot/extlinux/extlinux.conf and if you have a 'devicetreedir' line, delete it and put 'fdt /boot/dtb-4-4.x-RKVDEC' in its place. If you already have a 'fdt' line, update it to reflect your new DTB.
8) Reboot.
If something goes wrong, fix extlinux.conf to point at the "WORKING" DTB you backed up before by using the 'fdt' parameter.
Or you could even use 'devicetreedir /boot/dtbs/4.4.x-ayufan-whatever/' if your system has /boot/dtbs/ tree available
* I was also able to enable "rga" and "vpu" and it didn't blow up on me, and those will become useful later.
* Now rkmpv should play videos great. If it doesn't, it may be the LD_LIBRARY_PATH at the beginning of the rkmpv script. whereis rkmpv, edit it. (On mine, I didn't need /gbm at the end of my ld library path in the rkmpv script; my stuff is installed one dir back, so I just delete that off the end. My system is a hodgepodge.).
* If you use 'mpv' yourself you'd have to tell it everything on the command line every time:
mpv --vo=gpu --gpu-context=drm --hwdec=rkmpp filename.mkv
To get kodi to work with rkvdec, you probably have to build kodi with external ffmpeg (ffmpeg with rkmpp enabled, and libmpp installed).
I think ayufan's own ffmpeg is already that way, but I think you have to have the -dev version while building kodi, and I think pre-made kodi packages always use internal ffmpeg which means no rkvdec.
I'm not sure about all of that part because I haven't rebuilt kodi yet, I'm going to be doing that tomorrow.
I just know my kodi hasn't changed at all while ffmpeg and mpv has changed to perfect playback.
4.4.138-1100 is the best version (in my opinion) to switch to.
Then you'd need to rebuild the DTB to enable rkvdec by using dtedit.
https://forum.pine64.org/showthread.php?tid=6896
The idea is in the second post but I only spoke about it offhandedly and I didn't include a step-by-step guide.
1) You really gotta backup your current DTB first. Run 'dtedit' once and then cancel out of the editor, that will generate /boot/dtb-4.4.x-ayufan-whatever. Then copy that file again so you have another one, call it "/boot/dtb-4.4.x-WORKING" or something.
2) Backup your current /boot/extlinux/extlinux.conf
3) Make sure you have a way to mount your root filesystem in case something gets messed up, so you can rearrange extlinux.conf or whatever, if it breaks. It's partition # 7.
4) Edit /boot/dts-4.4.x-ayufan-whatever (notice the "s" in "dts" this time, not "b"). This is the script file that gets compiled to create the "dtb" version.
5) Find "rkvdec"'s braced area and set its status = "okay" like other devices are. It's set to "disabled"
6) dtc /boot/dts-4.4.x-ayufan-whatever > /boot/dtb-4.4.x-RKVDEC
7) Edit /boot/extlinux/extlinux.conf and if you have a 'devicetreedir' line, delete it and put 'fdt /boot/dtb-4-4.x-RKVDEC' in its place. If you already have a 'fdt' line, update it to reflect your new DTB.
8) Reboot.
If something goes wrong, fix extlinux.conf to point at the "WORKING" DTB you backed up before by using the 'fdt' parameter.
Or you could even use 'devicetreedir /boot/dtbs/4.4.x-ayufan-whatever/' if your system has /boot/dtbs/ tree available
* I was also able to enable "rga" and "vpu" and it didn't blow up on me, and those will become useful later.
* Now rkmpv should play videos great. If it doesn't, it may be the LD_LIBRARY_PATH at the beginning of the rkmpv script. whereis rkmpv, edit it. (On mine, I didn't need /gbm at the end of my ld library path in the rkmpv script; my stuff is installed one dir back, so I just delete that off the end. My system is a hodgepodge.).
* If you use 'mpv' yourself you'd have to tell it everything on the command line every time:
mpv --vo=gpu --gpu-context=drm --hwdec=rkmpp filename.mkv
To get kodi to work with rkvdec, you probably have to build kodi with external ffmpeg (ffmpeg with rkmpp enabled, and libmpp installed).
I think ayufan's own ffmpeg is already that way, but I think you have to have the -dev version while building kodi, and I think pre-made kodi packages always use internal ffmpeg which means no rkvdec.
I'm not sure about all of that part because I haven't rebuilt kodi yet, I'm going to be doing that tomorrow.
I just know my kodi hasn't changed at all while ffmpeg and mpv has changed to perfect playback.