Re: IOAudioEngine Not Being Released
Re: IOAudioEngine Not Being Released
- Subject: Re: IOAudioEngine Not Being Released
- From: Jeff Moore <email@hidden>
- Date: Thu, 02 May 2002 13:04:14 -0700
on 5/1/02 10:59 PM, Chris Cooksey <email@hidden> wrote:
>
I am having a tough time developing a USB IOAudio driver. The problem is
>
that I have to reset my machine every second time I want to try a new
>
version of my KEXT.
>
>
The follwoing seems to be happening:
>
>
When the IOService provider tries to go away (usually by unplugging the USB
>
device), the IOAudioEngine sticks around for some reason -it's retain count
>
is 1 too high. This stops the provider from unloading, and prevents me from
>
loading a new version.
>
>
I find that if I manually release the engine as the driver goes away, I can
>
load my KEXT a second time and work with new code. However, if the driver
>
tries to go away again, the machine locks up hard -I think when core audio
>
tries to free the IOAudioEngine.
>
>
If I don't manually release the IOAudioEngine, the machine never locks up,
>
but the IOAudioEngine retain count increases by one everytime I plug and
>
unplug my USB device, and of course I am trapped with that version of the
>
code.
>
>
At a certain point of despair, I tried the same experiement with a Griffen
>
iMic. I found that it is doing the exact same thing using the built-in Apple
>
USB Driver.
Yup, this is a known issue. I'm not exactly sure yet who is holding on to
the extra driver reference, but I'm fairly certain it is something in the
LoginWindow process. It may be the HAL doing something naughty or it may be
something else. Don't know yet.
>
Ok. So it is broken. It won't affect the end-user, but it is going to be a
>
major problem for me -my driver is far more complicated than most audio
>
drivers and there are going to be many many versions that need testing.
As you say, it's really only an issue for driver developers and folks
working on the HAL, so it hasn't been a high priority item. Believe me I
find it just as annoying =)
>
I really need a way to get the old driver out of the system without
>
restarting. Is there any kind of work-around?
The easiest thing to do to work around this is to log in to the console
(type ">console" at the login prompt) and unload/reload the driver from
there.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.