[Xperia Arc General] scholbert:
... never say never...

Hi skaveelicious,

nice to see some action here again :fingers-crossed:

I'm still convinced that it should be possible to write some driver code from scratch, if we step through the code base which i refered to in the past.

http://xdaforums.com/showpost.php?p=44340224&postcount=44

Another guess is that we won't need comprehensive documentation if we start with the base initialization via I2C first.

AFAIK Sony's userland tool does very basic setup of the HDMI transmitter, so we might reverse engineer this sequence, if we got a base framework for I2C communication to the chip.

I may help out on this topic, if we ever reach this point...

EDIT:

Here's another driver from a Qualcomm reference platform which uses Sil9022

https://github.com/LegacyXperia/msm7x30-3.4.x-nAa/blob/cm-10.2/drivers/video/msm/lcdc_st15.c

Unfortunately i found some references that this driver code got borked at some point and does not compile anymore... and i never found some reference code for Android which interacts with it.

Anyway, these init sequences are very basic ( and ...yes we don't know what they do in detail).

Apart from that the sources from RK3066 kernel are very very close to the reference driver from Silicon Motion.

Unfortunately this code base is pretty old already and RK3066 kernel developer's made some strange hacks...

The hardest part is to shrink down ADV7520 driver code to the essential and replace the routines with the ones matching Sil9024.

Another thing is to understand CM11 code which interacts with the kernel driver via sysfs.

From what i could find out in a rush is this part taken form here:

https://github.com/LegacyXperia/and...ob/cm-11.0_old/libhwcomposer/hwc_external.cpp

This is a snippet which relates to HPD signal:

bool ExternalDisplay::writeHPDOption(int userOption) const
{
bool ret = true;
int hdmiHPDFile = open(SYSFS_HPD,O_RDWR, 0);
if (hdmiHPDFile < 0) {
ALOGE("%s: state file '%s' not found : ret%d"
"err str: %s", __FUNCTION__, SYSFS_HPD, hdmiHPDFile,
strerror(errno));
ret = false;
} else {
int err = -1;
ALOGD_IF(DEBUG, "%s: option = %d", __FUNCTION__,
userOption);
if(userOption)
err = write(hdmiHPDFile, "1", 2);
else
err = write(hdmiHPDFile, "0" , 2);
if (err <= 0) {
ALOGE("%s: file write failed '%s'",
__FUNCTION__, SYSFS_HPD);
ret = false;
}
close(hdmiHPDFile);
}
return ret;
}

No need for JTAG (which is not available on SEMC 2011).

We'll need some test kernels and basic implementation of a driver skeleton (especially I2C part first) to get things starting.

ADB console and log messages may help at some point...

Yeah that's what it is!

Unfortunately i'm lacking time, to really get involved in this :o

We'll need some support from CM11 hackers as well, because there are many parts of code which interact with each other.

To get an idea about the initial HPD event would be very nice, because this is the very starter...

EDIT2:

Alternatively HPD might be ignored at first.

It would be enough to power up the HDMI chip at boot up, do the init sequence right away and use some fixed setup at kernel level as a proof of concept.

Hopefully there will be some output at the HDMI connector then...

Anyway have a nice time :victory:

Cheers,

scholbert