Simple question on OHCI.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
tonytian
Posts: 17
Joined: Tue Jul 12, 2011 2:53 pm

Simple question on OHCI.

Post by tonytian »

I am trying to write a driver for my firewire camera. In my machine, I currently have a PCIe to Firewire adapter, and I connect my camera to the adapter using a firewire cable. My PCI enumeration can get me to the OHCI registers of the adapter. My question is, how can my OS talk to the camera? Is the camera going to be a subsystem of the adapter or there will be some hardware-based mappings between the adapter and camera?

I am new to device drivers, and hope I can get some help here. Thanks!
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Simple question on OHCI.

Post by Combuster »

You just picked up two of the rarest devices in the hobby scene. Firewire is not a requirement for basic stuff, and information about camera interfaces is pretty much nonexistant.

That said, anything not directly connected to a PCI bus typically functions as a computer at another end of a small network, with the network being controlled by the firewire driver. How it works exactly, I don't know because I don't have any machines with firewire of my own.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Simple question on OHCI.

Post by bewing »

As Combuster basically said, your firewire adapter will create a bus. Your firewire driver will probably enumerate that bus, and will communicate with the device(s) on that bus using the firewire protocol. AFAIK, it's a packetizing protocol -- and device commands will be embedded in the packets. -- Doesn't something like this: http://ieeexplore.ieee.org/servlet/opac ... er=4659231 give enough info?
tonytian
Posts: 17
Joined: Tue Jul 12, 2011 2:53 pm

Re: Simple question on OHCI.

Post by tonytian »

I see. All I want is to make my OS support a camera. I first thought USB was too complex for me and firewire may be easier. Looks like both are very complicated. Any suggestions?
bewing wrote:As Combuster basically said, your firewire adapter will create a bus. Your firewire driver will probably enumerate that bus, and will communicate with the device(s) on that bus using the firewire protocol. AFAIK, it's a packetizing protocol -- and device commands will be embedded in the packets. -- Doesn't something like this: http://ieeexplore.ieee.org/servlet/opac ... er=4659231 give enough info?
User avatar
gravaera
Member
Member
Posts: 737
Joined: Tue Jun 02, 2009 4:35 pm
Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.

Re: Simple question on OHCI.

Post by gravaera »

Yo:
Any suggestions?
Well, beyond, "Choose one of them" or "Give up on the idea and move on", I'm not sure what other suggestions can be made. Maybe if somebody wants to be ridiculous they can say something like, "Rip out the cable and try to connect it via the serial port", just to add that extra bit of diversity.

--Peace out
gravaera
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
tonytian
Posts: 17
Joined: Tue Jul 12, 2011 2:53 pm

Re: Simple question on OHCI.

Post by tonytian »

:)
gravaera wrote:Yo:
Any suggestions?
Well, beyond, "Choose one of them" or "Give up on the idea and move on", I'm not sure what other suggestions can be made. Maybe if somebody wants to be ridiculous they can say something like, "Rip out the cable and try to connect it via the serial port", just to add that extra bit of diversity.

--Peace out
gravaera
Post Reply