Modify alsa-driver/pci/Makefile
Suppose you have a file xyz.c. Add the following two lines
snd-xyz-objs := xyz.o obj-$(CONFIG_SND_XYZ) += snd-xyz.o
Create the Kconfig entry
Add the new entry of Kconfig for your xyz driver.
config SND_XYZ tristate "Foobar XYZ" depends on SND select SND_PCM help Say Y here to include support for Foobar XYZ soundcard. To compile this driver as a module, choose M here: the module will be called snd-xyz.
Note that some selections imply the lowlevel selections. For example, PCM includes TIMER, MPU401_UART includes RAWMIDI, AC97_CODEC includes PCM, and OPL3_LIB includes HWDEP. You don't need to give the lowlevel selections again.
For the details of Kconfig script, refer to the kbuild documentation.
Run cvscompile script to re-generate the configure script and build the whole stuff again.