4 ms·
From what I've read of the official specification, the correct answers are: 1. Plug the HDMI adapter: almost nothing. The HDMI adapter enumerates as an USB 2.0
by cesarb 7y ago
From what I've read of the official specification, the correct answers are:
1. Plug the HDMI adapter: almost nothing. The HDMI adapter enumerates as an USB 2.0 "billboard device". The operating system can read the descriptor from this device and present a pop-up explaining "you have to plug HDMI adapters directly". This is because, as far as I know, USB hubs can't pass through alternate modes (except for the new USB4 alternate mode, but that is less of "pass through" and more "the hub is a USB4 device itself").
2. Plug the USB-C headphones: it depends on whether they are analog headphones using the "audio accessory" mode, or digital headphones presenting as an USB audio device. If they are digital headphones, it's the "everything just works" case; if they are analog headphones, it's the "nothing" case (unless there's something in the specification I missed where a hub can detect the "audio accessory" and warn the host, in which case you might get the pop-up explaining "analog headphones are not supported by this computer, even if you had plugged them directly").
Things change a bit with USB4. In the particular case where the HDMI dongle is an active DP to HDMI converter (which is probably the most common case, since from what I've seen computer support for the DP alternate mode is more common than the HDMI alternate mode, so most dongles will cater to that case), and the hub is an USB4 hub, it'll work as if it had been connected directly, since USB4 can tunnel Displayport (together with PCI Express and USB 3).
- nespressoAnger 7y agoExactly, and this is why there are no USB-C hubs. Users (even technical users on Hacker News) keep asking for a "USB-C hub". What do you think they mean by that? "I want to plug in all my USB-C crap" or "I want to plug in all my USB-C crap, except video dongles and some[1] audio dongles" All the use cases for an everything-except-alt-mode USB-C hub are already met by existing USB-A hubs[2]. [1] "And please don't give me an easy way to tell which headphone dongles will work ahead of time. The surprise and anticipation of seeing whether it works makes every plug-in event feel like my birthday." [2] Okay, okay, you do need USB-C connectors for 20 Gbps USB bandwidth. But I've never actually seen a 20 Gbps USB host, device, or hub in the wild.
- nespressoAnger 7y agoSince I can't edit my sibling post: I wanted to address your point about the "correct" answer, because it's actually not so simple: The billboard spec allows for a device to be both a DisplayPort 4-lane and a USB 2.0 device (This isn't theoretical--I have such a device in front of me. It's a passive DisplayPort + 2 port USB2.0 + microSD "hub"). The HDMI adapter I hypothesized in my second scenario is a passive HDMI adapter. You're correct that passive HDMI + USB2.0 is not possible, but substitute a passive DisplayPort for passive HDMI here and the idea is the same. In the third scenario I am hypothesizing an active 2-lane DisplayPort to HDMI adapter (These are also not theoretical--this is how the Apple "HDMI Multiport Adapter" works). The hub I hypothesized for scenarios 2 through 4 (which does not exist) is one that would be smart enough to do the following: 1. Recognize the video dongle's billboard 2. Send the host a "fake" billboard for "DisplayPort 2 lane + USB 3.0" or "DisplayPort 4 lane + USB 2.0" (as appropriate) 3. Re-configure the downstream USB-C as USB 3.0 or 2.0-only ports (again as appropriate) 4. Route DP to the dongle (perhaps via an internal DP -> HDMI converter, if the hub has one), Route USB 2.0 or 3.0 to the internal hub, and route the hub to the downstream USB-C ports. I don't recall if rewriting the billboard is allowed per the USB spec (I think it isn't). But you can see how it would be possible for a hub to support alt-mode routing, even if the spec doesn't formally define it.
- cesarb 7y agoYou seem to be confusing the billboard device with the alternate mode negotiation. The billboard device is a normal USB device which shows up once the alternate mode negotiation times out. The alternate mode negotiation happens on the configuration pins over the USB-PD protocol. The alternate mode discovery is initiated by the host, so the only way the hub could change which alternate modes it supports would be to disconnect from the host (unplugging all the devices on it, which would be particularly bad if some of them were storage devices). (Also, I believe HDMI alternate mode with USB 2.0 is possible. The only alternate mode I know of which changes the meaning of the USB 2.0 pins is VirtualLink, which uses them for USB 3.x instead.)