Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pieter Palmers <pieter.palmers@student.kuleuven.ac.be>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: inegrating a driver into the ALSA tree
Date: Wed, 19 Mar 2003 17:54:54 +0100	[thread overview]
Message-ID: <s5hhe9zs3dt.wl@alsa2.suse.de> (raw)
In-Reply-To: <3E786C6C.7090409@student.kuleuven.ac.be>

At Wed, 19 Mar 2003 14:11:08 +0100,
Pieter Palmers wrote:
> 
> Hi,
> 
> I'm currently writing a driver for the Guillemot MaxiStudio ISIS card, 
> and I have the following question:
> how do I integrate my driver into the ALSA tree? I'm totaly infamiliar 
> with the autoconf/automake stuff...
> For the moment I only need it on my own machine, so I compile it separately.
> But in a later stage I'd like to distribute some beta releases, and in 
> the end it should end up in the ALSA distribution I guess.

(hmm, i have a dejavu; the same question appeared sometime ago.
 this should really go to HOWTO :)

suppose that you'll create a new PCI driver xyz.
you'll need to add the following:

1. modify alsa-driver/pci/Makefile

* if you have a single file xyz.c for a new driver snd-xyz, add the
  following two lines

	snd-xyz-objs := xyz.o
	extra-obj-$(CONFIG_SND_XYZ) += snd-xyz.o

* if you have several files for a new driver(s), add a new directory
  name (xyz) to extra-subdir-y list

	extra-subdir-y := pdplus vx222 xyz

  and under the directory xyz, create a Makefile

	TOPDIR = ../..

	include $(TOPDIR)/toplevel.config
	include $(TOPDIR)/Makefile.conf

	TOPDIR = $(MAINSRCDIR)

	snd-xyz-objs := xyz.o abc.o def.o

	obj-$(CONFIG_SND_XYZ) += snd-xyz.o

	include $(TOPDIR)/Rules.make


2. modify alsa-driver/acore/Makefile

  define the dependent modules.

	obj-$(CONFIG_SND_XYZ) += snd.o ...

  if the driver supports pcm, snd-pcm.o, snd-timer.o and
  snd-page-alloc.o will be needed.

  for rawmidi, snd-rawmidi.o, and for opl3, snd-hwdep.o are needed.
  these are also related to the sequencer stuff.
  you'll need to modify alsa-driver/acore/seq/Makefile (and
  acore/seq/instr/Makefile for opl3 in addition).


3. modify alsa-driver/utils/Modules.dep

  add the module definition for configure, here.

* if you have snd-xyz on pci directory,

	%dir linux/sound/pci
	|snd-azt3328 snd-pcm snd-mpu401-uart snd-opl3-lib snd-opl3-synth
	|snd-xyz snd-pcm ...

* if you have a separate directory pci/xyz,

	%dir linux/sound/pci/xyz
	|snd-xyz snd-pcm ...


4. run cvscompile script to re-generate the configure script and build
   the whole stuff again.


ciao,

Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en

  reply	other threads:[~2003-03-19 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 13:11 inegrating a driver into the ALSA tree Pieter Palmers
2003-03-19 16:54 ` Takashi Iwai [this message]
2003-03-20 10:47   ` Takashi Iwai

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=s5hhe9zs3dt.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=pieter.palmers@student.kuleuven.ac.be \
    /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