AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with
commit
1cf2860827c8ca659d8097d8da94a5ae5b888c53
Author: ratchov <ratchov@openbsd.org>
Date: Thu Jun 25 06:43:45 2015 +0000
Reimplement the audio driver in a simpler way, removing unused/unusable
functionality. Same API and ABI except for the removed bits and no
behaviour change for programs using libsndio. With help from armani@
and mpi@, thanks.
but remained defined and set in drivers.
and the following merely moved them when they were dead code already:
commit
9215aa3dfad387bca877a805534df6dcfe8722eb
Author: ratchov <ratchov@openbsd.org>
Date: Wed Aug 31 07:22:43 2016 +0000
Delete unused ioctls and associated macros. Move macros that are still
used internally by low-level drivers from sys/audioio.h to
dev/audio_if.h instead of deleting them.
None of this is used in base or ports; codesearch.debian.net only shows
AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb.
ratchov points out that audio_if.h and audioio.h are private interfaces
and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD).
OK ratchov
-/* $OpenBSD: awacs.c,v 1.37 2022/03/21 19:22:39 miod Exp $ */
+/* $OpenBSD: awacs.c,v 1.38 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
int
awacs_get_props(void *h)
{
- return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: i2s.c,v 1.35 2022/10/15 08:41:18 jsg Exp $ */
+/* $OpenBSD: i2s.c,v 1.36 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
int
i2s_get_props(void *h)
{
- return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: audio_if.h,v 1.38 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: audio_if.h,v 1.39 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */
/*
* get_props
*/
#define AUDIO_PROP_FULLDUPLEX 0x01
-#define AUDIO_PROP_MMAP 0x02
-#define AUDIO_PROP_INDEPENDENT 0x04
#define AUDIO_BPS(bits) (bits) <= 8 ? 1 : ((bits) <= 16 ? 2 : 4)
-/* $OpenBSD: ad1848.c,v 1.46 2022/01/09 05:42:42 jsg Exp $ */
+/* $OpenBSD: ad1848.c,v 1.47 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: ad1848.c,v 1.45 1998/01/30 02:02:38 augustss Exp $ */
/*
{
struct ad1848_softc *sc = addr;
- return AUDIO_PROP_MMAP |
- (sc->mode == 2 ? AUDIO_PROP_FULLDUPLEX : 0);
+ return (sc->mode == 2 ? AUDIO_PROP_FULLDUPLEX : 0);
}
-/* $OpenBSD: ess.c,v 1.28 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: ess.c,v 1.29 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */
/*
int
ess_1788_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT);
+ return (0);
}
int
ess_1888_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
/* ============================================
-/* $OpenBSD: gus.c,v 1.51 2022/08/29 06:08:04 jsg Exp $ */
+/* $OpenBSD: gus.c,v 1.52 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
gus_get_props(void *addr)
{
struct gus_softc *sc = addr;
- return AUDIO_PROP_MMAP |
- (sc->sc_recdrq == sc->sc_drq ? 0 : AUDIO_PROP_FULLDUPLEX);
+ return (sc->sc_recdrq == sc->sc_drq ? 0 : AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: sbdsp.c,v 1.40 2022/01/09 05:42:44 jsg Exp $ */
+/* $OpenBSD: sbdsp.c,v 1.41 2022/10/18 08:22:18 kn Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
sbdsp_get_props(void *addr)
{
struct sbdsp_softc *sc = addr;
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- (sc->sc_fullduplex ? AUDIO_PROP_FULLDUPLEX : 0);
+ return (sc->sc_fullduplex ? AUDIO_PROP_FULLDUPLEX : 0);
}
#if NMIDI > 0
-/* $OpenBSD: auacer.c,v 1.25 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: auacer.c,v 1.26 2022/10/18 08:22:18 kn Exp $ */
/* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */
/*-
int
auacer_get_props(void *v)
{
- return (AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX |
- AUDIO_PROP_MMAP);
+ return (AUDIO_PROP_FULLDUPLEX);
}
static void
-/* $OpenBSD: auglx.c,v 1.20 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: auglx.c,v 1.21 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
int
auglx_get_props(void *v)
{
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: auich.c,v 1.116 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: auich.c,v 1.117 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
int
auich_get_props(void *v)
{
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: auixp.c,v 1.48 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: auixp.c,v 1.49 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
auixp_get_props(void *hdl)
{
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
-/* $OpenBSD: autri.c,v 1.47 2022/03/21 19:22:40 miod Exp $ */
+/* $OpenBSD: autri.c,v 1.48 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
int
autri_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
void
-/* $OpenBSD: auvia.c,v 1.63 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: auvia.c,v 1.64 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */
/*-
int
auvia_get_props(void *addr)
{
- int props;
-
- props = AUDIO_PROP_MMAP|AUDIO_PROP_INDEPENDENT|AUDIO_PROP_FULLDUPLEX;
-
- return props;
+ return AUDIO_PROP_FULLDUPLEX;
}
-/* $OpenBSD: azalia.c,v 1.276 2022/09/08 01:28:46 jsg Exp $ */
+/* $OpenBSD: azalia.c,v 1.277 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
int
azalia_get_props(void *v)
{
- return AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: cmpci.c,v 1.49 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: cmpci.c,v 1.50 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */
/*
int
cmpci_get_props(void *handle)
{
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: cs4280.c,v 1.57 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: cs4280.c,v 1.58 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
int
cs4280_get_props(void *hdl)
{
- return (AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: cs4281.c,v 1.42 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: cs4281.c,v 1.43 2022/10/18 08:22:19 kn Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
int
cs4281_get_props(void *addr)
{
- int retval;
-
- retval = AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
-#ifdef MMAP_READY
- retval |= AUDIO_PROP_MMAP;
-#endif
- return (retval);
+ return (AUDIO_PROP_FULLDUPLEX);
}
/* AC97 */
-/* $OpenBSD: eap.c,v 1.61 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: eap.c,v 1.62 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
int
eap_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
enum ac97_host_flags
-/* $OpenBSD: emuxki.c,v 1.58 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: emuxki.c,v 1.59 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
int
emuxki_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: envy.c,v 1.84 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: envy.c,v 1.85 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org>
*
int
envy_get_props(void *self)
{
- return AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT;
+ return AUDIO_PROP_FULLDUPLEX;
}
#if NMIDI > 0
-/* $OpenBSD: esa.c,v 1.38 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: esa.c,v 1.39 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
int
esa_get_props(void *hdl)
{
-
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: eso.c,v 1.50 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: eso.c,v 1.51 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */
/*
int
eso_get_props(void *hdl)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: fms.c,v 1.33 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: fms.c,v 1.34 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
int
fms_get_props(void *addr)
{
- return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_FULLDUPLEX;
}
int
-/* $OpenBSD: maestro.c,v 1.46 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: maestro.c,v 1.47 2022/10/18 08:22:19 kn 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
{
/* struct maestro_softc *sc = (struct maestro_softc *)self; */
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT); /* XXX */
+ return (0); /* XXX */
}
int
-/* $OpenBSD: neo.c,v 1.37 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: neo.c,v 1.38 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
int
neo_get_props(void *addr)
{
- return (AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
-/* $OpenBSD: sv.c,v 1.40 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: sv.c,v 1.41 2022/10/18 08:22:19 kn Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
int
sv_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
-/* $OpenBSD: yds.c,v 1.60 2022/08/29 06:08:04 jsg Exp $ */
+/* $OpenBSD: yds.c,v 1.61 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
int
yds_get_props(void *addr)
{
- return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
- AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_FULLDUPLEX);
}
int
-/* $OpenBSD: bba.c,v 1.9 2022/03/21 19:22:41 miod Exp $ */
+/* $OpenBSD: bba.c,v 1.10 2022/10/18 08:22:19 kn Exp $ */
/* $NetBSD: bba.c,v 1.38 2011/06/04 01:27:57 tsutsui Exp $ */
/*
* Copyright (c) 2011 Miodrag Vallat.
int
bba_get_props(void *v)
{
- return AUDIO_PROP_MMAP | am7930_get_props(v);
+ return am7930_get_props(v);
}
int