Re: AudioReflectorDriver: won't unload
Re: AudioReflectorDriver: won't unload
- Subject: Re: AudioReflectorDriver: won't unload
- From: Jeff Moore <email@hidden>
- Date: Mon, 9 Aug 2010 16:15:43 -0700
On Aug 9, 2010, at 3:20 PM, Chuck Carlson wrote:
> Well that's unfortunate.
>
> When I was making mods to the AppleUsbAudioDriver, all I had to do was turn the device off and run the kextunload command.
If the device isn't actually attached to the system, then there won't be any user-clients. So, unloading the driver then is trivial.
> Clearly, something is latching onto ARD and not letting go.
The Reflector driver is not backed by any real hardware. It has no "off" button, so you can't force all the user-clients to go away. So, long-lived clients like LoginWindow or SystemUIServer will always have an open user-client.
FWIW, you can implement something like an on/off button. To do it, you would need to have a new IOService that handles all the matching for the driver. Then you can use a call to this Service that would instantiate the actual audio driver. You would have another call that would terminate the audio driver too so that it can be unloaded. I have used sysctl calls to do this job as they are a lot easier to hook up than full blown user-client object. But you could use a user-client for the job easily enough.
> On Mon, Aug 9, 2010 at 2:25 PM, Jeff Moore <email@hidden> wrote:
> Like all drivers, the Reflector driver can't be unloaded while it still has open user-clients attached to it. Typically, you need to quit all the apps that might be using audio to unload a driver that is being used actively. Note that processes like LoginWindow and SystemUIServer always have the HAL initialized and will open a connection to a freshly installed driver as soon as it shows up on the system.
>
> Because of this, typically the easiest way to get a new build of a driver running is to just reboot after installing a new build.
>
> --
>
> Jeff Moore
> Core Audio
> Apple
>
>
>
> On Aug 9, 2010, at 2:16 PM, Chuck Carlson wrote:
>
> > I'm making changes to ARD but each change is requiring a reboot for me, because the ARD won't unload with the kextunload command.
> >
> > The error is:
> >
> > (kernel) Can't unload kext com.apple.driver.AudioReflector; classes have instances:
> > (kernel) Kext com.apple.driver.AudioReflector class com_AREngine has 1 instance.
> > Failed to unload com.apple.driver.AudioReflector - (libkern/kext) kext is in use or retained
> >
> > I have not opened the device with any app.
> >
> > How do i unload, or it's going to take me forever to make and test changes if I have to reboot.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden