[haiku-development] Re: Driver and Media Add-on
- From: "Stephan Assmus" <superstippi@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Sat, 29 Mar 2008 09:38:40 +0100
-------- Original-Nachricht --------
> Datum: Sat, 29 Mar 2008 09:23:58 +0100 (CET)
> Von: "Fredrik Modéen" <fredrik@xxxxxxxxx>
> An: haiku-development@xxxxxxxxxxxxx
> Betreff: [haiku-development] Driver and Media Add-on
> Hi
>
> I have problem with a driver I'm writing (will be located under video).
> It getting recognize but never steps in to the hook Open() but straight
> to uninit_driver.
>
> I have come to the conclusion that I need to have a media add-on so that
> the driver will be in use by some part of the OS other wise the OS will
> unload the driver. Are my assumption right?
>
> If so what are the connection between the add-on and a driver? How do the
> OS knows that this particular add-on uses exact that driver? I can't find
> anything telling me about this only the different nods I can make and what
> they do.
The driver needs to publish a device (virtual file) in the /dev file system.
Then your Media Add-On needs to open this file. Then your driver will be
instantiated. The add-on can communicate with the driver via the file handle
and ioctl(). Or it can read()/write() etc.
Best regards,
-Stephan
- References:
- [haiku-development] Driver and Media Add-on
- From: Fredrik Modéen
Other related posts:
- » [haiku-development] Driver and Media Add-on
- » [haiku-development] Re: Driver and Media Add-on
- [haiku-development] Driver and Media Add-on
- From: Fredrik Modéen