USB Support
Steve Kenton
skenton at ou.edu
Tue Apr 14 21:30:10 CDT 2015
On 04/14/2015 06:04 PM, Saulius Krasuckas wrote:
> * On Sun, 12 Apr 2015, Steve Kenton wrote:
>> On 4/12/2015 11:42 AM, Saulius Krasuckas wrote:
>>> * On Sun, 12 Apr 2015, Stefan Dösinger wrote:
>>>> Am 2015-04-11 um 17:38 schrieb Steve Kenton:
>>>>> USB Support has been on the list of possible release criteria
>>>>> basically forever. I've read through all the old threads and other
>>>>> discussions I could find and it boils down to "really hard to do
>>>>> right". If possible could someone knowledgeable comment briefly on
>>>>> what might be an acceptable architecture for a Wine USB stack?
> ...
>>>> the first problem that needs to be solved is properly registering
>>>> USB devices in the device tree in the registry. This doesn't even
>>>> involve Windows USB drivers and is as "simple" as advertising a USB
>>>> mass storage device that's handled by Linux / OSX as a USB mass
>>>> storage device instead of a fixed hard drive, with the proper vendor
>>>> and device ID etc.
>>> Stefan, do you mean populating entries in registry subkeys
>>> "Control\DeviceClasses" [1] and "Enum" [2] or namely "Enum\USB" [3] in
>>> the HKLM\SYSTEM\CurrentControlSet\ key ?
>>>
>>> I guess namely what values are crucial here except for essentially
>>> looking "HardwareID" [4] -- can it be all of them? Judging by the
>>> WineHQ Wiki [5] I am not so sure.
>> I spent some more time looking at this last night and it looks like the
>> registry enum keys are about every device ever plugged into the system,
>> whether it's currently present or not and the actual Windows device tree
>> is maintained in memory, so just the registry keys probably won't
>> suffice.
>
> Steve, it won't of course. But this is the first required step. I would
> say that another way:
>
> let's make the HwDetect [6] (custom program) work in Wine the same way it
> works in Windows (except for disabling devices -- just the monitoring
> part). It reads very small amount of data from "Enum\USB" subkey (I
> guess).
>
> Another step might be fixing Wine so "USB Device Tree Viewer" [7] works as
> in Windows. But this one looks like a lot more complicated testcase.
>
> S.
>
> [6] http://www.codeproject.com/Articles/14500/Detecting-Hardware-Insertion-and-or-Removal
> [7] http://www.uwe-sieber.de/usbtreeview_e.html
>
I was thinking along those same lines with something like the display portion of
Windows Device Manager. ~wine/server/device.c has some routines for managing
devices, I need to spend some more time understanding the current state of
things. But yes, it does look like a good place to start.
More information about the wine-devel
mailing list