OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:35 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Hardware tutorial
PostPosted: Wed Sep 20, 2017 12:01 pm 
Offline
Member
Member
User avatar

Joined: Sat May 20, 2017 1:25 am
Posts: 51
Location: PCI bus: 3, slot: 9, function: 5
I would like to learn how to use the camera,audio,network,microphone... (internal on a laptop or from usb generally) is there any tutorial to explain this think?

_________________
How people react when a new update of your OS is coming:
Linux user: Cool, more free stuff!
Mac user: Ooh I have to pay!
Windows user: Ah not again!


Top
 Profile  
 
 Post subject: Re: Hardware tutorial
PostPosted: Wed Sep 20, 2017 12:38 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
That question is way to general to be answered. Use the search function. Check the wiki for certain hardware components. Start with something easy and then build from that.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: Hardware tutorial
PostPosted: Wed Sep 20, 2017 12:57 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
I don't wanna sound rude or anything, but I don't feel like you are quite ready for osdev yet. You seem to have no clue about how a computer works at a lower level. It's not as easy as you may think it is, judging by your question.

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Hardware tutorial
PostPosted: Thu Sep 21, 2017 8:29 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

ARISTOS wrote:
I would like to learn how to use the camera,audio,network,microphone... (internal on a laptop or from usb generally) is there any tutorial to explain this think?


There's no tutorial.

My approach is to pick one specific type of thing (e.g. audio), then spend several weeks researching and thinking about the higher level requirements - things like the ability to give sounds a virtual 3D position and possibly trajectory (doppler effect), a way to determine the physical speaker's characteristics (location relative to end user, frequency response curves), a way to map "virtual 3D position of sound" and the pitch of the sound onto available speakers (left/right/front/back, treble/mid-range/bass?), some sort of "sound effect processor" plugins/modules, etc. Then I'd design the higher level parts (the interface that applications would use, something to intelligently direct sounds to whichever sound cards are present, etc). Then I'd design the lower level device driver interface (how device drivers will communicate with the higher level parts).

Once all that is done (and the low level device driver interface is designed) I'd look into writing device drivers, beginning with finding a list of specific devices I have (there's no point writing a device driver that you can't test) then sorting that list in order of best "documentation + market share - complexity" and picking whatever is at the top of the list.

At this point I'll have specification/s for the "device driver software interface" (that I designed) on one side, and specifications/documentation for the "device hardware interface" (that the device manufacturer designed) on the other side. Writing a device driver is mostly about writing whatever glue is needed between these interfaces.

Of course a device driver also depends on "bus specific" things (e.g. PCI enumeration if it's a PCI device, USB enumeration and the interface drivers use to communicate with USB controller drivers if it's a USB device, whatever ugly hack you needed to work around the lack of "plug and play" if it's an ISA device, etc); and will also depend on functionality provided by kernel (some way to communicate, memory management, scheduler, IRQ handling, IO port and memory mapped IO resource management, etc). All of the things that a device driver depends on should exist before you start thinking about writing a device driver.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group