Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/kent-audio1]: src/sys audio_hw_if change
details: https://anonhg.NetBSD.org/src/rev/3108a454b134
branches: kent-audio1
changeset: 571732:3108a454b134
user: kent <kent%NetBSD.org@localhost>
date: Sun Jan 09 08:42:44 2005 +0000
description:
audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
diffstat:
sys/arch/amiga/dev/aucc.c | 9 +++++----
sys/arch/amiga/dev/repulse.c | 17 +++++------------
sys/arch/amiga/dev/toccata.c | 10 ++++++----
sys/arch/arm/iomd/vidcaudio.c | 22 +++++++---------------
sys/arch/dreamcast/dev/g2/aica.c | 8 ++++----
sys/arch/hp700/gsc/harmony.c | 7 ++++---
sys/arch/hpcmips/vr/vraiu.c | 8 ++++----
sys/arch/macppc/dev/awacs.c | 21 +++++++--------------
sys/arch/macppc/dev/snapper.c | 19 ++++++-------------
sys/arch/sgimips/hpc/haltwo.c | 29 +++++++----------------------
sys/dev/audio.c | 33 +++++++++++++++++++--------------
sys/dev/audio_if.h | 4 ++--
sys/dev/ebus/cs4231_ebus.c | 11 +++++++----
sys/dev/ic/ad1848.c | 7 ++++---
sys/dev/ic/ad1848var.h | 4 ++--
sys/dev/ic/am7930.c | 8 +++++---
sys/dev/ic/am7930var.h | 4 ++--
sys/dev/ic/interwave.c | 8 +++++---
sys/dev/ic/interwavevar.h | 4 ++--
sys/dev/ic/tms320av110.c | 10 ++++++----
sys/dev/isa/aria.c | 10 ++++++----
sys/dev/isa/ess.c | 10 ++++++----
sys/dev/isa/gus.c | 23 ++++++++++++++---------
sys/dev/isa/sbdsp.c | 8 +++++---
sys/dev/isa/sbdspvar.h | 4 ++--
sys/dev/pci/auacer.c | 27 ++++++---------------------
sys/dev/pci/auich.c | 25 ++++++-------------------
sys/dev/pci/autri.c | 20 +++++++-------------
sys/dev/pci/auvia.c | 29 +++++++----------------------
sys/dev/pci/cmpci.c | 32 ++++++++------------------------
sys/dev/pci/cs4280.c | 8 ++++----
sys/dev/pci/cs4281.c | 8 ++++----
sys/dev/pci/cs428x.c | 18 ++++--------------
sys/dev/pci/cs428x.h | 6 ++----
sys/dev/pci/eap.c | 21 ++++++---------------
sys/dev/pci/emuxki.c | 9 +++++----
sys/dev/pci/esa.c | 28 ++++++----------------------
sys/dev/pci/esm.c | 26 +++++---------------------
sys/dev/pci/esmvar.h | 6 ++----
sys/dev/pci/eso.c | 32 ++++++++------------------------
sys/dev/pci/fms.c | 33 ++++++++-------------------------
sys/dev/pci/neo.c | 29 ++++++-----------------------
sys/dev/pci/sv.c | 22 +++++++---------------
sys/dev/pci/yds.c | 8 ++++----
sys/dev/pcmcia/esl.c | 8 ++++----
sys/dev/tc/bba.c | 10 ++++++----
sys/dev/usb/uaudio.c | 9 +++++----
47 files changed, 262 insertions(+), 450 deletions(-)
diffs (truncated from 2278 to 300 lines):
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/amiga/dev/aucc.c
--- a/sys/arch/amiga/dev/aucc.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/amiga/dev/aucc.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aucc.c,v 1.35.2.1 2005/01/03 16:42:02 kent Exp $ */
+/* $NetBSD: aucc.c,v 1.35.2.2 2005/01/09 08:42:44 kent Exp $ */
/*
* Copyright (c) 1999 Bernardo Innocenti
@@ -53,7 +53,7 @@
#if NAUCC > 0
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.35.2.1 2005/01/03 16:42:02 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.35.2.2 2005/01/09 08:42:44 kent Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -191,7 +191,7 @@
void aucc_close(void *);
int aucc_set_out_sr(void *, u_int);
int aucc_query_encoding(void *, struct audio_encoding *);
-int aucc_round_blocksize(void *, int);
+int aucc_round_blocksize(void *, int, int, const audio_params_t *);
int aucc_commit_settings(void *);
int aucc_start_output(void *, void *, int, void (*)(void *), void *);
int aucc_start_input(void *, void *, int, void (*)(void *), void *);
@@ -604,7 +604,8 @@
}
int
-aucc_round_blocksize(void *addr, int blk)
+aucc_round_blocksize(void *addr, int blk,
+ int mode, const audio_params_t *param)
{
/* round up to even size */
return blk > AUDIO_BUF_SIZE ? AUDIO_BUF_SIZE : blk;
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/amiga/dev/repulse.c
--- a/sys/arch/amiga/dev/repulse.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/amiga/dev/repulse.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: repulse.c,v 1.11.2.1 2005/01/03 16:42:02 kent Exp $ */
+/* $NetBSD: repulse.c,v 1.11.2.2 2005/01/09 08:42:44 kent Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.11.2.1 2005/01/03 16:42:02 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.11.2.2 2005/01/09 08:42:44 kent Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -80,7 +80,6 @@
/* audio attachment functions */
-int rep_open(void *, int);
void rep_close(void *);
int rep_getdev(void *, struct audio_device *);
int rep_get_props(void *);
@@ -89,7 +88,7 @@
int rep_query_encoding(void *, struct audio_encoding *);
int rep_set_params(void *, int, int, audio_params_t *,
audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
-int rep_round_blocksize(void *, int);
+int rep_round_blocksize(void *, int, int, const audio_params_t *);
int rep_set_port(void *, mixer_ctrl_t *);
int rep_get_port(void *, mixer_ctrl_t *);
int rep_query_devinfo(void *, mixer_devinfo_t *);
@@ -104,7 +103,7 @@
/* audio attachment */
const struct audio_hw_if rep_hw_if = {
- rep_open,
+ /* open */ 0,
rep_close,
/* drain */ 0,
rep_query_encoding,
@@ -418,12 +417,6 @@
/* audio(9) support stuff which is not ac97-constant */
-int
-rep_open(void *arg, int flags)
-{
- return 0;
-}
-
void
rep_close(void *arg)
{
@@ -550,7 +543,7 @@
}
int
-rep_round_blocksize(void *arg, int blk)
+rep_round_blocksize(void *arg, int blk, int mode, const audio_params_t *param)
{
int b1;
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/amiga/dev/toccata.c
--- a/sys/arch/amiga/dev/toccata.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/amiga/dev/toccata.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: toccata.c,v 1.8 2004/10/29 12:57:16 yamt Exp $ */
+/* $NetBSD: toccata.c,v 1.8.2.1 2005/01/09 08:42:44 kent Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.8 2004/10/29 12:57:16 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.8.2.1 2005/01/09 08:42:44 kent Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -165,7 +165,7 @@
int toccata_readreg(struct ad1848_softc *, int);
void toccata_writereg(struct ad1848_softc *, int, int);
-int toccata_round_blocksize(void *, int);
+int toccata_round_blocksize(void *, int, int, const audio_params_t *);
size_t toccata_round_buffersize(void *, int, size_t);
int toccata_open(void *, int);
@@ -407,7 +407,9 @@
}
int
-toccata_round_blocksize(void *addr, int blk) {
+toccata_round_blocksize(void *addr, int blk,
+ int mode, const audio_params_t *param)
+{
int ret;
ret = blk > 512 ? 512 : (blk & -4);
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/arm/iomd/vidcaudio.c
--- a/sys/arch/arm/iomd/vidcaudio.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/arm/iomd/vidcaudio.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidcaudio.c,v 1.40.2.2 2005/01/05 03:31:37 kent Exp $ */
+/* $NetBSD: vidcaudio.c,v 1.40.2.3 2005/01/09 08:42:44 kent Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson
@@ -65,7 +65,7 @@
#include <sys/param.h> /* proc.h */
-__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.40.2.2 2005/01/05 03:31:37 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.40.2.3 2005/01/09 08:42:44 kent Exp $");
#include <sys/audioio.h>
#include <sys/conf.h> /* autoconfig functions */
@@ -134,7 +134,6 @@
static int vidcaudio_probe(struct device *, struct cfdata *, void *);
static void vidcaudio_attach(struct device *, struct device *, void *);
-static int vidcaudio_open(void *, int);
static void vidcaudio_close(void *);
static int vidcaudio_intr(void *);
@@ -153,7 +152,7 @@
static int vidcaudio_query_encoding(void *, struct audio_encoding *);
static int vidcaudio_set_params(void *, int, int, audio_params_t *,
audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
-static int vidcaudio_round_blocksize(void *, int);
+static int vidcaudio_round_blocksize(void *, int, int, const audio_params_t *);
static int vidcaudio_trigger_output(void *, void *, void *, int,
void (*)(void *), void *, const audio_params_t *);
static int vidcaudio_trigger_input(void *, void *, void *, int,
@@ -173,7 +172,7 @@
};
static const struct audio_hw_if vidcaudio_hw_if = {
- vidcaudio_open,
+ NULL, /* open */
vidcaudio_close,
NULL,
vidcaudio_query_encoding,
@@ -276,14 +275,6 @@
#endif
}
-static int
-vidcaudio_open(void *addr, int flags)
-{
-
- DPRINTF(("DEBUG: vidcaudio_open called\n"));
- return 0;
-}
-
static void
vidcaudio_close(void *addr)
{
@@ -449,7 +440,8 @@
}
static int
-vidcaudio_round_blocksize(void *addr, int wantblk)
+vidcaudio_round_blocksize(void *addr, int wantblk,
+ int mode, const audio_params_t *param)
{
int blk;
@@ -475,7 +467,7 @@
DPRINTF(("vidcaudio_trigger_output %p-%p/0x%x\n",
start, end, blksize));
- KASSERT(blksize == vidcaudio_round_blocksize(addr, blksize));
+ KASSERT(blksize == vidcaudio_round_blocksize(addr, blksize, 0, NULL));
KASSERT((vaddr_t)start % blksize == 0);
sc->sc_pblksize = blksize;
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/dreamcast/dev/g2/aica.c
--- a/sys/arch/dreamcast/dev/g2/aica.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/dreamcast/dev/g2/aica.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aica.c,v 1.5.2.1 2005/01/03 16:43:32 kent Exp $ */
+/* $NetBSD: aica.c,v 1.5.2.2 2005/01/09 08:42:44 kent Exp $ */
/*
* Copyright (c) 2003 SHIMIZU Ryo <ryo%misakimix.org@localhost>
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.5.2.1 2005/01/03 16:43:32 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.5.2.2 2005/01/09 08:42:44 kent Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -145,7 +145,7 @@
int aica_query_encoding(void *, struct audio_encoding *);
int aica_set_params(void *, int, int, audio_params_t *,
audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
-int aica_round_blocksize(void *, int);
+int aica_round_blocksize(void *, int, int, const audio_params_t *);
size_t aica_round_buffersize(void *, int, size_t);
int aica_trigger_output(void *, void *, void *, int, void (*)(void *), void *,
const audio_params_t *);
@@ -470,7 +470,7 @@
}
int
-aica_round_blocksize(void *addr, int blk)
+aica_round_blocksize(void *addr, int blk, int mode, const audio_params_t *param)
{
struct aica_softc *sc = addr;
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/hp700/gsc/harmony.c
--- a/sys/arch/hp700/gsc/harmony.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/hp700/gsc/harmony.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: harmony.c,v 1.2.2.1 2005/01/03 16:44:00 kent Exp $ */
+/* $NetBSD: harmony.c,v 1.2.2.2 2005/01/09 08:42:44 kent Exp $ */
/* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */
@@ -68,7 +68,7 @@
int harmony_query_encoding(void *, struct audio_encoding *);
int harmony_set_params(void *, int, int, audio_params_t *,
audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
-int harmony_round_blocksize(void *, int);
+int harmony_round_blocksize(void *, int, int, const audio_params_t *);
int harmony_commit_settings(void *);
int harmony_halt_output(void *);
int harmony_halt_input(void *);
@@ -597,7 +597,8 @@
}
int
-harmony_round_blocksize(void *vsc, int blk)
+harmony_round_blocksize(void *vsc, int blk,
+ int mode, const audio_params_t *param)
{
return (HARMONY_BUFSIZE);
}
diff -r 7f76bfc46aef -r 3108a454b134 sys/arch/hpcmips/vr/vraiu.c
--- a/sys/arch/hpcmips/vr/vraiu.c Sat Jan 08 18:34:09 2005 +0000
+++ b/sys/arch/hpcmips/vr/vraiu.c Sun Jan 09 08:42:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vraiu.c,v 1.8.2.1 2005/01/03 16:44:18 kent Exp $ */
+/* $NetBSD: vraiu.c,v 1.8.2.2 2005/01/09 08:42:44 kent Exp $ */
/*
* Copyright (c) 2001 HAMAJIMA Katsuomi. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.8.2.1 2005/01/03 16:44:18 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.8.2.2 2005/01/09 08:42:44 kent Exp $");
#include <sys/param.h>
Home |
Main Index |
Thread Index |
Old Index