[Xperia Arc Android Development] L3RAT:
Semc_HDMI

Hi, I'm no Dev, but I'm willing to learn some things ;) So far I was using trial and error method with no luck, but it will not stop from trying :cool:

So far I have noticed that the problem is much more complex, than other issues, since we lack both kernel implementation and configuration audio/video for newer HALs...

Most of hdmi related files in our repo contains stock coding for HDMI, so I'm only going to point out those, which was significantly updated (note: I assumed some of them contain all neccesary code, while other stuff was changed and can not promise I didn't missed some important change).

So, where shall we begin:

1. First of all, since custom ICS compiled from Sony Ericsson's 4.1.C.0.7 Official Kernel Sources, provides HDMI usability, we have all neccesary files, but we must have only missed some A/V routing...

2. According to 4.1.C.0.7 Xperia 2011 Official Kernel Sources (board-msm7x30.c & board-semc_mogami.c) our devices use ADV7520 chip, which driver is already in LX repo and seems to contain necessary on/off instructions, but can not operate, while we lack

hdmi_common.h

on which it depands. Moreover we have Sil9024a chip and actually we lack its driver in LX sources:

hdmi_sii9024a.c

&

sii9024.h

And it would be nice to also add missing:

hdmi_common.c

, which contains tables with resolutions for HDMI.

3. Furthermore: our board-msm7x30.c seems to contain necessary init code for i2c & gpio, but board-semc_mogami.c includes only struct of msm_mi2s_resources, but lacks lots of code like: struck of sii9024_gpio_config_data_enable/diasble, hdmi_sii9024_power "on" flag & some for .setchippower on Sil9024 chip and define 720p resolution.

4. After initial contribution of msm-2.6.38, lot of things have changed its placing, like: HDMI_CLK from devices-msm7x30.c is now stored in clock-7x30.c as P_HDMI_CLOCK.

HDMI_CLK is used by mdp4_dtv.c and I'm not sure if it still have access to it...

5. Also it looks like Sony's hdmi_msm.c is highly modified & trimmed down (x2) version of original hdmi_msm.c, which we have in our sources. That could be the place, where they have hidden all of their modifications...

6. Another part of code is in viamode.h. it structs CEA_HDMI_Modes, which referes to table with resolutions in viamode.c (720p & 1080p), while in hw.c we can find *viafb_get_cea_mode_tbl_pointer, which search through this table. Unfortunately all of that code is missing in LX sources: viamode.h, viamode.c & hw.c. Moreover there was some change called viafb: modetable conversion, which I quite don't understand, so am not able to confirm whether its messing something up or not...

7. While searching through hda_eld.c, I have found some interesting change in file history: ALSA: hda - hide HDMI/ELD printks unless snd.debug=2. Maybe by reverting it or setting this snd.debug=2, we might finally got some logs?

8. drivers/video/Kconfig lacks some vital coding for configuration of all HDMI virtual devices. All of it is here: 4.1.C.0.7/kernel/drivers/video/Kconfig: FB_MSM_HDMI_SII_EXTERNAL_720P, FB_MSM_HDMI_COMMON, FB_MSM_HDMI_ADV7520_PANEL, FB_MSM_HDMI_ADV7520_PANEL_HDCP_SUPPORT, FB_MSM_HDMI_MSM_PANEL, FB_MSM_HDMI_MSM_PANEL_DVI_SUPPORT, FB_MSM_HDMI_MSM_PANEL_HDCP_SUPPORT & FB_MSM_HDMI_SII9024A_PANEL.

9. In LX sound/pci/hda/Kconfig we configure one SND_HDA_CODEC_HDMI to handle everything, while in Sony's sources there was 4 of them: SND_HDA_CODEC_ATIHDMI, SND_HDA_CODEC_NVHDMI, SND_HDA_CODEC_INTELHDMI & SND_HDA_ELD. Furthermore, there are some missing patches for those:

patch_intelhdmi.c

,

patch_nvhdmi.c

&

patch_atihdmi.c

. Also intel_hdmi.c has been modified, but seems to have all of original intel_hdmi.c functionality. LX hda_codec.c looks fine to me.

10. Another insteresting thing, I have found in virtuoso.c, which was splitted by its author, back in 2009, but in Sony's code its still unsplitted. Wierd, huh? So in splitted version in LX sources HDMI is handled by xonar.h, xonar_hdmi.c & xonar_lib.c

11. Next thing: we lack

msm_fb_panel.h

, which defines HDMI_Panel for msm_fb_panel.c -> what is wierd that is dead end :confused:, since there is empty entry...

case TV_PANEL:
snprintf(dev_name, sizeof(dev_name), "tvenc");
break;

case HDMI_PANEL:
case LCDC_PANEL:
snprintf(dev_name, sizeof(dev_name), "lcdc");
break;

Nevertheless, we do have htc-msm-2-6-32-drivers-video-msm-hdmi, so we might be able to recreate that path with hdmi_lcdc, which is attached to adv7520, right?

12. L_HDMI_CLK from clock-7x30.h is called L_7X30_HDMI_CLK in LX clock-7x30.h. That won't mess up references? Also, as I mentioned before clock-7x30.c is now handling more things and some things have changed in its structure.

13. Our devides are qdsp5v2 or qdsp6v2? I got a little confused about that., but if qdsp6v2, there are some files missing: snddev_data.c, q6afe.c & apr_audio.h.

14. In the end, we shall add 2 more entries:

-> in defconfig

CONFIG_FB_MSM_HDMI_SII9024A_PANEL=y

-> in build.prop

com.qc.hdmi_out=true

I'm sure I have missed some important things, but consider it as a startup for restoring of HDMI for us. I'm now not able to check all of this (no buildbot at the moment) and still I'm not familiar with android related changes introduces by post-ICS realeases, so I would appreciate some help from more advanced Devs :D

cheers

P.S. Thats me while I was reading through the code: :p