rockchip-linux / kernel

BSP kernel source
Other
917 stars 1.07k forks source link

RK3288-FireFly no HDMI Sound #30

Open sghazagh opened 7 years ago

sghazagh commented 7 years ago

Hi, I just have used this repository to update my kernel and device tree for rk3288-Firefly. The only available Sound system is SPDIF and we have no sound on HDMI to select.

When I use KODI I only have to connect SPDIF and the sound is not available on HDMI. Can you please provide a patch and fix for having HDMI sound as an alternative option to SPDIF for sound system.

Thanks

sghazagh commented 7 years ago

Seriously? no one even bother to reply?!!!!!

geekerlw commented 7 years ago

you need enable sound support for hdmi, just do like this: https://github.com/geekerlw/kernel/commit/5d501039425c73d23277ff8227336748524bc652 , not complete

sghazagh commented 7 years ago

hi, thanks for reply. I tried to adjust the dtsi you have provided.

I think the patch is for Analog Audio and not HDMI!

Have you got audio on HDMI? What if I compile the whole kernel you addressed above? Does that work?

geekerlw commented 7 years ago

The whole kernel under my github is working both earphone and hdmi, the commit above also change wifi or bluetooth, I forget, see another commit https://github.com/geekerlw/kernel/commit/17c71f754f0d3101a4caaadc701cc8371027bb7b , the two commit maybe complete. Anyway, just make sure dts have current sound node, do not use my dts, I disabled rkwifi system:)

sghazagh commented 7 years ago

Unfortunately I don't have enough knowledge to manipulate Device Trees. I only can adjust simple changes. Is it possible you help me write a proper part which needs to have HDMI sound? Here is the DTS file I need to get fixed: https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-firefly.dtsi

If you fix that,I think everyone using official rockchip-linux kernel repository will get the benefit.... Hope you can have some spare time to help... !?!?!?

sghazagh commented 7 years ago

I tried to only add the changes on these two commits into the dtsi file which I mentioned the link in my last post. The system cannot boot at all!!!

By the way, other than these changes, do I need to enable anything in Kernel itself? "Rockchip I2S Device Driver" & "Rockchip SPDIF Device Driver" have already been selected but, "Rockchip PDM control driver" is not selected by default!

and also both: "ASoC support for Rockchip built-in HDMI and CODEC IC" and "ASoC support for Rockchip built-in HDMI and DP" haven't been selected. Does those make some difference?

sghazagh commented 7 years ago

I just found that there is reference to i2c5 which was not exist in my dtsi. Have added that and I could boot the machine. However, the resolution was to big! 1356x2048 !!! I just made it window by chance to see what is going on and Audio still didn't have the HDMI option!!!

I think I have to give up if no one helps :(

geekerlw commented 7 years ago

I don't know why, but you didn't give any log and the board environment you run, no log no truth

发自我的 iPhone

在 2017年8月17日,17:20,ELAR Systems notifications@github.com 写道:

I just found that there is reference to i2c5 which was not exist in my dtsi. Have added that and I could boot the machine. However, the resolution was to big! 1356x2048 !!! I just made it window by chance to see what is going on and Audio still didn't have the HDMI option!!!

I think I have to give up if no one helps :(

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

elar-systems commented 7 years ago

What do you need, I can post whatever can help. As I mentioned, I use:

What I have done:

The issue is that, I have no source for the working one and I don't know from where that guys compiled and imncluded the DTB file inside his image. So if I want any change in Device tree (LED for instance), or kernel feature, then I have no option. Thats why I need a working kernel and dtb with access to source.

Another explanation, I am using KODi starts from command. So I installed "xserver-xorg-legacy" to be able to run it from command. I disabled display-manager service to directly get into KODi.

As I mentioned all good with that guys kernel and DTB so there is nothing wrong with settings. I only do not have proper compiled kernel and device tree of mine!

geekerlw commented 7 years ago

I want to see your boot log, you can send to me a persional email, maybe you can try my kernel, I'll put it in the reply email:)

sghazagh commented 7 years ago

You mean "dmesg" for boot log, right? Ok, I will send you ... (I also sent an email right now to have my email address)

I would like to test your Kernel, but you said don't use the dtsi file as you have customized it for your use!

Many thanks for your help...

sghazagh commented 7 years ago

@geekerlw, I double checked the difference of your kernel and the one in here. I adjusted the DTS file and this time the sound got worked and I hade audio on HDMI. However, if I use the new compiled one which I adjusted, the only resolution will be 1536x2048 therefore that does not fit to my screen and oversize.

Have you any idea why the resolution changes unexpectedly? I search through "rk3288-firefly.dtsi" file and there is nothing hard-coded for display resolution. Do you know why the HDMI resolution changes when we apply your sound changes to the 4.4.77 kernel DTSI file?

Anyone else have any idea how we can fix the display resolution issue (on KODI 17.3 I'm talking)!!!

geekerlw commented 7 years ago

I don't know why. My release branch is 2066 commits behind rockchip-linux:release-4.4, I don't have enouth time to upgrade to the newest kernel.

sghazagh commented 7 years ago

So, then please someone try to patch this kernel to have sound on HDMI...