Re: Property plugins
Re: Property plugins
- Subject: Re: Property plugins
- From: Jeff Moore <email@hidden>
- Date: Wed, 11 Dec 2002 13:53:47 -0800
About the only other thing that could go wrong is that your bundle
isn't exporting all the symbols it needs to. You have to provide all
the entry points named in <CoreAudio/AudioDriverPlugIn.h>. If any are
missing, your plug-in won't load and it will trigger the HAL bug and
prevent your device from loading.
If the HAL finds all the entry points it is looking for, it will call
the plug-in's AudioDriverPlugInOpen routine. If that routine returns an
error, the plug-in will fail to load as well.
That's pretty much it for the sequence of events that lead up to the
first call into your plug-in. Have you looked at things in gdb to
confirm or deny whether or not your AudioDriverPlugInOpen routine is
getting called?
On Wednesday, December 11, 2002, at 12:34 PM, Emmett James wrote:
On Wed, Dec 11, 2002 at 11:17:29AM -0800, Jeff Moore wrote:
On Wednesday, December 11, 2002, at 05:15 AM, Emmett James wrote:
On Wed, Dec 11, 2002 at 06:46:22AM -0600, Emmett James wrote:
this->setProperty(kIOAudioEngineCoreAudioPlugInKey,
kPropertyPluginName);
where kPropertyPluginName is #defined as "MyPropertyPlugin.bundle".
The path is relative to /System/Library/Extensions, so the HAL will be
looking for a bundle at
/System/Library/Extensions/MyPropertyPlugin.bundle. Is this really
where you are installing your bundle? Usually, it is installed in the
Resources directory of your kext, so the path wouldn't be what you are
setting it to.
Yes, this really is where it is installed. After I get everything
working, I will package it in the Resources directory of the kext, but
for now I just copied from my build directory to
/System/Library/Extensions/MyPropertyPlugin.bundle
Sadly, setting this property makes my audio devices become
invisible.
This is a bug in the HAL. It fails to publish devices whose plug-ins
fail for some reason.
OK, this is good to know, as it gives more of a clue where to look.
printf goes to the console. Syslog(3) goes to /var/log/system.log.
Nothing is there,
So it looks like my plugin is not being found by the HAL.
I think the path to your plug-in is incorrect so the HAL isn't finding
your plug-in which is triggering the bug in the HAL that is causing
your device to go unrecognized. I bet once you get the path right,
things will start working more like you expect.
This sounds encouraging. However, my eyes tell me the two paths are the
same, so there must be some other detail I've got wrong.
While testing, I usually install my kext by copying it to /tmp, fixing
the ownership, and doing kextload -v /tmp/MyAudioDriver.kext, but
always
copy the plugin to /System/Library/Extensions. As a stab in the dark I
tried putting the kext in /System/Library/Extensions, touched
Extensions
and rebooted, but it still behaved the same.
Any other ideas?
--
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.