diff options
author | cg <cg@FreeBSD.org> | 2000-07-03 20:52:27 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2000-07-03 20:52:27 +0000 |
commit | 809e9b3b6c801fb2ab7667ee1c50701a91d73e2e (patch) | |
tree | 1780dcea06a27f13fc03ed9c3cece3d9aa065d96 /sys | |
parent | 4f5fa991c057d05f4dcfd6aa70523a20cf07b33f (diff) | |
download | FreeBSD-src-809e9b3b6c801fb2ab7667ee1c50701a91d73e2e.zip FreeBSD-src-809e9b3b6c801fb2ab7667ee1c50701a91d73e2e.tar.gz |
add module metadata. this is a hack, sound drivers will eventually present a
bus to which pcm, mixer, etc will attach.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/isa/ad1816.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/isa/es1888.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/isa/ess.c | 8 | ||||
-rw-r--r-- | sys/dev/sound/isa/gusc.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/isa/mss.c | 15 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb.c | 5 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb16.c | 5 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb8.c | 5 | ||||
-rw-r--r-- | sys/dev/sound/isa/sbc.c | 10 | ||||
-rw-r--r-- | sys/dev/sound/pci/aureal.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/csa.c | 9 | ||||
-rw-r--r-- | sys/dev/sound/pci/csapcm.c | 5 | ||||
-rw-r--r-- | sys/dev/sound/pci/ds1.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/emu10k1.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/es137x.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/neomagic.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/t4dwave.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sound.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sound.h | 6 |
19 files changed, 85 insertions, 27 deletions
diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index bcf0715..a041ba9 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -619,4 +619,8 @@ static driver_t ad1816_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(ad1816, isa, ad1816_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_ad1816, isa, ad1816_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_ad1816, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_ad1816, 1); + + diff --git a/sys/dev/sound/isa/es1888.c b/sys/dev/sound/isa/es1888.c index f1c32b5..c4e98ea 100644 --- a/sys/dev/sound/isa/es1888.c +++ b/sys/dev/sound/isa/es1888.c @@ -170,4 +170,8 @@ static driver_t es1888_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(es1888, isa, es1888_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_es1888, isa, es1888_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_es1888, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_es1888, 1); + + diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 733dd65..709549b 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -867,7 +867,10 @@ static driver_t ess_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(ess, sbc, ess_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_ess, sbc, ess_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_ess, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_ess, 1); + static devclass_t esscontrol_devclass; @@ -924,6 +927,3 @@ static driver_t esscontrol_driver = { DRIVER_MODULE(esscontrol, isa, esscontrol_driver, esscontrol_devclass, 0, 0); - - - diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c index bbda980..7235e16 100644 --- a/sys/dev/sound/isa/gusc.c +++ b/sys/dev/sound/isa/gusc.c @@ -663,4 +663,8 @@ static driver_t gusc_driver = { /* * gusc can be attached to an isa bus. */ -DRIVER_MODULE(gusc, isa, gusc_driver, gusc_devclass, 0, 0); +DRIVER_MODULE(snd_gusc, isa, gusc_driver, gusc_devclass, 0, 0); +MODULE_DEPEND(snd_gusc, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_gusc, 1); + + diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index 938854e..374dc31 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -966,7 +966,10 @@ static driver_t mss_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(mss, isa, mss_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_mss, isa, mss_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_mss, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_mss, 1); + /* * main irq handler for the CS423x. The OPTi931 code is @@ -1458,7 +1461,10 @@ static driver_t pnpmss_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(pnpmss, isa, pnpmss_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_pnpmss, isa, pnpmss_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_pnpmss, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_pnpmss, 1); + /* * the opti931 seems to miss interrupts when working in full @@ -1597,7 +1603,10 @@ static driver_t guspcm_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(guspcm, gusc, guspcm_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_guspcm, gusc, guspcm_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_guspcm, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_guspcm, 1); + static int mssmix_init(snd_mixer *m) diff --git a/sys/dev/sound/isa/sb.c b/sys/dev/sound/isa/sb.c index 1dd971d..f984d5c 100644 --- a/sys/dev/sound/isa/sb.c +++ b/sys/dev/sound/isa/sb.c @@ -892,7 +892,10 @@ static driver_t sbsbc_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(sbsbc, sbc, sbsbc_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_sb, sbc, sbsbc_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_sb, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_sb, 1); + diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 1dd971d..f984d5c 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -892,7 +892,10 @@ static driver_t sbsbc_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(sbsbc, sbc, sbsbc_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_sb, sbc, sbsbc_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_sb, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_sb, 1); + diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index 1dd971d..f984d5c 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -892,7 +892,10 @@ static driver_t sbsbc_driver = { sizeof(snddev_info), }; -DRIVER_MODULE(sbsbc, sbc, sbsbc_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_sb, sbc, sbsbc_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_sb, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_sb, 1); + diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c index 2077d11..efec890 100644 --- a/sys/dev/sound/isa/sbc.c +++ b/sys/dev/sound/isa/sbc.c @@ -26,11 +26,9 @@ * $FreeBSD$ */ -#include "isa.h" - #include <dev/sound/chip.h> #include <dev/sound/pcm/sound.h> -#include <dev/sound/isa/sb.h> +#include <dev/sound/isa/sb.h> #define IO_MAX 3 #define IRQ_MAX 1 @@ -719,4 +717,8 @@ static driver_t sbc_driver = { }; /* sbc can be attached to an isa bus. */ -DRIVER_MODULE(sbc, isa, sbc_driver, sbc_devclass, 0, 0); +DRIVER_MODULE(snd_sbc, isa, sbc_driver, sbc_devclass, 0, 0); +MODULE_DEPEND(snd_sbc, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_sbc, 1); + + diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c index c1e040d..e97b689 100644 --- a/sys/dev/sound/pci/aureal.c +++ b/sys/dev/sound/pci/aureal.c @@ -686,4 +686,6 @@ static driver_t au_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(au, pci, au_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_aureal, pci, au_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_aureal, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_aureal, 1); diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index f031f83..b474574 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -41,6 +41,7 @@ #include <machine/clock.h> #include <sys/rman.h> #include <sys/soundcard.h> +#include <dev/sound/pcm/sound.h> #include <dev/sound/chip.h> #include <dev/sound/pci/csareg.h> #include <dev/sound/pci/csavar.h> @@ -796,9 +797,9 @@ csa_readcodec(csa_res *resp, u_long offset, u_int32_t *data) /* * Read the data returned from the AC97 register. - * ACSDA = Status Data Register = 474h + * ACSDA = Status Data Register = 474h */ - *data = csa_readio(resp, BA0_ACSDA); + *data = csa_readio(resp, BA0_ACSDA); return (0); } @@ -921,4 +922,6 @@ static driver_t csa_driver = { /* * csa can be attached to a pci bus. */ -DRIVER_MODULE(csa, pci, csa_driver, csa_devclass, 0, 0); +DRIVER_MODULE(snd_csa, pci, csa_driver, csa_devclass, 0, 0); +MODULE_DEPEND(snd_csa, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_csa, 1); diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index 8e63ee7..6eb67c4 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -874,4 +874,7 @@ static driver_t pcmcsa_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(pcmcsa, csa, pcmcsa_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_csapcm, csa, pcmcsa_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_csapcm, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_DEPEND(snd_csapcm, snd_csa, 1, 1, 1); +MODULE_VERSION(snd_csapcm, 1); diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 5fb0f07..61559c8 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -986,4 +986,6 @@ static driver_t ds1_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(ds1, pci, ds1_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_ds1, pci, ds1_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_ds1, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_ds1, 1); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index c814ada..e598185 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -1450,7 +1450,9 @@ static driver_t emu_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(emu, pci, emu_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_emu10k1, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_emu10k1, 1); static int emujoy_pci_probe(device_t dev) diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 3a29023..0664dbc 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -867,4 +867,6 @@ static driver_t es_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(es, pci, es_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_es137x, pci, es_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_es137x, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_es137x, 1); diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 638ac96..f8c5ef0 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -695,4 +695,6 @@ static driver_t nm_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(nm, pci, nm_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_neomagic, pci, nm_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_neomagic, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_neomagic, 1); diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 29cf9b7..01c6220 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -698,4 +698,6 @@ static driver_t tr_driver = { static devclass_t pcm_devclass; -DRIVER_MODULE(tr, pci, tr_driver, pcm_devclass, 0, 0); +DRIVER_MODULE(snd_t4dwave, pci, tr_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(snd_t4dwave, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); +MODULE_VERSION(snd_t4dwave, 1); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index c5c0b6d..71dc8c3 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -33,6 +33,8 @@ static int status_isopen = 0; static int status_init(char *buf, int size); static int status_read(struct uio *buf); +MODULE_VERSION(snd_pcm, PCM_MODVER); + static d_open_t sndopen; static d_close_t sndclose; static d_ioctl_t sndioctl; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 9a32f2b..2f659d8 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -85,6 +85,12 @@ struct isa_device { int dummy; }; #include <dev/sound/pcm/mixer.h> #include <dev/sound/pcm/dsp.h> +#define PCM_MODVER 1 + +#define PCM_MINVER 1 +#define PCM_PREFVER PCM_MODVER +#define PCM_MAXVER 1 + #define MAGIC(unit) (0xa4d10de0 + unit) #define SD_F_SIMPLEX 0x00000001 |