Closed Harry1993 closed 5 years ago
Well, it turns out that we cannot do so, because desktops normally do not have USB peripheral controllers, which run USB ports in the slave/gadget mode; desktops can only be in USB master mode.
However, Raspberry Pi Zeros has such controllers on board so that they are able to serve as USB sound cards, when g_audio (https://gist.github.com/gbaman/50b6cca61dd1c3f88f41) module is turned on.
One other angle might be that the iPhone can be connected to car radios over a standard Lightning to USB cable and can drive the speakers, provide artwork and other metadata and also can be controlled. So there must be some protocol out there — I just don’t know what it is.
Hello Mike,
First of all, awesome jobs! I am wondering it is possible to transfer the audio signal/data via a USB port rather than over a wireless network.
In a home environment, both my iPhone and my PC are under the same LAN, which makes it possible for the iPhone to find the shareport-sync service. However, in an office, the situation might be different (no longer the same LAN).
Usually, I recharge my iPhone using a USB-lightning cable connecting to my PC that is running Arch Linux. I am searching for a way to make Linux act like a USB sound card to the iPhone. I tried connect my iPhone to several USB sound cards using a Lightning to USB 3 adapter (https://www.apple.com/shop/product/MK0W2AM/A/lightning-to-usb-3-camera-adapter) and all of them worked, so I think iOS is able to recognize and use a USB sound card.
One idea could be emulating a USB sound card on a computer, and when I connect my iPhone to the computer via USB, my iPhone recognizes this emulated USB sound card and then plays music on the physical (and maybe delicate) sound card of the computer. Everything sounds similar to shareport-sync except that the audio data is transmitted over USB instead of wireless networks.
Do you have suggestions about this? Any comments would be appreciated!
Thank you,
Yanmao