Skip to contentSkip to conversation

inegrating a driver into the ALSA tree

DISCUSSION Pieter Palmers 2 participants 3 messages Mar 19, 2003 – Mar 20, 2003

lore
Share & tools
lore
#0 lore raw

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.

Thanks,

Pieter

-------------------------------------------------------
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

#1 lore raw

At Wed, 19 Mar 2003 14:11:08 +0100,

Quoted 10 lines · Pieter Palmers

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

#2 lore raw

[i sent this mail already yesterday, but it seems not reached by
unknown reason. if you have already seen this, please disregard.]

At Wed, 19 Mar 2003 14:11:08 +0100,

Quoted 10 lines · Pieter Palmers

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: Tablet PC.
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