Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.
This commit is contained in:
parent
88ad3aa42b
commit
e5f5e628d2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: audio.c,v 1.110 1998/12/27 23:25:32 augustss Exp $ */
|
||||
/* $NetBSD: audio.c,v 1.111 1999/02/17 02:37:38 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -141,7 +141,7 @@ static __inline void audio_pint_silence
|
||||
__P((struct audio_softc *, struct audio_ringbuffer *, u_char *, int));
|
||||
|
||||
int audio_alloc_ring
|
||||
__P((struct audio_softc *, struct audio_ringbuffer *, int));
|
||||
__P((struct audio_softc *, struct audio_ringbuffer *, int, size_t));
|
||||
void audio_free_ring __P((struct audio_softc *, struct audio_ringbuffer *));
|
||||
|
||||
int audioprobe __P((struct device *, struct cfdata *, void *));
|
||||
@ -243,13 +243,13 @@ audioattach(parent, self, aux)
|
||||
sc->hw_hdl = hdlp;
|
||||
sc->sc_dev = parent;
|
||||
|
||||
error = audio_alloc_ring(sc, &sc->sc_pr, AU_RING_SIZE);
|
||||
error = audio_alloc_ring(sc, &sc->sc_pr, AUMODE_PLAY, AU_RING_SIZE);
|
||||
if (error) {
|
||||
sc->hw_if = 0;
|
||||
printf("audio: could not allocate play buffer\n");
|
||||
return;
|
||||
}
|
||||
error = audio_alloc_ring(sc, &sc->sc_rr, AU_RING_SIZE);
|
||||
error = audio_alloc_ring(sc, &sc->sc_rr, AUMODE_RECORD, AU_RING_SIZE);
|
||||
if (error) {
|
||||
audio_free_ring(sc, &sc->sc_pr);
|
||||
sc->hw_if = 0;
|
||||
@ -428,28 +428,29 @@ audio_print_params(s, p)
|
||||
#endif
|
||||
|
||||
int
|
||||
audio_alloc_ring(sc, r, bufsize)
|
||||
audio_alloc_ring(sc, r, direction, bufsize)
|
||||
struct audio_softc *sc;
|
||||
struct audio_ringbuffer *r;
|
||||
int bufsize;
|
||||
int direction;
|
||||
size_t bufsize;
|
||||
{
|
||||
struct audio_hw_if *hw = sc->hw_if;
|
||||
void *hdl = sc->hw_hdl;
|
||||
/*
|
||||
* Alloc DMA play and record buffers
|
||||
*/
|
||||
ROUNDSIZE(bufsize);
|
||||
if (bufsize < AUMINBUF)
|
||||
bufsize = AUMINBUF;
|
||||
ROUNDSIZE(bufsize);
|
||||
if (hw->round_buffersize)
|
||||
bufsize = hw->round_buffersize(hdl, bufsize);
|
||||
r->bufsize = bufsize;
|
||||
bufsize = hw->round_buffersize(hdl, direction, bufsize);
|
||||
if (hw->allocm)
|
||||
r->start = hw->allocm(hdl, r->bufsize, M_DEVBUF, M_WAITOK);
|
||||
r->start = hw->allocm(hdl, direction, bufsize, M_DEVBUF, M_WAITOK);
|
||||
else
|
||||
r->start = malloc(bufsize, M_DEVBUF, M_WAITOK);
|
||||
r->start = malloc(bufsize, M_DEVBUF, M_WAITOK);
|
||||
if (r->start == 0)
|
||||
return ENOMEM;
|
||||
r->bufsize = bufsize;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -458,11 +459,12 @@ audio_free_ring(sc, r)
|
||||
struct audio_softc *sc;
|
||||
struct audio_ringbuffer *r;
|
||||
{
|
||||
if (sc->hw_if->freem) {
|
||||
sc->hw_if->freem(sc->hw_hdl, r->start, M_DEVBUF);
|
||||
} else {
|
||||
free(r->start, M_DEVBUF);
|
||||
}
|
||||
|
||||
if (sc->hw_if->freem)
|
||||
sc->hw_if->freem(sc->hw_hdl, r->start, M_DEVBUF);
|
||||
else
|
||||
free(r->start, M_DEVBUF);
|
||||
r->start = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: audio_if.h,v 1.30 1998/08/17 21:16:11 augustss Exp $ */
|
||||
/* $NetBSD: audio_if.h,v 1.31 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Havard Eidnes.
|
||||
@ -111,9 +111,9 @@ struct audio_hw_if {
|
||||
int (*query_devinfo)__P((void *, mixer_devinfo_t *));
|
||||
|
||||
/* Allocate/free memory for the ring buffer. Usually malloc/free. */
|
||||
void *(*allocm)__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)__P((void *, unsigned long));
|
||||
size_t (*round_buffersize)__P((void *, int, size_t));
|
||||
int (*mappage)__P((void *, void *, int, int));
|
||||
|
||||
int (*get_props)__P((void *)); /* device properties */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: audiovar.h,v 1.18 1998/03/03 09:16:16 augustss Exp $ */
|
||||
/* $NetBSD: audiovar.h,v 1.19 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -50,7 +50,7 @@
|
||||
#define AUMINBLK 32
|
||||
#define AUMINNOBLK 3
|
||||
struct audio_ringbuffer {
|
||||
int bufsize; /* allocated memory */
|
||||
size_t bufsize; /* allocated memory */
|
||||
int blksize; /* I/O block size */
|
||||
int maxblks; /* no of blocks in ring */
|
||||
u_char *start; /* start of buffer area */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: interwave.c,v 1.8 1998/08/17 21:16:12 augustss Exp $ */
|
||||
/* $NetBSD: interwave.c,v 1.9 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -1030,7 +1030,7 @@ iw_init_input(addr, buf, cc)
|
||||
|
||||
DPRINTF(("iw_init_input\n"));
|
||||
|
||||
isa_dmastart(sc->sc_ic, sc->sc_playdrq, buf,
|
||||
isa_dmastart(sc->sc_ic, sc->sc_recdrq, buf,
|
||||
cc, NULL, DMAMODE_READ | DMAMODE_LOOP, BUS_DMA_NOWAIT);
|
||||
return 0;
|
||||
}
|
||||
@ -1078,7 +1078,6 @@ iw_start_output(addr, p, cc, intr, arg)
|
||||
if (sc->play_precision == 16)
|
||||
cc >>= 1;
|
||||
|
||||
|
||||
if (sc->play_channels == 2 && sc->play_encoding != AUDIO_ENCODING_ADPCM)
|
||||
cc >>= 1;
|
||||
|
||||
@ -1140,9 +1139,8 @@ iw_start_input(addr, p, cc, intr, arg)
|
||||
cc, NULL, DMAMODE_READ, BUS_DMA_NOWAIT);
|
||||
|
||||
|
||||
if (sc->rec_encoding == AUDIO_ENCODING_ADPCM) {
|
||||
if (sc->rec_encoding == AUDIO_ENCODING_ADPCM)
|
||||
cc >>= 2;
|
||||
}
|
||||
if (sc->rec_precision == 16)
|
||||
cc >>= 1;
|
||||
|
||||
@ -1611,15 +1609,20 @@ iw_query_devinfo(addr, dip)
|
||||
|
||||
|
||||
void *
|
||||
iw_malloc(addr, size, pool, flags)
|
||||
iw_malloc(addr, direction, size, pool, flags)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct iw_softc *sc = addr;
|
||||
int drq;
|
||||
|
||||
return isa_malloc(sc->sc_ic, 4, size, pool, flags);
|
||||
if (direction == AUMODE_PLAY)
|
||||
drq = sc->sc_playdrq;
|
||||
else
|
||||
drq = sc->sc_recdrq;
|
||||
return (isa_malloc(sc->sc_ic, drq, size, pool, flags));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1632,13 +1635,14 @@ iw_free(addr, ptr, pool)
|
||||
}
|
||||
|
||||
u_long
|
||||
iw_round(addr, size)
|
||||
iw_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
if (size > MAX_ISADMA)
|
||||
size = MAX_ISADMA;
|
||||
return size;
|
||||
return (size);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef INTERWAVEVAR_H
|
||||
#define INTERWAVEVAR_H
|
||||
|
||||
/* $NetBSD: interwavevar.h,v 1.4 1998/06/10 10:24:13 bouyer Exp $ */
|
||||
/* $NetBSD: interwavevar.h,v 1.5 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -245,9 +245,9 @@ int iw_get_port __P((void *, mixer_ctrl_t *));
|
||||
|
||||
int iw_query_devinfo __P((void *, mixer_devinfo_t *));
|
||||
|
||||
void * iw_malloc __P((void *, u_long, int, int));
|
||||
void * iw_malloc __P((void *, int, size_t, int, int));
|
||||
void iw_free __P((void *,void *,int));
|
||||
u_long iw_round __P((void *, u_long));
|
||||
size_t iw_round_buffersize __P((void *, int, size_t));
|
||||
int iw_mappage __P((void *, void *, int, int));
|
||||
int iw_get_props __P((void *));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ad1848_isa.c,v 1.4 1998/11/26 21:45:13 hannken Exp $ */
|
||||
/* $NetBSD: ad1848_isa.c,v 1.5 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -639,15 +639,20 @@ ad1848_isa_intr(arg)
|
||||
}
|
||||
|
||||
void *
|
||||
ad1848_isa_malloc(addr, size, pool, flags)
|
||||
ad1848_isa_malloc(addr, direction, size, pool, flags)
|
||||
void *addr;
|
||||
unsigned long size;
|
||||
int pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct ad1848_isa_softc *isc = addr;
|
||||
int drq;
|
||||
|
||||
return isa_malloc(isc->sc_ic, 4, size, pool, flags);
|
||||
if (direction == AUMODE_PLAY)
|
||||
drq = isc->sc_drq;
|
||||
else
|
||||
drq = isc->sc_recdrq;
|
||||
return (isa_malloc(isc->sc_ic, drq, size, pool, flags));
|
||||
}
|
||||
|
||||
void
|
||||
@ -659,14 +664,15 @@ ad1848_isa_free(addr, ptr, pool)
|
||||
isa_free(ptr, pool);
|
||||
}
|
||||
|
||||
unsigned long
|
||||
ad1848_isa_round(addr, size)
|
||||
size_t
|
||||
ad1848_isa_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
unsigned long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
if (size > MAX_ISADMA)
|
||||
size = MAX_ISADMA;
|
||||
return size;
|
||||
return (size);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ad1848var.h,v 1.25 1998/08/25 22:34:29 pk Exp $ */
|
||||
/* $NetBSD: ad1848var.h,v 1.26 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -92,9 +92,9 @@ int ad1848_isa_dma_input __P((void *, void *, int,
|
||||
|
||||
int ad1848_isa_intr __P((void *));
|
||||
|
||||
void *ad1848_isa_malloc __P((void *, unsigned long, int, int));
|
||||
void *ad1848_isa_malloc __P((void *, int, size_t, int, int));
|
||||
void ad1848_isa_free __P((void *, void *, int));
|
||||
unsigned long ad1848_isa_round __P((void *, unsigned long));
|
||||
size_t ad1848_isa_round_buffersize __P((void *, int, size_t));
|
||||
int ad1848_isa_mappage __P((void *, void *, int, int));
|
||||
int ad1848_isa_get_props __P((void *));
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ess.c,v 1.29 1999/02/17 01:25:32 mycroft Exp $ */
|
||||
/* $NetBSD: ess.c,v 1.30 1999/02/17 02:37:39 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997
|
||||
@ -137,9 +137,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 __P((void *, unsigned long));
|
||||
size_t ess_round_buffersize __P((void *, int, size_t));
|
||||
int ess_mappage __P((void *, void *, int, int));
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ struct audio_hw_if ess_hw_if = {
|
||||
ess_query_devinfo,
|
||||
ess_malloc,
|
||||
ess_free,
|
||||
ess_round,
|
||||
ess_round_buffersize,
|
||||
ess_mappage,
|
||||
ess_get_props,
|
||||
ess_trigger_output,
|
||||
@ -1788,15 +1788,20 @@ 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 pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct ess_softc *sc = addr;
|
||||
int drq;
|
||||
|
||||
return isa_malloc(sc->sc_ic, min(sc->sc_in.drq, sc->sc_out.drq), size, pool, flags);
|
||||
if (direction == AUMODE_PLAY)
|
||||
drq = sc->sc_out.drq;
|
||||
else
|
||||
drq = sc->sc_in.drq;
|
||||
return (isa_malloc(sc->sc_ic, drq, size, pool, flags));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1808,14 +1813,15 @@ ess_free(addr, ptr, pool)
|
||||
isa_free(ptr, pool);
|
||||
}
|
||||
|
||||
unsigned long
|
||||
ess_round(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;
|
||||
return size;
|
||||
return (size);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gus.c,v 1.63 1998/09/09 04:40:34 thorpej Exp $ */
|
||||
/* $NetBSD: gus.c,v 1.64 1999/02/17 02:37:41 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -605,7 +605,7 @@ struct audio_hw_if gus_hw_if = {
|
||||
gus_mixer_query_devinfo,
|
||||
ad1848_isa_malloc,
|
||||
ad1848_isa_free,
|
||||
ad1848_isa_round,
|
||||
ad1848_isa_round_buffersize,
|
||||
ad1848_isa_mappage,
|
||||
gus_get_props,
|
||||
};
|
||||
@ -640,7 +640,7 @@ static struct audio_hw_if gusmax_hw_if = {
|
||||
gusmax_mixer_query_devinfo,
|
||||
ad1848_isa_malloc,
|
||||
ad1848_isa_free,
|
||||
ad1848_isa_round,
|
||||
ad1848_isa_round_buffersize,
|
||||
ad1848_isa_mappage,
|
||||
gusmax_get_props,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pas.c,v 1.44 1998/08/17 21:16:14 augustss Exp $ */
|
||||
/* $NetBSD: pas.c,v 1.45 1999/02/17 02:37:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -141,7 +141,7 @@ struct audio_hw_if pas_hw_if = {
|
||||
sbdsp_mixer_query_devinfo,
|
||||
sb_malloc,
|
||||
sb_free,
|
||||
sb_round,
|
||||
sb_round_buffersize,
|
||||
sb_mappage,
|
||||
sbdsp_get_props,
|
||||
sbdsp_trigger_output,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pss.c,v 1.50 1998/12/05 10:49:24 dbj Exp $ */
|
||||
/* $NetBSD: pss.c,v 1.51 1999/02/17 02:37:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -242,7 +242,7 @@ struct audio_hw_if pss_audio_if = {
|
||||
pss_query_devinfo,
|
||||
ad1848_isa_malloc,
|
||||
ad1848_isa_free,
|
||||
ad1848_isa_round,
|
||||
ad1848_isa_round_buffersize,
|
||||
ad1848_isa_mappage,
|
||||
ad1848_isa_get_props,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sb.c,v 1.63 1998/08/17 21:16:15 augustss Exp $ */
|
||||
/* $NetBSD: sb.c,v 1.64 1999/02/17 02:37:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -120,7 +120,7 @@ struct audio_hw_if sb_hw_if = {
|
||||
sbdsp_mixer_query_devinfo,
|
||||
sb_malloc,
|
||||
sb_free,
|
||||
sb_round,
|
||||
sb_round_buffersize,
|
||||
sb_mappage,
|
||||
sbdsp_get_props,
|
||||
sbdsp_trigger_output,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbdsp.c,v 1.90 1999/02/17 01:22:47 mycroft Exp $ */
|
||||
/* $NetBSD: sbdsp.c,v 1.91 1999/02/17 02:37:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -2190,11 +2190,11 @@ 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 pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct sbdsp_softc *sc = addr;
|
||||
int drq;
|
||||
@ -2216,9 +2216,10 @@ sb_free(addr, ptr, pool)
|
||||
}
|
||||
|
||||
unsigned long
|
||||
sb_round(addr, size)
|
||||
sb_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
unsigned long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
if (size > MAX_ISADMA)
|
||||
size = MAX_ISADMA;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbdspvar.h,v 1.37 1998/08/10 00:20:39 mycroft Exp $ */
|
||||
/* $NetBSD: sbdspvar.h,v 1.38 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -235,9 +235,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_buffersize __P((void *, int, size_t));
|
||||
int sb_mappage __P((void *, void *, int, int));
|
||||
|
||||
int sbdsp_get_props __P((void *));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wss.c,v 1.54 1998/12/08 14:26:57 augustss Exp $ */
|
||||
/* $NetBSD: wss.c,v 1.55 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -87,7 +87,7 @@ struct audio_hw_if wss_hw_if = {
|
||||
NULL,
|
||||
ad1848_query_encoding,
|
||||
ad1848_set_params,
|
||||
ad1848_round_blocksize,
|
||||
ad1848_isa_round_blocksize,
|
||||
ad1848_commit_settings,
|
||||
ad1848_isa_dma_init_output,
|
||||
ad1848_isa_dma_init_input,
|
||||
@ -103,7 +103,7 @@ struct audio_hw_if wss_hw_if = {
|
||||
wss_query_devinfo,
|
||||
ad1848_isa_malloc,
|
||||
ad1848_isa_free,
|
||||
ad1848_isa_round,
|
||||
ad1848_isa_round_buffersize,
|
||||
ad1848_isa_mappage,
|
||||
ad1848_isa_get_props,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ym.c,v 1.6 1998/10/11 17:02:36 augustss Exp $ */
|
||||
/* $NetBSD: ym.c,v 1.7 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
|
||||
/*
|
||||
@ -70,7 +70,7 @@ struct audio_hw_if ym_hw_if = {
|
||||
NULL,
|
||||
ad1848_query_encoding,
|
||||
ad1848_set_params,
|
||||
ad1848_round_blocksize,
|
||||
ad1848_isa_round_blocksize,
|
||||
ad1848_commit_settings,
|
||||
ad1848_isa_dma_init_output,
|
||||
ad1848_isa_dma_init_input,
|
||||
@ -86,7 +86,7 @@ struct audio_hw_if ym_hw_if = {
|
||||
ym_query_devinfo,
|
||||
ad1848_isa_malloc,
|
||||
ad1848_isa_free,
|
||||
ad1848_isa_round,
|
||||
ad1848_isa_round_buffersize,
|
||||
ad1848_isa_mappage,
|
||||
ad1848_isa_get_props,
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "guspnp.h"
|
||||
#if NGUSPNP > 0
|
||||
|
||||
/* $NetBSD: gus_isapnp.c,v 1.9 1998/07/23 19:30:45 christos Exp $ */
|
||||
/* $NetBSD: gus_isapnp.c,v 1.10 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -103,7 +103,7 @@ static struct audio_hw_if guspnp_hw_if = {
|
||||
iw_query_devinfo,
|
||||
iw_malloc,
|
||||
iw_free,
|
||||
iw_round,
|
||||
iw_round_buffersize,
|
||||
iw_mappage,
|
||||
iw_get_props,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: eap.c,v 1.20 1999/01/08 19:22:36 augustss Exp $ */
|
||||
/* $NetBSD: eap.c,v 1.21 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -306,9 +306,9 @@ int eap_getdev __P((void *, struct audio_device *));
|
||||
int eap_mixer_set_port __P((void *, mixer_ctrl_t *));
|
||||
int eap_mixer_get_port __P((void *, mixer_ctrl_t *));
|
||||
int eap_query_devinfo __P((void *, mixer_devinfo_t *));
|
||||
void *eap_malloc __P((void *, u_long, int, int));
|
||||
void *eap_malloc __P((void *, int, size_t, int, int));
|
||||
void eap_free __P((void *, void *, int));
|
||||
u_long eap_round __P((void *, u_long));
|
||||
size_t eap_round_buffersize __P((void *, int, size_t));
|
||||
int eap_mappage __P((void *, void *, int, int));
|
||||
int eap_get_props __P((void *));
|
||||
void eap_write_codec __P((struct eap_softc *sc, int a, int d));
|
||||
@ -336,7 +336,7 @@ struct audio_hw_if eap_hw_if = {
|
||||
eap_query_devinfo,
|
||||
eap_malloc,
|
||||
eap_free,
|
||||
eap_round,
|
||||
eap_round_buffersize,
|
||||
eap_mappage,
|
||||
eap_get_props,
|
||||
eap_trigger_output,
|
||||
@ -1262,11 +1262,11 @@ eap_query_devinfo(addr, dip)
|
||||
}
|
||||
|
||||
void *
|
||||
eap_malloc(addr, size, pool, flags)
|
||||
eap_malloc(addr, direction, size, pool, flags)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct eap_softc *sc = addr;
|
||||
struct eap_dma *p;
|
||||
@ -1304,10 +1304,11 @@ eap_free(addr, ptr, pool)
|
||||
}
|
||||
}
|
||||
|
||||
u_long
|
||||
eap_round(addr, size)
|
||||
size_t
|
||||
eap_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
return (size);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sv.c,v 1.1 1998/12/10 18:47:19 augustss Exp $ */
|
||||
/* $NetBSD: sv.c,v 1.2 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
/* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */
|
||||
|
||||
/*
|
||||
@ -113,9 +113,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_buffersize __P((void *, int, size_t));
|
||||
int sv_mappage __P((void *, void *, int, int));
|
||||
int sv_get_props __P((void *));
|
||||
|
||||
@ -145,7 +145,7 @@ struct audio_hw_if sv_hw_if = {
|
||||
sv_query_devinfo,
|
||||
sv_malloc,
|
||||
sv_free,
|
||||
sv_round,
|
||||
sv_round_buffersize,
|
||||
sv_mappage,
|
||||
sv_get_props,
|
||||
};
|
||||
@ -1367,11 +1367,11 @@ sv_init_mixer(sc)
|
||||
}
|
||||
|
||||
void *
|
||||
sv_malloc(addr, size, pool, flags)
|
||||
sv_malloc(addr, direction, size, pool, flags)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct sv_softc *sc = addr;
|
||||
struct sv_dma *p;
|
||||
@ -1409,10 +1409,11 @@ sv_free(addr, ptr, pool)
|
||||
}
|
||||
}
|
||||
|
||||
u_long
|
||||
sv_round(addr, size)
|
||||
size_t
|
||||
sv_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
return (size);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cs4231_sbus.c,v 1.7 1999/01/12 02:28:55 kleink Exp $ */
|
||||
/* $NetBSD: cs4231_sbus.c,v 1.8 1999/02/17 02:37:42 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -237,7 +237,7 @@ struct audio_device cs4231_device = {
|
||||
*/
|
||||
int cs4231_open __P((void *, int));
|
||||
void cs4231_close __P((void *));
|
||||
u_long cs4231_round_buffersize __P((void *, u_long));
|
||||
size_t cs4231_round_buffersize __P((void *, int, size_t));
|
||||
int cs4231_round_blocksize __P((void *, int));
|
||||
int cs4231_halt_output __P((void *));
|
||||
int cs4231_halt_input __P((void *));
|
||||
@ -247,7 +247,7 @@ int cs4231_get_port __P((void *, mixer_ctrl_t *));
|
||||
int cs4231_query_devinfo __P((void *, mixer_devinfo_t *));
|
||||
int cs4231_get_props __P((void *));
|
||||
|
||||
void *cs4231_malloc __P((void *, u_long, int, int));
|
||||
void *cs4231_malloc __P((void *, int, size_t, int, int));
|
||||
void cs4231_free __P((void *, void *, int));
|
||||
int cs4231_trigger_output __P((void *, void *, void *, int,
|
||||
void (*)(void *), void *,
|
||||
@ -456,11 +456,11 @@ cs4231_init(sc)
|
||||
}
|
||||
|
||||
void *
|
||||
cs4231_malloc(addr, size, pool, flags)
|
||||
cs4231_malloc(addr, direction, size, pool, flags)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int pool;
|
||||
int flags;
|
||||
int direction;
|
||||
size_t size;
|
||||
int pool, flags;
|
||||
{
|
||||
struct cs4231_softc *sc = addr;
|
||||
struct cs_dma *p;
|
||||
@ -566,10 +566,11 @@ cs4231_close(addr)
|
||||
DPRINTF(("sa_close: closed.\n"));
|
||||
}
|
||||
|
||||
u_long
|
||||
cs4231_round_buffersize(addr, size)
|
||||
size_t
|
||||
cs4231_round_buffersize(addr, direction, size)
|
||||
void *addr;
|
||||
u_long size;
|
||||
int direction;
|
||||
size_t size;
|
||||
{
|
||||
#if 0
|
||||
if (size > APC_MAX)
|
||||
|
Loading…
Reference in New Issue
Block a user