Android OS Forum banner
1 - 2 of 2 Posts

·
Android Beginner
Joined
·
2 Posts
Discussion Starter · #1 ·
One of the annoyances with the Galaxy Nexus portrait dock is that when used, it does not enable full HDMI mirroring, instead it puts the phone into "dock mode" and only uses the HDMI display under very limited cases, like Youtube videos.

However a simple MHL adapter cable puts the phone into a full mirroring mode, where the phones screen is replicated on the HDMI display. So clearly the Galaxy Nexus is capable of supporting full HDMI mirroring.

Turns out that full mirroring with the portrait dock actually worked under Android 4.0.2, however something happened and 4.0.3 and above (including JB) changed the behavior to "dock" mode.

I figured out what commit for 4.0.3 was responsible for the change in behavior and how to undo it. And now I have HDMI mirroring using the portrait dock working great under JB. Here's the details.

The commit is a change against the Linux kernel and is:

ARM: tuna: support Samsung's MHL adopter ID

Change-Id: Ie105ab9f91589069aa2a658a0ad3c2d798654f70
Signed-off-by: Erik Gilling <[email protected]>


https://github.com/i...da758753b02834a

Specifically where you are looking at is the source file:
arch/arm/mach-omap2/board-tuna-connector.c

Code:
static void sii9234_connect(bool on, u8 *devcap)<br />
{<br />
	struct tuna_otg *tuna_otg = &tuna_otg_xceiv;<br />
	unsigned long val;<br />
	int dock = 0;<br />
	struct clockdomain *l3_1_clkdm = clkdm_lookup("l3_1_clkdm");<br />
<br />
	if (on) {<br />
		val = USB_EVENT_VBUS;<br />
		if (devcap) {<br />
			u16 adopter_id =<br />
				(devcap[MHL_DEVCAP_ADOPTER_ID_H] << 8) |<br />
				devcap[MHL_DEVCAP_ADOPTER_ID_L];<br />
			u16 device_id =<br />
				(devcap[MHL_DEVCAP_DEVICE_ID_H] << 8) |<br />
				devcap[MHL_DEVCAP_DEVICE_ID_L];<br />
<br />
			if (adopter_id == 0x3333 || adopter_id == 321) {<br />
				if (devcap[MHL_DEVCAP_RESERVED] == 2)<br />
					val = USB_EVENT_CHARGER;<br />
<br />
				if (device_id == 0x1234)<br />
					dock = 1;<br />
			}<br />
		}<br />
		clkdm_deny_idle(l3_1_clkdm);<br />
	} else {<br />
		val = USB_EVENT_NONE;<br />
		clkdm_allow_idle(l3_1_clkdm);<br />
	}
....

The "adopter_id == 321" check is the crux of the change that changes how the portrait dock behaves. The addition of "adopter_id" 321 is the id of the Portrait Dock. By simply removing this piece in the if statement, the portrait dock will be treated the same way it was in 4.0.2. Now dock mode does not turn on and instead the display is simply mirrored to the external screen.

Change to: "if (adopter_id == 0x3333 ) {" and rebuild your kernel. No changes the the Android userspace are needed.

This change should be applicable to Imoseyon's Franco's or stock kernels. I'm too lazy to make this a proper patch or maintain a kernel of my own for this one change, but I couldn't find this information anywhere else on the interwebs so I wanted to post it here for others to find. And there are probably smarter folks than I that would be interested in putting in some extra logic to make some kind of "dock behavior" configurable in the OS.
 
1 - 2 of 2 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top