Re: IOAudioDevice Subclass KEXT not calling initHardware
Re: IOAudioDevice Subclass KEXT not calling initHardware
- Subject: Re: IOAudioDevice Subclass KEXT not calling initHardware
- From: Jeff Moore <email@hidden>
- Date: Tue, 14 Nov 2006 11:19:24 -0800
I don't see anything obviously wrong with your plist. Presumably all
those fields match their counterparts in the other parts of the build.
One thing you might want to do is to change the value for the key,
IOResourceMatch, from IOKit to IOBSD. This will make the matching of
your driver happen a bit later in the boot process so that all the
dependencies are there. Probably won't make a difference in what you
are doing, but it does produce a better citizen of a driver.
After you kextload your driver, you should check the IORegistry with
ioreg or IORegistryExplorer.app and see if any of your objects got
instantiated. You might also want to check out this helpful document
about debugging matching and loading problems: http://developer.apple.com/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/DebuggingDrivers/chapter_8_section_3.html
On Nov 13, 2006, at 7:54 PM, Jason Williams wrote:
Thanks jeff, I'll check out the list and the CoreAudio example too.
I'm sorta working my way up through the Kernel Audio examples
anyway. I just need to figure out where I am going wrong on this
build... The plist file looks pretty much the same as the other
with my minor modifications.
So here's my stuff I got thus far....
from the ESDAudioDriver.h file
#define ESDAudioDriver org_tulg_driver_ESDAudioDriver
class ESDAudioDriver : public IOAudioDevice
... continue with class def....
and from the Info.plist
<key>IOKitPersonalities</key>
<dict>
<key>ESDAudioDriver</key>
<dict>
<key>CFBundleIdentifier</key>
<string>org.tulg.driver.ESDAudioDriver</string>
<key>IOClass</key>
<string>org_tulg_driver_ESDAudioDriver</string>
<key>IOMatchCategory</key>
<string>ESDAudioDriver</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOReourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
perhaps a second pair of eyes may see something I'm missing?
I can send the full source if anyone would like to see.
On 11/13/06, Jeff Moore <email@hidden> wrote:
First off, the PhantomAudioDriver sample code was obsoleted a while
back with the introduction of the AudioReflectorDriver in the
CoreAudio SDK. You can find it on an OS X system in /Developer/
Examples/CoreAudio/HAL/AudioReflectorDriver.
Also, if you have audio specific questions, as opposed to general
kernel development questions, you should check out the CoreAudio-API
mailing list on lists.apple.com.
All that said, your current problem sounds to me like your driver
isn't matching anything and so none of your kext's classes are being
instantiated. Your matching information should be in the
"IOKitPersonalities" dictionary of your kext's info.plist. Chances are
that you lost that info in the shuffle from the original project to
your freshly built project. As such, you should check over all the
data in the info.plist file just to be sure it got transferred over
correctly.
On Nov 13, 2006, at 6:28 PM, Jason Williams wrote:
> Now I posted earlier this month about building the example project
> for a dummy IOAudioDevice. I got it to build, so I've gone on to
> the next step which is to build my own modified version. I
> basically copied most of the code from PhantomAudioDriver, which is
> what builds and loads, and put in some simple stuff for an example
> AudioEngine, and built it. I've gotten it as far as building
> perfectly, so it seems, and loading it into the kernel with
> kextload. Ran kextload with -t and all looks well. kextstat even
> shows the driver loaded.
>
> Problem is, I put some debug log lines in initHardware in the
> IOAudioDevice subclass, and nothing is coming out. Nor does my
> device show up in the audio output pane in system prefs. The
> difference is that I started with a clean Xcode Kernel EXT project
> for the new version so I could understand the settings that went
> into building a KEXT. According to the docs, when the kext is
> loaded, the start() function on the super class calls initHardware
> on the subclass. But it seems to not be doing so. Any thoughts/
> Ideas/Suggestions on where to look? I'm guessing it's a setting or
> a something I am just missing, but I made sure I had everything set
> right like it is on the PhantomAudioDriver, but to no avail.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden