Hi folks,
i did a little research these days and tried to sort out,
what in fact is missing to make HDMI/MHL work in AOSP based ROMs for the S3 series.
It is really hard to find some useful stuff about it.
All i noticed were some ancient posts about attaching MHL cable causing reboots.
Everyone keeps repeating MHL will not work on AOSP.
I know that HDMI/MHL is weird stuff and reference manual for MHL transceiver SII9244 is not available.
On the other hand this chip is only working as a phy and should be set up correctly at kernel level.
I also know that there'd been many attempts to make it work but i am to dumb to find some reference to tech talks about it.
So it really seems that most parts are implemented and ready to be put together.
At least that's the way it seems to me... and might be bit noobish of course.
Anyway i found something, which might be another key to solve this issue.
Some snippets from the sources at kernel level.
mach-midas.c:
midas-mhl.c:
This could be found in the AOSP source trees of the Android hal:
https://github.com/omnirom/android_...ynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c
So i really wonder if someone ever tried to add device "i2c-15" here and compile.
See the implementation for odroid-u3 here as well (which is the base for NamelessROM):
https://github.com/codewalkerster/android_hardware_samsung_slsi_exynos4
Additionally this should be added to the S3 BoardConfig.mk then:
Please leave some comments and help me to understand what in fact is missing to watch TV with AOSP ROMs :angel:
Regards,
scholbert
i did a little research these days and tried to sort out,
what in fact is missing to make HDMI/MHL work in AOSP based ROMs for the S3 series.
It is really hard to find some useful stuff about it.
All i noticed were some ancient posts about attaching MHL cable causing reboots.
Everyone keeps repeating MHL will not work on AOSP.
I know that HDMI/MHL is weird stuff and reference manual for MHL transceiver SII9244 is not available.
On the other hand this chip is only working as a phy and should be set up correctly at kernel level.
I also know that there'd been many attempts to make it work but i am to dumb to find some reference to tech talks about it.
So it really seems that most parts are implemented and ready to be put together.
At least that's the way it seems to me... and might be bit noobish of course.
Anyway i found something, which might be another key to solve this issue.
Some snippets from the sources at kernel level.
mach-midas.c:
Code:
#ifdef CONFIG_SAMSUNG_MHL
/* I2C15 */
static struct i2c_gpio_platform_data gpio_i2c_data15 = {
.sda_pin = GPIO_MHL_SDA_1_8V, /* GPB2, I2C5_SDA */
.scl_pin = GPIO_MHL_SCL_1_8V, /* GPB3, I2C5_SCL */
.udelay = 3,
.timeout = 0,
};
struct platform_device s3c_device_i2c15 = {
.name = "i2c-gpio",
.id = 15,
.dev = {
.platform_data = &gpio_i2c_data15,
}
};
static struct i2c_board_info i2c_devs15_emul[] __initdata = {
};
/* I2C16 */
#if !defined(CONFIG_MACH_T0) && !defined(CONFIG_MACH_M3) \
&& !defined(CONFIG_MACH_GD2)
static struct i2c_gpio_platform_data gpio_i2c_data16 = {
.sda_pin = GPIO_MHL_DSDA_2_8V,
.scl_pin = GPIO_MHL_DSCL_2_8V,
};
struct platform_device s3c_device_i2c16 = {
.name = "i2c-gpio",
.id = 16,
.dev.platform_data = &gpio_i2c_data16,
};
#endif /* !defined(CONFIG_MACH_T0) */
static struct i2c_board_info i2c_devs16_emul[] __initdata = {
};
#endif
Code:
static int __init midas_mhl_init(void)
{
int ret;
#define I2C_BUS_ID_MHL 15
ret = i2c_add_devices(I2C_BUS_ID_MHL, i2c_devs_sii9234,
ARRAY_SIZE(i2c_devs_sii9234));
if (ret < 0) {
printk(KERN_ERR "[MHL] adding i2c fail - nodevice\n");
return -ENODEV;
}
#if defined(CONFIG_MACH_T0_EUR_OPEN) || defined(CONFIG_MACH_T0_CHN_OPEN)
sii9234_pdata.ddc_i2c_num = 6;
#elif defined(CONFIG_MACH_P4NOTE) || defined(CONFIG_MACH_SP7160LTE) || defined(CONFIG_MACH_T0) \
|| defined(CONFIG_MACH_KONA) || defined(CONFIG_MACH_TAB3) || \
defined(CONFIG_MACH_GD2) || defined(CONFIG_MACH_GC2PD)
sii9234_pdata.ddc_i2c_num = 5;
#else
sii9234_pdata.ddc_i2c_num = (system_rev == 3 ? 16 : 5);
#endif
#ifdef CONFIG_MACH_SLP_PQ_LTE
sii9234_pdata.ddc_i2c_num = 16;
#endif
ret = i2c_add_devices(sii9234_pdata.ddc_i2c_num, &i2c_dev_hdmi_ddc, 1);
if (ret < 0) {
printk(KERN_ERR "[MHL] adding ddc fail - nodevice\n");
return -ENODEV;
}
return 0;
}
This could be found in the AOSP source trees of the Android hal:
https://github.com/omnirom/android_...ynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c
Code:
/**
* @brief DDC device name.
* User should change this.
*/
#ifdef DDC_CH_I2C_1
#define DEV_NAME "/dev/i2c-1"
#endif
#ifdef DDC_CH_I2C_2
#define DEV_NAME "/dev/i2c-2"
#endif
#ifdef DDC_CH_I2C_7
#define DEV_NAME "/dev/i2c-7"
#endif
See the implementation for odroid-u3 here as well (which is the base for NamelessROM):
https://github.com/codewalkerster/android_hardware_samsung_slsi_exynos4
Additionally this should be added to the S3 BoardConfig.mk then:
Code:
BOARD_USES_HDMI_SUBTITLES := true
BOARD_USES_HDMI := true
BOARD_HDMI_STD := STD_720P
BOARD_HDMI_DDC_CH := DDC_CH_I2C_15
BOARD_USES_FIMGAPI := true
Regards,
scholbert
Last edited: