summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/audio.c6
-rw-r--r--sys/dev/audio_if.h9
-rw-r--r--sys/dev/isa/ad1848.c14
-rw-r--r--sys/dev/isa/ad1848var.h6
-rw-r--r--sys/dev/isa/ess.c18
-rw-r--r--sys/dev/isa/sbdsp.c14
-rw-r--r--sys/dev/isa/sbdspvar.h6
-rw-r--r--sys/dev/pci/auich.c18
-rw-r--r--sys/dev/pci/autri.c8
-rw-r--r--sys/dev/pci/auvia.c10
-rw-r--r--sys/dev/pci/cmpci.c18
-rw-r--r--sys/dev/pci/cs4280.c18
-rw-r--r--sys/dev/pci/cs4281.c12
-rw-r--r--sys/dev/pci/eap.c12
-rw-r--r--sys/dev/pci/emuxki.c8
-rw-r--r--sys/dev/pci/eso.c14
-rw-r--r--sys/dev/pci/fms.c10
-rw-r--r--sys/dev/pci/maestro.c10
-rw-r--r--sys/dev/pci/neo.c10
-rw-r--r--sys/dev/pci/sv.c18
-rw-r--r--sys/dev/pci/yds.c18
21 files changed, 121 insertions, 136 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 1f87005d193..ce35b021c54 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.34 2002/01/10 18:49:07 mickey Exp $ */
+/* $OpenBSD: audio.c,v 1.35 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: audio.c,v 1.105 1998/09/27 16:43:56 christos Exp $ */
/*
@@ -551,14 +551,10 @@ audio_alloc_ring(sc, r, direction, bufsize)
ROUNDSIZE(bufsize);
if (hw->round_buffersize)
bufsize = hw->round_buffersize(hdl, direction, bufsize);
- else if (hw->round_buffersize_old)
- bufsize = hw->round_buffersize_old(hdl, bufsize);
r->bufsize = bufsize;
if (hw->allocm)
r->start = hw->allocm(hdl, direction, r->bufsize, M_DEVBUF,
M_WAITOK);
- else if (hw->allocm_old)
- r->start = hw->allocm_old(hdl, r->bufsize, M_DEVBUF, M_WAITOK);
else
r->start = malloc(bufsize, M_DEVBUF, M_WAITOK);
if (r->start == 0)
diff --git a/sys/dev/audio_if.h b/sys/dev/audio_if.h
index 0a9ef337802..ad235e13548 100644
--- a/sys/dev/audio_if.h
+++ b/sys/dev/audio_if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio_if.h,v 1.13 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: audio_if.h,v 1.14 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */
/*
@@ -114,9 +114,9 @@ struct audio_hw_if {
/* Allocate/free memory for the ring buffer. Usually malloc/free. */
/* The _old interfaces have been deprecated and will not be
called in newer kernels if the new interfaces are present */
- void *(*allocm_old)__P((void *, unsigned long, int, int));
+ void *(*allocm)__P((void *, int, size_t, int, int));
void (*freem)__P((void *, void *, int));
- unsigned long (*round_buffersize_old)__P((void *, unsigned long));
+ size_t (*round_buffersize)__P((void *, int, size_t));
paddr_t (*mappage)__P((void *, void *, off_t, int));
int (*get_props)__P((void *)); /* device properties */
@@ -125,9 +125,6 @@ struct audio_hw_if {
void (*)(void *), void *, struct audio_params *));
int (*trigger_input)__P((void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *));
-
- void *(*allocm)__P((void *, int, size_t, int, int));
- size_t (*round_buffersize)__P((void *, int, size_t));
};
struct audio_attach_args {
diff --git a/sys/dev/isa/ad1848.c b/sys/dev/isa/ad1848.c
index a849f1d3455..e0bbc384ed8 100644
--- a/sys/dev/isa/ad1848.c
+++ b/sys/dev/isa/ad1848.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad1848.c,v 1.23 2001/11/06 19:53:19 miod Exp $ */
+/* $OpenBSD: ad1848.c,v 1.24 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: ad1848.c,v 1.45 1998/01/30 02:02:38 augustss Exp $ */
/*
@@ -1640,9 +1640,10 @@ ad1848_intr(arg)
}
void *
-ad1848_malloc(addr, size, pool, flags)
+ad1848_malloc(addr, direction, size, pool, flags)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
int pool;
int flags;
{
@@ -1660,10 +1661,11 @@ ad1848_free(addr, ptr, pool)
isa_free(ptr, pool);
}
-unsigned long
-ad1848_round(addr, size)
+size_t
+ad1848_round(addr, direction, size)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
{
if (size > MAX_ISADMA)
size = MAX_ISADMA;
diff --git a/sys/dev/isa/ad1848var.h b/sys/dev/isa/ad1848var.h
index a866a2637a1..0a776ce2df4 100644
--- a/sys/dev/isa/ad1848var.h
+++ b/sys/dev/isa/ad1848var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad1848var.h,v 1.9 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: ad1848var.h,v 1.10 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: ad1848var.h,v 1.22 1998/01/19 22:18:26 augustss Exp $ */
/*
@@ -218,9 +218,9 @@ int ad1848_set_mic_gain __P((struct ad1848_softc *, struct ad1848_volume *));
int ad1848_get_mic_gain __P((struct ad1848_softc *, struct ad1848_volume *));
void ad1848_mute_channel __P((struct ad1848_softc *, int device, int mute));
-void *ad1848_malloc __P((void *, unsigned long, int, int));
+void *ad1848_malloc __P((void *, int, size_t, int, int));
void ad1848_free __P((void *, void *, int));
-unsigned long ad1848_round __P((void *, unsigned long));
+size_t ad1848_round __P((void *, int, size_t));
paddr_t ad1848_mappage __P((void *, void *, off_t, int));
int ad1848_get_props __P((void *));
diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c
index 4e2ad288181..8f096e7afcc 100644
--- a/sys/dev/isa/ess.c
+++ b/sys/dev/isa/ess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ess.c,v 1.5 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: ess.c,v 1.6 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */
/*
@@ -148,9 +148,9 @@ int ess_getdev __P((void *, struct audio_device *));
int ess_set_port __P((void *, mixer_ctrl_t *));
int ess_get_port __P((void *, mixer_ctrl_t *));
-void *ess_malloc __P((void *, unsigned long, int, int));
+void *ess_malloc __P((void *, int, size_t, int, int));
void ess_free __P((void *, void *, int));
-unsigned long ess_round_buffersize __P((void *, unsigned long));
+size_t ess_round_buffersize __P((void *, int, size_t));
paddr_t ess_mappage __P((void *, void *, off_t, int));
@@ -2157,9 +2157,10 @@ ess_query_devinfo(addr, dip)
}
void *
-ess_malloc(addr, size, pool, flags)
+ess_malloc(addr, direction, size, pool, flags)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
int pool, flags;
{
struct ess_softc *sc = addr;
@@ -2181,10 +2182,11 @@ ess_free(addr, ptr, pool)
isa_free(ptr, pool);
}
-unsigned long
-ess_round_buffersize(addr, size)
+size_t
+ess_round_buffersize(addr, direction, size)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
{
if (size > MAX_ISADMA)
size = MAX_ISADMA;
diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c
index a716fa24fb6..d0aadc94253 100644
--- a/sys/dev/isa/sbdsp.c
+++ b/sys/dev/isa/sbdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbdsp.c,v 1.18 2001/11/06 19:53:19 miod Exp $ */
+/* $OpenBSD: sbdsp.c,v 1.19 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -2189,9 +2189,10 @@ sbdsp_mixer_query_devinfo(addr, dip)
}
void *
-sb_malloc(addr, size, pool, flags)
+sb_malloc(addr, direction, size, pool, flags)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
int pool;
int flags;
{
@@ -2216,10 +2217,11 @@ sb_free(addr, ptr, pool)
isa_free(ptr, pool);
}
-unsigned long
-sb_round(addr, size)
+size_t
+sb_round(addr, direction, size)
void *addr;
- unsigned long size;
+ int direction;
+ size_t size;
{
if (size > MAX_ISADMA)
size = MAX_ISADMA;
diff --git a/sys/dev/isa/sbdspvar.h b/sys/dev/isa/sbdspvar.h
index ce8ad78b04d..8efd819f077 100644
--- a/sys/dev/isa/sbdspvar.h
+++ b/sys/dev/isa/sbdspvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbdspvar.h,v 1.13 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: sbdspvar.h,v 1.14 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: sbdspvar.h,v 1.37 1998/08/10 00:20:39 mycroft Exp $ */
/*
@@ -240,9 +240,9 @@ int sbdsp_mixer_set_port __P((void *, mixer_ctrl_t *));
int sbdsp_mixer_get_port __P((void *, mixer_ctrl_t *));
int sbdsp_mixer_query_devinfo __P((void *, mixer_devinfo_t *));
-void *sb_malloc __P((void *, unsigned long, int, int));
+void *sb_malloc __P((void *, int, size_t, int, int));
void sb_free __P((void *, void *, int));
-unsigned long sb_round __P((void *, unsigned long));
+size_t sb_round __P((void *, int, size_t));
paddr_t sb_mappage __P((void *, void *, off_t, int));
int sbdsp_get_props __P((void *));
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index b7e44a9c79b..8c9fcc50f35 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.21 2001/12/31 04:19:55 mickey Exp $ */
+/* $OpenBSD: auich.c,v 1.22 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -221,9 +221,9 @@ int auich_getdev __P((void *, struct audio_device *));
int auich_set_port __P((void *, mixer_ctrl_t *));
int auich_get_port __P((void *, mixer_ctrl_t *));
int auich_query_devinfo __P((void *, mixer_devinfo_t *));
-void *auich_allocm __P((void *, u_long, int, int));
+void *auich_allocm __P((void *, int, size_t, int, int));
void auich_freem __P((void *, void *, int));
-u_long auich_round_buffersize __P((void *, u_long));
+size_t auich_round_buffersize __P((void *, int, size_t));
paddr_t auich_mappage __P((void *, void *, off_t, int));
int auich_get_props __P((void *));
int auich_trigger_output __P((void *, void *, void *, int, void (*)(void *),
@@ -816,9 +816,10 @@ auich_query_devinfo(v, dp)
}
void *
-auich_allocm(v, size, pool, flags)
+auich_allocm(v, direction, size, pool, flags)
void *v;
- u_long size;
+ int direction;
+ size_t size;
int pool, flags;
{
struct auich_softc *sc = v;
@@ -900,10 +901,11 @@ auich_freem(v, ptr, pool)
free(p, pool);
}
-u_long
-auich_round_buffersize(v, size)
+size_t
+auich_round_buffersize(v, direction, size)
void *v;
- u_long size;
+ int direction;
+ size_t size;
{
if (size > AUICH_DMALIST_MAX * AUICH_DMASEG_MAX)
size = AUICH_DMALIST_MAX * AUICH_DMASEG_MAX;
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index f13b29641da..8bb3fffd23e 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.4 2001/12/05 10:00:18 deraadt Exp $ */
+/* $OpenBSD: autri.c,v 1.5 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -171,15 +171,13 @@ struct audio_hw_if autri_hw_if = {
autri_mixer_set_port,
autri_mixer_get_port,
autri_query_devinfo,
- NULL,
+ autri_malloc,
autri_free,
- NULL,
+ autri_round_buffersize,
autri_mappage,
autri_get_props,
autri_trigger_output,
autri_trigger_input,
- autri_malloc,
- autri_round_buffersize,
};
#if NMIDI > 0
diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c
index f174df85b82..d081c97325d 100644
--- a/sys/dev/pci/auvia.c
+++ b/sys/dev/pci/auvia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auvia.c,v 1.13 2001/11/19 17:47:37 mickey Exp $ */
+/* $OpenBSD: auvia.c,v 1.14 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: auvia.c,v 1.7 2000/11/15 21:06:33 jdolecek Exp $ */
/*-
@@ -177,15 +177,13 @@ struct audio_hw_if auvia_hw_if = {
auvia_set_port,
auvia_get_port,
auvia_query_devinfo,
- NULL,
+ auvia_malloc,
auvia_free,
- NULL,
+ auvia_round_buffersize,
auvia_mappage,
auvia_get_props,
auvia_trigger_output,
- auvia_trigger_input,
- auvia_malloc,
- auvia_round_buffersize,
+ auvia_trigger_input
};
int auvia_attach_codec(void *, struct ac97_codec_if *);
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 424685dc0bb..16a7c3b7f3e 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmpci.c,v 1.5 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: cmpci.c,v 1.6 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 2000 Takuya SHIOZAKI
@@ -137,9 +137,9 @@ int cmpci_getdev __P((void *, struct audio_device *));
int cmpci_set_port __P((void *, mixer_ctrl_t *));
int cmpci_get_port __P((void *, mixer_ctrl_t *));
int cmpci_query_devinfo __P((void *, mixer_devinfo_t *));
-void *cmpci_malloc __P((void *, u_long, int, int));
+void *cmpci_malloc __P((void *, int, size_t, int, int));
void cmpci_free __P((void *, void *, int));
-u_long cmpci_round_buffersize __P((void *, u_long));
+size_t cmpci_round_buffersize __P((void *, int, size_t));
paddr_t cmpci_mappage __P((void *, void *, off_t, int));
int cmpci_get_props __P((void *));
int cmpci_trigger_output __P((void *, void *, void *, int,
@@ -1115,9 +1115,10 @@ cmpci_print_dmamem(p)
#endif /* DEBUG */
void *
-cmpci_malloc(handle, size, type, flags)
+cmpci_malloc(handle, direction, size, type, flags)
void *handle;
- u_long size;
+ int direction;
+ size_t size;
int type, flags;
{
struct cmpci_softc *sc = handle;
@@ -1453,10 +1454,11 @@ cmpci_get_port(handle, cp)
}
/* ARGSUSED */
-u_long
-cmpci_round_buffersize(handle, bufsize)
+size_t
+cmpci_round_buffersize(handle, direction, bufsize)
void *handle;
- u_long bufsize;
+ int direction;
+ size_t bufsize;
{
if (bufsize > 0x10000)
bufsize = 0x10000;
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index c11558b3b87..c16b0adec06 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.12 2001/12/01 19:15:13 deraadt Exp $ */
+/* $OpenBSD: cs4280.c,v 1.13 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -211,9 +211,9 @@ int cs4280_getdev __P((void *, struct audio_device *));
int cs4280_mixer_set_port __P((void *, mixer_ctrl_t *));
int cs4280_mixer_get_port __P((void *, mixer_ctrl_t *));
int cs4280_query_devinfo __P((void *addr, mixer_devinfo_t *dip));
-void *cs4280_malloc __P((void *, u_long, int, int));
+void *cs4280_malloc __P((void *, int, size_t, int, int));
void cs4280_free __P((void *, void *, int));
-u_long cs4280_round_buffersize __P((void *, u_long));
+size_t cs4280_round_buffersize __P((void *, int, size_t));
paddr_t cs4280_mappage __P((void *, void *, off_t, int));
int cs4280_get_props __P((void *));
int cs4280_trigger_output __P((void *, void *, void *, int, void (*)(void *),
@@ -1191,10 +1191,11 @@ cs4280_round_blocksize(hdl, blk)
return (blk < CS4280_ICHUNK ? CS4280_ICHUNK : blk & -CS4280_ICHUNK);
}
-u_long
-cs4280_round_buffersize(addr, size)
+size_t
+cs4280_round_buffersize(addr, direction, size)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
{
/* although real dma buffer size is 4KB,
* let the audio.c driver use a larger buffer.
@@ -1390,9 +1391,10 @@ free:
void *
-cs4280_malloc(addr, size, pool, flags)
+cs4280_malloc(addr, direction, size, pool, flags)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
int pool, flags;
{
struct cs4280_softc *sc = addr;
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index 0f6aa1ca3f4..5e20267f831 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.9 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: cs4281.c,v 1.10 2002/01/20 19:56:53 ericj Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -193,8 +193,8 @@ void cs4281_power __P((int, void *));
int cs4281_mixer_set_port __P((void *, mixer_ctrl_t *));
int cs4281_mixer_get_port __P((void *, mixer_ctrl_t *));
int cs4281_query_devinfo __P((void *, mixer_devinfo_t *));
-void *cs4281_malloc __P((void *, u_long, int, int));
-u_long cs4281_round_buffersize __P((void *, u_long));
+void *cs4281_malloc __P((void *, int, size_t, int, int));
+size_t cs4281_round_buffersize __P((void *, int, size_t));
void cs4281_free __P((void *, void *, int));
paddr_t cs4281_mappage __P((void *, void *, off_t, int));
@@ -1359,7 +1359,7 @@ cs4281_query_devinfo(void *addr, mixer_devinfo_t *dip)
}
void *
-cs4281_malloc(void *addr, u_long size, int pool, int flags)
+cs4281_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct cs4281_softc *sc;
struct cs4281_dma *p;
@@ -1406,8 +1406,8 @@ cs4281_free(void *addr, void *ptr, int pool)
}
}
-u_long
-cs4281_round_buffersize(void *addr, u_long size)
+size_t
+cs4281_round_buffersize(void *addr, int direction, size_t size)
{
/* The real dma buffersize are 4KB for CS4280
* and 64kB/MAX_CHANNELS for CS4281.
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index e0938a67dca..8224729c71d 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.15 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: eap.c,v 1.16 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -168,9 +168,9 @@ int eap1370_mixer_get_port(void *, mixer_ctrl_t *);
int eap1371_mixer_set_port(void *, mixer_ctrl_t *);
int eap1371_mixer_get_port(void *, mixer_ctrl_t *);
int eap1370_query_devinfo(void *, mixer_devinfo_t *);
-void *eap_malloc(void *, u_long, int, int);
+void *eap_malloc(void *, int, size_t, int, int);
void eap_free(void *, void *, int);
-u_long eap_round_buffersize(void *, u_long);
+size_t eap_round_buffersize(void *, int, size_t);
paddr_t eap_mappage(void *, void *, off_t, int);
int eap_get_props(void *);
void eap1370_set_mixer(struct eap_softc *sc, int a, int d);
@@ -1550,7 +1550,7 @@ eap1370_query_devinfo(void *addr, mixer_devinfo_t *dip)
}
void *
-eap_malloc(void *addr, u_long size, int pool, int flags)
+eap_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct eap_softc *sc = addr;
struct eap_dma *p;
@@ -1585,8 +1585,8 @@ eap_free(void *addr, void *ptr, int pool)
}
}
-u_long
-eap_round_buffersize(void *addr, u_long size)
+size_t
+eap_round_buffersize(void *addr, int direction, size_t size)
{
return (size);
}
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c
index a1fa65e18e0..e7de938eca6 100644
--- a/sys/dev/pci/emuxki.c
+++ b/sys/dev/pci/emuxki.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuxki.c,v 1.7 2001/11/29 13:05:30 ho Exp $ */
+/* $OpenBSD: emuxki.c,v 1.8 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
@@ -245,15 +245,13 @@ struct audio_hw_if emuxki_hw_if = {
emuxki_set_port,
emuxki_get_port,
emuxki_query_devinfo,
- NULL, /* allocm_old */
+ emuxki_allocm,
emuxki_freem,
- NULL, /* round_buffersize_old */
+ emuxki_round_buffersize,
emuxki_mappage,
emuxki_get_props,
emuxki_trigger_output,
emuxki_trigger_input,
- emuxki_allocm,
- emuxki_round_buffersize
};
/*
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index 31d95b7efb1..6f82e069374 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eso.c,v 1.14 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: eso.c,v 1.15 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: eso.c,v 1.3 1999/08/02 17:37:43 augustss Exp $ */
/*
@@ -161,25 +161,13 @@ HIDE struct audio_hw_if eso_hw_if = {
eso_set_port,
eso_get_port,
eso_query_devinfo,
-#ifdef __OpenBSD__
- 0,
-#else
eso_allocm,
-#endif
eso_freem,
-#ifdef __OpenBSD__
- 0,
-#else
eso_round_buffersize,
-#endif
eso_mappage,
eso_get_props,
eso_trigger_output,
eso_trigger_input,
-#ifdef __OpenBSD__
- eso_allocm,
- eso_round_buffersize
-#endif
};
HIDE const char * const eso_rev2model[] = {
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index 1cfd40d79b9..82852cc41bf 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.5 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: fms.c,v 1.6 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -137,15 +137,13 @@ struct audio_hw_if fms_hw_if = {
fms_set_port,
fms_get_port,
fms_query_devinfo,
- NULL,
+ fms_malloc,
fms_free,
- NULL,
+ fms_round_buffersize,
fms_mappage,
fms_get_props,
fms_trigger_output,
- fms_trigger_input,
- fms_malloc,
- fms_round_buffersize,
+ fms_trigger_input
};
int fms_attach_codec __P((void *, struct ac97_codec_if *));
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 49b39438794..3446651cbfb 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.12 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: maestro.c,v 1.13 2002/01/20 19:56:53 ericj Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -252,15 +252,13 @@ struct audio_hw_if maestro_hw_if = {
maestro_set_port,
maestro_get_port,
maestro_query_devinfo,
- NULL,
+ maestro_malloc,
maestro_free,
- NULL,
+ maestro_round_buffersize,
maestro_mappage,
maestro_get_props,
maestro_trigger_output,
- maestro_trigger_input,
- maestro_malloc,
- maestro_round_buffersize
+ maestro_trigger_input
};
struct audio_device maestro_audev = {
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index 3b0311bf32c..8683e65c21c 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.9 2001/09/16 18:32:34 art Exp $ */
+/* $OpenBSD: neo.c,v 1.10 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -270,15 +270,13 @@ struct audio_hw_if neo_hw_if = {
neo_mixer_set_port,
neo_mixer_get_port,
neo_query_devinfo,
- NULL, /* neo_malloc_old, */
+ neo_malloc,
neo_free,
- NULL, /* neo_round_buffersize_old, */
- 0, /* neo_mappage, */
+ neo_round_buffersize,
+ 0, /* neo_mappage, */
neo_get_props,
neo_trigger_output,
neo_trigger_input,
- neo_malloc,
- neo_round_buffersize,
};
diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c
index 7defd46f441..2e25b57afa0 100644
--- a/sys/dev/pci/sv.c
+++ b/sys/dev/pci/sv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sv.c,v 1.10 2001/10/31 11:00:24 art Exp $ */
+/* $OpenBSD: sv.c,v 1.11 2002/01/20 19:56:53 ericj Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
@@ -157,9 +157,9 @@ int sv_getdev __P((void *, struct audio_device *));
int sv_mixer_set_port __P((void *, mixer_ctrl_t *));
int sv_mixer_get_port __P((void *, mixer_ctrl_t *));
int sv_query_devinfo __P((void *, mixer_devinfo_t *));
-void *sv_malloc __P((void *, u_long, int, int));
+void *sv_malloc __P((void *, int, size_t, int, int));
void sv_free __P((void *, void *, int));
-u_long sv_round __P((void *, u_long));
+size_t sv_round __P((void *, int, size_t));
paddr_t sv_mappage __P((void *, void *, off_t, int));
int sv_get_props __P((void *));
@@ -1441,9 +1441,10 @@ sv_init_mixer(sc)
}
void *
-sv_malloc(addr, size, pool, flags)
+sv_malloc(addr, direction, size, pool, flags)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
int pool;
int flags;
{
@@ -1483,10 +1484,11 @@ sv_free(addr, ptr, pool)
}
}
-u_long
-sv_round(addr, size)
+size_t
+sv_round(addr, direction, size)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
{
return (size);
}
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 349eef48de6..80c8b54f82f 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.12 2002/01/06 23:01:40 ericj Exp $ */
+/* $OpenBSD: yds.c,v 1.13 2002/01/20 19:56:53 ericj Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -171,9 +171,9 @@ int yds_halt_input __P((void *));
int yds_getdev __P((void *, struct audio_device *));
int yds_mixer_set_port __P((void *, mixer_ctrl_t *));
int yds_mixer_get_port __P((void *, mixer_ctrl_t *));
-void *yds_malloc __P((void *, u_long, int, int));
+void *yds_malloc __P((void *, int, size_t, int, int));
void yds_free __P((void *, void *, int));
-u_long yds_round_buffersize __P((void *, u_long));
+size_t yds_round_buffersize __P((void *, int, size_t));
paddr_t yds_mappage __P((void *, void *, off_t, int));
int yds_get_props __P((void *));
int yds_query_devinfo __P((void *addr, mixer_devinfo_t *dip));
@@ -1667,9 +1667,10 @@ yds_get_portnum_by_name(sc, class, device, qualifier)
}
void *
-yds_malloc(addr, size, pool, flags)
+yds_malloc(addr, direction, size, pool, flags)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
int pool, flags;
{
struct yds_softc *sc = addr;
@@ -1721,10 +1722,11 @@ yds_find_dma(sc, addr)
return p;
}
-u_long
-yds_round_buffersize(addr, size)
+size_t
+yds_round_buffersize(addr, direction, size)
void *addr;
- u_long size;
+ int direction;
+ size_t size;
{
/*
* Buffer size should be at least twice as bigger as a frame.