9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Audio in Lenovo T400
Date: Sun, 11 Oct 2015 22:42:33 +0200	[thread overview]
Message-ID: <0b109d174515546318e7979e0615ae3d@felloff.net> (raw)
In-Reply-To: <561AB861.6090103@imz.re>

> 1. Where are audio devices drivers stored? I believe that in 
> /sys/src/9/pc but I'm not fully certain.

intel hd audio driver source is /sys/src/9/pc/audiohda.c, which
gets called by by /sys/src/9/port/devaudio.c

> 2. How I can test audio card to be sure that this is a driver problem.

you probably just need to set the right output pin in /dev/audioctl

> 3. Which file use as a template for new audio driver? And how to setup 
> driver development envirmoent(can i load drivers into kernel without 
> restarting machine? how to test and compile the driver?)

you can pick any /sys/src/9/pc/audio*.c as a template. the plan9
kernel does not have loadable kernel drivers. kernel drivers are
build into the kernel and require a new kernel to be build
and a reboot after a change them to test. vga drivers and usb
drivers are just normal userspace programs tho. so not all driver
development requires a kernel driver.

i have a bunch of plan9 machines running, so for driver development,
i just netboot the machine with the hardware with my development
kernel.

plan9 kernel is quite simple, you should have no problem figuring
it out by looking at the other drivers. the kernel you build is
build from a configuration file, /sys/src/9/pc/9pcf is build from
/sys/src/9/pc/pcf for example. this file contains the list of
drivers that get build into it. there are two types of kernel
drivers:

dev: which export a Dev structure with function pointers to
implement a (kernel) fileserver, they are all named dev*.c.

link: which just export a <nameofdriver>link() function
that gets called early on boot. the audio and ethernet drivers are
of this kind. they do not implement the device fileservice directly
but just register themselfs in ther link function with a dev.

you build a kernel with mk. mk 'CONF=confname' to build a kernel
of a specific configuration. gives you 9confname kernel image.

--
cinap


  reply	other threads:[~2015-10-11 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 19:28 ghi
2015-10-11 20:42 ` cinap_lenrek [this message]
2015-10-12 20:02   ` [9front] " ghi
2015-10-11 20:10 sl
2015-10-12  7:31 ` ghi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b109d174515546318e7979e0615ae3d@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).