Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Acquiring an interface from AppleUSBAudio [SOLVED]



So my plan worked perfectly. My class compliant audio device is now used by
AppleUSBAudio, except when my app is running. I did end up using the "match
against IOResources" strategy to force my kext to persist. I can't think of
any reason why this is a bad idea.

Oh and according to the darwin-drivers list kexts have no business reading
preferences - the best you can do is read the prefs from user land at an
appropriate time and let your kext know then.

Steve

> From: Steve West <email@hidden>
> Date: Sat, 26 Mar 2005 23:40:48 +1200
> To: USB mailing list <email@hidden>
> Subject: Re: Acquiring an interface from AppleUSBAudio
> 
> Correction: My plan is to use an interface driver which only returns *true*
> from start() if my app is running. If a device is already present when the
> app starts up then I'll just call USBDeviceReEnumerate() or
> SetConfiguration() on it.
> 
> The only problem is I can't see an easy way for the app to tell the driver
> that it is running, since the driver won't yet be in the IORegistry and
> never will be if it keeps returning false from start(). Should I match my
> driver against IOResources so I can IORegistryEntrySetCFProperties() on it?
> 
> Out of interest, can kexts read preferences?
> 
> Steve
> 
>> From: Shaun Wexler <email@hidden>
>> Date: Thu, 24 Mar 2005 17:29:57 -0800
>> To: USB mailing list <email@hidden>
>> Subject: Re: Acquiring an interface from AppleUSBAudio
>> 
>> On Mar 24, 2005, at 5:23 PM, Steve West wrote:
>> 
>>> As has been discussed on this list, a codeless kext can prevent the Apple
>>> audio driver from matching a particular interface. My question is: Can this
>>> be done on the fly? I have tried USBInterfaceOpenSeize() but AppleUSBAudio
>>> does not appear to honor it.
>> 
>> The way I did it was to have my USBDevice driver set the configuration,
>> but use false so it wouldn't begin matching the device, then attach my
>> driver and force-match it to the USBInterface.  Ugly but effective.
>> Then I learned that I'd been matched but a syntax-colorization bug in
>> Xcode was obfuscating some brackets as comments, and in fact it was
>> returning false from ::start.  ;)
>> -- 
>> Shaun Wexler
>> MacFOH
>> http://www.macfoh.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Re: Acquiring an interface from AppleUSBAudio (From: Steve West <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.