Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Clean get_props().
details: https://anonhg.NetBSD.org/src/rev/da49240ca7d4
branches: trunk
changeset: 457047:da49240ca7d4
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Jun 08 08:02:36 2019 +0000
description:
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
diffstat:
sys/arch/amiga/dev/aucc.c | 7 ++++---
sys/arch/amiga/dev/repulse.c | 8 +++++---
sys/arch/amiga/dev/toccata.c | 7 ++++---
sys/arch/arm/iomd/vidcaudio.c | 6 +++---
sys/arch/arm/sunxi/sunxi_codec.c | 10 +++++-----
sys/arch/arm/sunxi/sunxi_i2s.c | 9 +++++----
sys/arch/arm/xscale/pxa2x0_ac97.c | 5 +++--
sys/arch/hpcmips/vr/vraiu.c | 6 +++---
sys/arch/hppa/gsc/harmony.c | 5 +++--
sys/arch/macppc/dev/awacs.c | 8 +++++---
sys/arch/macppc/dev/snapper.c | 8 +++++---
sys/arch/x68k/dev/vs.c | 6 +++---
sys/arch/zaurus/dev/zaudio.c | 6 +++---
sys/dev/audio/audio.c | 12 ++----------
sys/dev/bluetooth/btsco.c | 7 ++++---
sys/dev/hdaudio/hdafg.c | 6 +++---
sys/dev/ic/am7930.c | 8 +++++---
sys/dev/ic/arcofi.c | 4 ++--
sys/dev/ic/cs4231.c | 7 ++++---
sys/dev/ic/interwave.c | 6 +++---
sys/dev/ic/tms320av110.c | 7 ++++---
sys/dev/isa/ad1848_isa.c | 6 +++---
sys/dev/isa/aria.c | 6 +++---
sys/dev/isa/ess.c | 9 +++++----
sys/dev/isa/gus.c | 6 +++---
sys/dev/isa/sbdsp.c | 6 +++---
sys/dev/pci/auacer.c | 18 ++++--------------
sys/dev/pci/auich.c | 19 ++++---------------
sys/dev/pci/auixp.c | 7 ++++---
sys/dev/pci/autri.c | 9 +++++----
sys/dev/pci/auvia.c | 18 ++++--------------
sys/dev/pci/azalia.c | 8 +++++---
sys/dev/pci/cmpci.c | 7 ++++---
sys/dev/pci/cs428x.c | 13 ++++---------
sys/dev/pci/eap.c | 8 ++++----
sys/dev/pci/emuxki.c | 7 ++++---
sys/dev/pci/esa.c | 7 ++++---
sys/dev/pci/esm.c | 7 ++++---
sys/dev/pci/eso.c | 8 ++++----
sys/dev/pci/fms.c | 9 +++++----
sys/dev/pci/gcscaudio.c | 18 ++++--------------
sys/dev/pci/neo.c | 8 ++++----
sys/dev/pci/sv.c | 8 +++++---
sys/dev/pci/yds.c | 8 ++++----
sys/dev/sbus/dbri.c | 7 ++++---
sys/dev/tc/bba.c | 14 +++-----------
46 files changed, 178 insertions(+), 211 deletions(-)
diffs (truncated from 1358 to 300 lines):
diff -r ed528e94865b -r da49240ca7d4 sys/arch/amiga/dev/aucc.c
--- a/sys/arch/amiga/dev/aucc.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/amiga/dev/aucc.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aucc.c,v 1.45 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: aucc.c,v 1.46 2019/06/08 08:02:36 isaki Exp $ */
/*
* Copyright (c) 1999 Bernardo Innocenti
@@ -46,7 +46,7 @@
#if NAUCC > 0
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.45 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.46 2019/06/08 08:02:36 isaki Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -693,7 +693,8 @@
int
aucc_get_props(void *addr)
{
- return 0;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE;
}
diff -r ed528e94865b -r da49240ca7d4 sys/arch/amiga/dev/repulse.c
--- a/sys/arch/amiga/dev/repulse.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/amiga/dev/repulse.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: repulse.c,v 1.22 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: repulse.c,v 1.23 2019/06/08 08:02:36 isaki Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.22 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.23 2019/06/08 08:02:36 isaki Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -438,7 +438,9 @@
int
rep_get_props(void *v)
{
- return AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
}
int
diff -r ed528e94865b -r da49240ca7d4 sys/arch/amiga/dev/toccata.c
--- a/sys/arch/amiga/dev/toccata.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/amiga/dev/toccata.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: toccata.c,v 1.19 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: toccata.c,v 1.20 2019/06/08 08:02:36 isaki Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.19 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.20 2019/06/08 08:02:36 isaki Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -444,7 +444,8 @@
int
toccata_get_props(void *addr)
{
- return 0;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE;
}
void
diff -r ed528e94865b -r da49240ca7d4 sys/arch/arm/iomd/vidcaudio.c
--- a/sys/arch/arm/iomd/vidcaudio.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/arm/iomd/vidcaudio.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidcaudio.c,v 1.58 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: vidcaudio.c,v 1.59 2019/06/08 08:02:36 isaki 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.58 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.59 2019/06/08 08:02:36 isaki Exp $");
#include <sys/audioio.h>
#include <sys/conf.h> /* autoconfig functions */
@@ -487,7 +487,7 @@
vidcaudio_get_props(void *addr)
{
- return 0;
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE;
}
static void
diff -r ed528e94865b -r da49240ca7d4 sys/arch/arm/sunxi/sunxi_codec.c
--- a/sys/arch/arm/sunxi/sunxi_codec.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_codec.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_codec.c,v 1.6 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: sunxi_codec.c,v 1.7 2019/06/08 08:02:37 isaki Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_codec.c,v 1.6 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_codec.c,v 1.7 2019/06/08 08:02:37 isaki Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -255,9 +255,9 @@
static int
sunxi_codec_get_props(void *priv)
{
- return AUDIO_PROP_PLAYBACK|AUDIO_PROP_CAPTURE|
- AUDIO_PROP_INDEPENDENT|AUDIO_PROP_MMAP|
- AUDIO_PROP_FULLDUPLEX;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE|
+ AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX;
}
static int
diff -r ed528e94865b -r da49240ca7d4 sys/arch/arm/sunxi/sunxi_i2s.c
--- a/sys/arch/arm/sunxi/sunxi_i2s.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_i2s.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_i2s.c,v 1.5 2019/06/06 23:19:07 jmcneill Exp $ */
+/* $NetBSD: sunxi_i2s.c,v 1.6 2019/06/08 08:02:37 isaki Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.5 2019/06/06 23:19:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.6 2019/06/08 08:02:37 isaki Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -296,8 +296,9 @@
static int
sunxi_i2s_get_props(void *priv)
{
- return AUDIO_PROP_PLAYBACK|AUDIO_PROP_CAPTURE|
- AUDIO_PROP_MMAP|AUDIO_PROP_FULLDUPLEX|AUDIO_PROP_INDEPENDENT;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT;
}
static int
diff -r ed528e94865b -r da49240ca7d4 sys/arch/arm/xscale/pxa2x0_ac97.c
--- a/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_ac97.c,v 1.16 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: pxa2x0_ac97.c,v 1.17 2019/06/08 08:02:37 isaki Exp $ */
/*
* Copyright (c) 2003, 2005 Wasabi Systems, Inc.
@@ -705,7 +705,8 @@
acu_get_props(void *arg)
{
- return (AUDIO_PROP_MMAP|AUDIO_PROP_INDEPENDENT|AUDIO_PROP_FULLDUPLEX);
+ return (AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
}
static void
diff -r ed528e94865b -r da49240ca7d4 sys/arch/hpcmips/vr/vraiu.c
--- a/sys/arch/hpcmips/vr/vraiu.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/hpcmips/vr/vraiu.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vraiu.c,v 1.17 2019/05/08 13:40:15 isaki Exp $ */
+/* $NetBSD: vraiu.c,v 1.18 2019/06/08 08:02:37 isaki 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.17 2019/05/08 13:40:15 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.18 2019/06/08 08:02:37 isaki Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -518,7 +518,7 @@
{
DPRINTFN(3, ("vraiu_get_props\n"));
- return 0;
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE;
}
void
diff -r ed528e94865b -r da49240ca7d4 sys/arch/hppa/gsc/harmony.c
--- a/sys/arch/hppa/gsc/harmony.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/hppa/gsc/harmony.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: harmony.c,v 1.6 2019/05/08 13:40:15 isaki Exp $ */
+/* $NetBSD: harmony.c,v 1.7 2019/06/08 08:02:37 isaki Exp $ */
/* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */
@@ -972,7 +972,8 @@
harmony_get_props(void *vsc)
{
- return AUDIO_PROP_FULLDUPLEX;
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_FULLDUPLEX;
}
void
diff -r ed528e94865b -r da49240ca7d4 sys/arch/macppc/dev/awacs.c
--- a/sys/arch/macppc/dev/awacs.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/macppc/dev/awacs.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awacs.c,v 1.47 2019/05/08 13:40:15 isaki Exp $ */
+/* $NetBSD: awacs.c,v 1.48 2019/06/08 08:02:37 isaki Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.47 2019/05/08 13:40:15 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.48 2019/06/08 08:02:37 isaki Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -967,7 +967,9 @@
static int
awacs_get_props(void *h)
{
- return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_FULLDUPLEX;
}
static int
diff -r ed528e94865b -r da49240ca7d4 sys/arch/macppc/dev/snapper.c
--- a/sys/arch/macppc/dev/snapper.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/macppc/dev/snapper.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snapper.c,v 1.51 2019/05/16 23:39:37 macallan Exp $ */
+/* $NetBSD: snapper.c,v 1.52 2019/06/08 08:02:37 isaki Exp $ */
/* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */
/* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.51 2019/05/16 23:39:37 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.52 2019/06/08 08:02:37 isaki Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -1242,7 +1242,9 @@
static int
snapper_get_props(void *h)
{
- return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */;
+
+ return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE |
+ AUDIO_PROP_FULLDUPLEX;
}
static int
diff -r ed528e94865b -r da49240ca7d4 sys/arch/x68k/dev/vs.c
--- a/sys/arch/x68k/dev/vs.c Sat Jun 08 07:27:44 2019 +0000
+++ b/sys/arch/x68k/dev/vs.c Sat Jun 08 08:02:36 2019 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index