Re: Attaching audio driver to another driver.
Re: Attaching audio driver to another driver.
- Subject: Re: Attaching audio driver to another driver.
- From: Roger Smith <email@hidden>
- Date: Sat, 23 Jun 2001 11:17:54 -0700
James,
Since drivers in IOKit do not support multiple inheritance,
you just need to add your IOAudioDevice subclass as part of your
Driver structure. e.g if you are writing a modem driver, your
structure will now look like:
class MyUSBModem : public IOSerialDriverSync
{
OSDeclareDefaultStructors( MyUSBModem ) ; /*
Constructor & Destructor stuff */
private:
// your private stuff
public:
//Your public stuff..
myIOAudioDevice *myIOAudioDeviceSubClass; // Where this is
you subclass of IOAudioDevice
/* IOKit methods: */
/**** IOSerialDriverSync Abstract method implementation ****/
};/* end class MyUSBModem */
In your MYUSB
Modem::start routine, you would simply allocate your
myIOAudioDevice and proceed as normal.
You will probably need to call the appropriate initializers on your
myIOAudioDevice object explicitly i.e:
myIOAudioDevice->init()
myIOAudioDevice->attach ()
myIOAudioDevice->start ()
Roger
At 4:57 PM -0700 6/22/01, email@hidden wrote:
Hi Laurent,
I already have it exposed as a child of IOAudioDevice. I need to expose
it through another driver though. The reason is that the other driver
actually runs our modem hardware -- it is not really an audio card.
However, a modem CAN generate sounds. We want to output modem sounds out
the main audio. To do this, it was suggested that we expose an audio
driver from our modem driver. Obviously it is not a full audiodriver, but
just something that will "Hang" off of the main driver and provide a record
path that can then be sent to DefaultAudioUnit. How do I expose the
IOAudioDevice if it is not the main "Driver"?
Thanks,
James
Laurent
Cerveau To:
email@hidden
<lcerveau@app cc:
email@hidden
le.com> Subject: Re: Attaching
audio driver to another
driver.
06/22/2001
04:45
PM
On Friday, June 22, 2001, at 03:31 PM, email@hidden wrote:
Another step here. We already have a driver that runs our hardware,
however, we want to expose an audio-driver interface for our hardware
too.
The main driver will match against our hardware installed on the system,
and thus get's a call to it's ::start routine. Now, how do I go about
correctly exposing the Audiodriver interface?
What do you mean by "exposing the Audiodriver interface". Your device
will be presented to the HAL since it is a child of IOAudioDevice. Or
do you mean another driver, and if so why?
Laurent
Laurent Cerveau
AudioCPU SW - Manager
Apple Computer Inc.
email@hidden
_______________________________________________
coreaudio-api mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
--
Roger Smith 408-974-8122
Apple Computer, Inc. email@hidden
6 infinite Loop
MS 306-2HN