Module Name: src Committed By: isaki Date: Sat Mar 16 12:09:58 UTC 2019
Modified Files: src/sys/arch/amiga/dev: aucc.c repulse.c toccata.c src/sys/arch/arm/iomd: vidcaudio.c src/sys/arch/arm/xscale: pxa2x0_ac97.c src/sys/arch/dreamcast/dev/g2: aica.c src/sys/arch/evbarm/mini2440: audio_mini2440.c src/sys/arch/hpcmips/vr: vraiu.c src/sys/arch/hppa/gsc: harmony.c src/sys/arch/macppc/dev: awacs.c snapper.c src/sys/arch/prep/isa: paud_isa.c src/sys/arch/sgimips/hpc: haltwo.c src/sys/arch/sgimips/mace: mavb.c src/sys/arch/sparc/dev: audioamd.c src/sys/arch/vax/vsa: vsaudio.c src/sys/arch/x68k/dev: vs.c src/sys/dev/bluetooth: btsco.c src/sys/dev/ebus: cs4231_ebus.c src/sys/dev/ic: tms320av110.c src/sys/dev/isa: aria.c ess.c gus.c pas.c sb.c wss.c ym.c src/sys/dev/isapnp: gus_isapnp.c src/sys/dev/pci: auacer.c auich.c auixp.c autri.c auvia.c azalia.c cmpci.c cs4280.c cs4281.c eap.c emuxki.c esa.c esm.c eso.c fms.c neo.c sv.c src/sys/dev/sbus: cs4231_sbus.c src/sys/dev/tc: bba.c src/sys/dev/usb: uaudio.c Log Message: Use C99 style struct initializer to audio_hw_if. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amiga/dev/aucc.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amiga/dev/repulse.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amiga/dev/toccata.c cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/iomd/vidcaudio.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/xscale/pxa2x0_ac97.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/dreamcast/dev/g2/aica.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/mini2440/audio_mini2440.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hpcmips/vr/vraiu.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/gsc/harmony.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/macppc/dev/awacs.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/macppc/dev/snapper.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/prep/isa/paud_isa.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sgimips/hpc/haltwo.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/mace/mavb.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc/dev/audioamd.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/vax/vsa/vsaudio.c cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x68k/dev/vs.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/bluetooth/btsco.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ebus/cs4231_ebus.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/tms320av110.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/isa/aria.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/isa/ess.c cvs rdiff -u -r1.114 -r1.115 src/sys/dev/isa/gus.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/isa/pas.c cvs rdiff -u -r1.89 -r1.90 src/sys/dev/isa/sb.c cvs rdiff -u -r1.71 -r1.72 src/sys/dev/isa/wss.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/isa/ym.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/isapnp/gus_isapnp.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/auacer.c cvs rdiff -u -r1.152 -r1.153 src/sys/dev/pci/auich.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/auixp.c src/sys/dev/pci/fms.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/autri.c cvs rdiff -u -r1.81 -r1.82 src/sys/dev/pci/auvia.c cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/azalia.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/cmpci.c src/sys/dev/pci/neo.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/cs4280.c cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/cs4281.c src/sys/dev/pci/sv.c cvs rdiff -u -r1.98 -r1.99 src/sys/dev/pci/eap.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/emuxki.c cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/esa.c cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/esm.c cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/eso.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/sbus/cs4231_sbus.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/tc/bba.c cvs rdiff -u -r1.157 -r1.158 src/sys/dev/usb/uaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amiga/dev/aucc.c diff -u src/sys/arch/amiga/dev/aucc.c:1.43 src/sys/arch/amiga/dev/aucc.c:1.44 --- src/sys/arch/amiga/dev/aucc.c:1.43 Sat Mar 22 01:52:44 2014 +++ src/sys/arch/amiga/dev/aucc.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aucc.c,v 1.43 2014/03/22 01:52:44 christos Exp $ */ +/* $NetBSD: aucc.c,v 1.44 2019/03/16 12:09:56 isaki 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.43 2014/03/22 01:52:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.44 2019/03/16 12:09:56 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -231,34 +231,22 @@ static void aucc_decode_slinear16sw_4ch( const struct audio_hw_if sa_hw_if = { - aucc_open, - aucc_close, - NULL, - aucc_query_encoding, - aucc_set_params, - aucc_round_blocksize, - aucc_commit_settings, - NULL, - NULL, - aucc_start_output, - aucc_start_input, - aucc_halt_output, - aucc_halt_input, - NULL, - aucc_getdev, - NULL, - aucc_set_port, - aucc_get_port, - aucc_query_devinfo, - NULL, - NULL, - NULL, - NULL, - aucc_get_props, - NULL, - NULL, - NULL, - aucc_get_locks, + .open = aucc_open, + .close = aucc_close, + .query_encoding = aucc_query_encoding, + .set_params = aucc_set_params, + .round_blocksize = aucc_round_blocksize, + .commit_settings = aucc_commit_settings, + .start_output = aucc_start_output, + .start_input = aucc_start_input, + .halt_output = aucc_halt_output, + .halt_input = aucc_halt_input, + .getdev = aucc_getdev, + .set_port = aucc_set_port, + .get_port = aucc_get_port, + .query_devinfo = aucc_query_devinfo, + .get_props = aucc_get_props, + .get_locks = aucc_get_locks, }; /* autoconfig routines */ Index: src/sys/arch/amiga/dev/repulse.c diff -u src/sys/arch/amiga/dev/repulse.c:1.20 src/sys/arch/amiga/dev/repulse.c:1.21 --- src/sys/arch/amiga/dev/repulse.c:1.20 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/repulse.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: repulse.c,v 1.20 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: repulse.c,v 1.21 2019/03/16 12:09:56 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.20 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.21 2019/03/16 12:09:56 isaki Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -96,34 +96,21 @@ int rep_intr(void *); /* audio attachment */ const struct audio_hw_if rep_hw_if = { - /* open */ 0, - rep_close, - /* drain */ 0, - rep_query_encoding, - rep_set_params, - rep_round_blocksize, - /* commit_setting */ 0, - /* init_output */ 0, - /* init_input */ 0, - rep_start_output, - rep_start_input, - rep_halt_output, - rep_halt_input, - /* speaker_ctl */ 0, - rep_getdev, - /* getfd */ 0, - rep_set_port, - rep_get_port, - rep_query_devinfo, - /* allocm */ 0, - /* freem */ 0, - rep_round_buffersize, - /* mappage */ 0, - rep_get_props, - /* trigger_output */ 0, - /* trigger_input */ 0, - /* dev_ioctl */ 0, - rep_get_locks, + .close = rep_close, + .query_encoding = rep_query_encoding, + .set_params = rep_set_params, + .round_blocksize = rep_round_blocksize, + .start_output = rep_start_output, + .start_input = rep_start_input, + .halt_output = rep_halt_output, + .halt_input = rep_halt_input, + .getdev = rep_getdev, + .set_port = rep_set_port, + .get_port = rep_get_port, + .query_devinfo = rep_query_devinfo, + .round_buffersize = rep_round_buffersize, + .get_props = rep_get_props, + .get_locks = rep_get_locks, }; /* hardware registers */ Index: src/sys/arch/amiga/dev/toccata.c diff -u src/sys/arch/amiga/dev/toccata.c:1.17 src/sys/arch/amiga/dev/toccata.c:1.18 --- src/sys/arch/amiga/dev/toccata.c:1.17 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/toccata.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: toccata.c,v 1.17 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: toccata.c,v 1.18 2019/03/16 12:09:56 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.17 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.18 2019/03/16 12:09:56 isaki Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -177,38 +177,31 @@ int toccata_query_devinfo(void *, mixer_ void toccata_get_locks(void *, kmutex_t **, kmutex_t **); const struct audio_hw_if audiocs_hw_if = { - toccata_open, - toccata_close, - 0, /* - * XXX toccata_drain could be written: - * sleep for play interrupt. This loses less than 512 bytes of - * sample data, otherwise up to 1024. - */ - ad1848_query_encoding, - ad1848_set_params, - toccata_round_blocksize, - ad1848_commit_settings, - 0, /* init_output */ /* XXX need this to prefill? */ - 0, /* init_input */ - toccata_start_output, - toccata_start_input, - toccata_halt_output, - toccata_halt_input, - 0, /* speaker */ - toccata_getdev, - 0, /* setfd */ - toccata_set_port, - toccata_get_port, - toccata_query_devinfo, - 0, /* alloc/free */ - 0, - toccata_round_buffersize, /* round_buffer */ - 0, /* mappage */ - toccata_get_props, - 0, /* trigger_output */ - 0, - 0, - toccata_get_locks, + .open = toccata_open, + .close = toccata_close, + /* + * XXX toccata_drain could be written: + * sleep for play interrupt. This loses less than 512 bytes of + * sample data, otherwise up to 1024. + */ + .drain = NULL, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .round_blocksize = toccata_round_blocksize, + .commit_settings = ad1848_commit_settings, + .init_output = NULL, /* XXX need this to prefill? */ + .init_input = NULL, + .start_output = toccata_start_output, + .start_input = toccata_start_input, + .halt_output = toccata_halt_output, + .halt_input = toccata_halt_input, + .getdev = toccata_getdev, + .set_port = toccata_set_port, + .get_port = toccata_get_port, + .query_devinfo = toccata_query_devinfo, + .round_buffersize = toccata_round_buffersize, + .get_props = toccata_get_props, + .get_locks = toccata_get_locks, }; struct toccata_softc { Index: src/sys/arch/arm/iomd/vidcaudio.c diff -u src/sys/arch/arm/iomd/vidcaudio.c:1.56 src/sys/arch/arm/iomd/vidcaudio.c:1.57 --- src/sys/arch/arm/iomd/vidcaudio.c:1.56 Mon Sep 3 16:29:23 2018 +++ src/sys/arch/arm/iomd/vidcaudio.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vidcaudio.c,v 1.56 2018/09/03 16:29:23 riastradh Exp $ */ +/* $NetBSD: vidcaudio.c,v 1.57 2019/03/16 12:09:56 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.56 2018/09/03 16:29:23 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.57 2019/03/16 12:09:56 isaki Exp $"); #include <sys/audioio.h> #include <sys/conf.h> /* autoconfig functions */ @@ -172,34 +172,20 @@ static struct audio_device vidcaudio_dev }; static const struct audio_hw_if vidcaudio_hw_if = { - NULL, /* open */ - vidcaudio_close, - NULL, - vidcaudio_query_encoding, - vidcaudio_set_params, - vidcaudio_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - vidcaudio_halt_output, - vidcaudio_halt_input, - NULL, - vidcaudio_getdev, - NULL, - vidcaudio_set_port, - vidcaudio_get_port, - vidcaudio_query_devinfo, - NULL, - NULL, - NULL, - NULL, - vidcaudio_get_props, - vidcaudio_trigger_output, - vidcaudio_trigger_input, - NULL, - vidcaudio_get_locks, + .close = vidcaudio_close, + .query_encoding = vidcaudio_query_encoding, + .set_params = vidcaudio_set_params, + .round_blocksize = vidcaudio_round_blocksize, + .halt_output = vidcaudio_halt_output, + .halt_input = vidcaudio_halt_input, + .getdev = vidcaudio_getdev, + .set_port = vidcaudio_set_port, + .get_port = vidcaudio_get_port, + .query_devinfo = vidcaudio_query_devinfo, + .get_props = vidcaudio_get_props, + .trigger_output = vidcaudio_trigger_output, + .trigger_input = vidcaudio_trigger_input, + .get_locks = vidcaudio_get_locks, }; static int Index: src/sys/arch/arm/xscale/pxa2x0_ac97.c diff -u src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.14 src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.15 --- src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.14 Thu Jun 1 02:45:06 2017 +++ src/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_ac97.c,v 1.14 2017/06/01 02:45:06 chs Exp $ */ +/* $NetBSD: pxa2x0_ac97.c,v 1.15 2019/03/16 12:09:56 isaki Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -156,34 +156,25 @@ static int acu_get_props(void *); static void acu_get_locks(void *, kmutex_t **, kmutex_t **); struct audio_hw_if acu_hw_if = { - acu_open, - acu_close, - NULL, - acu_query_encoding, - acu_set_params, - acu_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - acu_halt_output, - acu_halt_input, - NULL, - acu_getdev, - NULL, - acu_mixer_set_port, - acu_mixer_get_port, - acu_query_devinfo, - acu_malloc, - acu_free, - acu_round_buffersize, - acu_mappage, - acu_get_props, - acu_trigger_output, - acu_trigger_input, - NULL, - acu_get_locks, + .open = acu_open, + .close = acu_close, + .query_encoding = acu_query_encoding, + .set_params = acu_set_params, + .round_blocksize = acu_round_blocksize, + .halt_output = acu_halt_output, + .halt_input = acu_halt_input, + .getdev = acu_getdev, + .set_port = acu_mixer_set_port, + .get_port = acu_mixer_get_port, + .query_devinfo = acu_query_devinfo, + .allocm = acu_malloc, + .freem = acu_free, + .round_buffersize = acu_round_buffersize, + .mappage = acu_mappage, + .get_props = acu_get_props, + .trigger_output = acu_trigger_output, + .trigger_input = acu_trigger_input, + .get_locks = acu_get_locks, }; struct audio_device acu_device = { Index: src/sys/arch/dreamcast/dev/g2/aica.c diff -u src/sys/arch/dreamcast/dev/g2/aica.c:1.24 src/sys/arch/dreamcast/dev/g2/aica.c:1.25 --- src/sys/arch/dreamcast/dev/g2/aica.c:1.24 Sat Mar 3 23:27:51 2018 +++ src/sys/arch/dreamcast/dev/g2/aica.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aica.c,v 1.24 2018/03/03 23:27:51 christos Exp $ */ +/* $NetBSD: aica.c,v 1.25 2019/03/16 12:09:56 isaki Exp $ */ /* * Copyright (c) 2003 SHIMIZU Ryo <r...@misakimix.org> @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.24 2018/03/03 23:27:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.25 2019/03/16 12:09:56 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -165,36 +165,22 @@ int aica_get_props(void *); void aica_get_locks(void *, kmutex_t **, kmutex_t **); const struct audio_hw_if aica_hw_if = { - aica_open, - aica_close, - NULL, /* aica_drain */ - aica_query_encoding, - aica_set_params, - aica_round_blocksize, - NULL, /* aica_commit_setting */ - NULL, /* aica_init_output */ - NULL, /* aica_init_input */ - NULL, /* aica_start_output */ - NULL, /* aica_start_input */ - aica_halt_output, - aica_halt_input, - NULL, /* aica_speaker_ctl */ - aica_getdev, - NULL, /* aica_setfd */ - aica_set_port, - aica_get_port, - aica_query_devinfo, - NULL, /* aica_allocm */ - NULL, /* aica_freem */ - - aica_round_buffersize, /* aica_round_buffersize */ - - NULL, /* aica_mappage */ - aica_get_props, - aica_trigger_output, - aica_trigger_input, - NULL, /* aica_dev_ioctl */ - aica_get_locks, + .open = aica_open, + .close = aica_close, + .query_encoding = aica_query_encoding, + .set_params = aica_set_params, + .round_blocksize = aica_round_blocksize, + .halt_output = aica_halt_output, + .halt_input = aica_halt_input, + .getdev = aica_getdev, + .set_port = aica_set_port, + .get_port = aica_get_port, + .query_devinfo = aica_query_devinfo, + .round_buffersize = aica_round_buffersize, + .get_props = aica_get_props, + .trigger_output = aica_trigger_output, + .trigger_input = aica_trigger_input, + .get_locks = aica_get_locks, }; int Index: src/sys/arch/evbarm/mini2440/audio_mini2440.c diff -u src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.1 src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.2 --- src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.1 Mon Jan 30 03:28:33 2012 +++ src/sys/arch/evbarm/mini2440/audio_mini2440.c Sat Mar 16 12:09:56 2019 @@ -89,34 +89,24 @@ int uda_ssio_getprops(void *); void uda_ssio_get_locks(void *, kmutex_t**, kmutex_t**); struct audio_hw_if uda1341_hw_if = { - uda_ssio_open, - uda_ssio_close, - NULL, - uda1341_query_encodings, - uda_ssio_set_params, - uda_ssio_round_blocksize, - NULL, /* commit_settings*/ - NULL, - NULL, - uda_ssio_start_output, - uda_ssio_start_input, - uda_ssio_halt_output, - uda_ssio_halt_input, - NULL, - uda_ssio_getdev, - NULL, - uda1341_set_port, - uda1341_get_port, - uda1341_query_devinfo, - uda_ssio_allocm, - uda_ssio_freem, - uda_ssio_round_buffersize, - NULL, /* mappage */ - uda_ssio_getprops, - NULL, - NULL, - NULL, - uda_ssio_get_locks + .open = uda_ssio_open, + .close = uda_ssio_close, + .query_encoding = uda1341_query_encodings, + .set_params = uda_ssio_set_params, + .round_blocksize = uda_ssio_round_blocksize, + .start_output = uda_ssio_start_output, + .start_input = uda_ssio_start_input, + .halt_output = uda_ssio_halt_output, + .halt_input = uda_ssio_halt_input, + .getdev = uda_ssio_getdev, + .set_port = uda1341_set_port, + .get_port = uda1341_get_port, + .query_devinfo = uda1341_query_devinfo, + .allocm = uda_ssio_allocm, + .freem = uda_ssio_freem, + .round_buffersize = uda_ssio_round_buffersize, + .get_props = uda_ssio_getprops, + .get_locks = uda_ssio_get_locks }; static struct audio_device uda1341_device = { Index: src/sys/arch/hpcmips/vr/vraiu.c diff -u src/sys/arch/hpcmips/vr/vraiu.c:1.15 src/sys/arch/hpcmips/vr/vraiu.c:1.16 --- src/sys/arch/hpcmips/vr/vraiu.c:1.15 Sat Oct 27 17:17:55 2012 +++ src/sys/arch/hpcmips/vr/vraiu.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vraiu.c,v 1.15 2012/10/27 17:17:55 chs Exp $ */ +/* $NetBSD: vraiu.c,v 1.16 2019/03/16 12:09:56 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.15 2012/10/27 17:17:55 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.16 2019/03/16 12:09:56 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -120,34 +120,24 @@ int vraiu_get_props(void *); void vraiu_get_locks(void *, kmutex_t **, kmutex_t **); const struct audio_hw_if vraiu_hw_if = { - vraiu_open, - vraiu_close, - NULL, - vraiu_query_encoding, - vraiu_set_params, - vraiu_round_blocksize, - vraiu_commit_settings, - vraiu_init_output, - NULL, - vraiu_start_output, - vraiu_start_input, - vraiu_halt_output, - vraiu_halt_input, - NULL, - vraiu_getdev, - NULL, - vraiu_set_port, - vraiu_get_port, - vraiu_query_devinfo, - NULL, - NULL, - NULL, - NULL, - vraiu_get_props, - NULL, - NULL, - NULL, - vraiu_get_locks, + .open = vraiu_open, + .close = vraiu_close, + .query_encoding = vraiu_query_encoding, + .set_params = vraiu_set_params, + .round_blocksize = vraiu_round_blocksize, + .commit_settings = vraiu_commit_settings, + .init_output = vraiu_init_output, + .init_input = NULL, + .start_output = vraiu_start_output, + .start_input = vraiu_start_input, + .halt_output = vraiu_halt_output, + .halt_input = vraiu_halt_input, + .getdev = vraiu_getdev, + .set_port = vraiu_set_port, + .get_port = vraiu_get_port, + .query_devinfo = vraiu_query_devinfo, + .get_props = vraiu_get_props, + .get_locks = vraiu_get_locks, }; /* Index: src/sys/arch/hppa/gsc/harmony.c diff -u src/sys/arch/hppa/gsc/harmony.c:1.4 src/sys/arch/hppa/gsc/harmony.c:1.5 --- src/sys/arch/hppa/gsc/harmony.c:1.4 Thu Jun 1 02:45:06 2017 +++ src/sys/arch/hppa/gsc/harmony.c Sat Mar 16 12:09:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: harmony.c,v 1.4 2017/06/01 02:45:06 chs Exp $ */ +/* $NetBSD: harmony.c,v 1.5 2019/03/16 12:09:56 isaki Exp $ */ /* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */ @@ -117,34 +117,25 @@ int harmony_trigger_input(void *, void * void harmony_get_locks(void *, kmutex_t **, kmutex_t **); const struct audio_hw_if harmony_sa_hw_if = { - harmony_open, - harmony_close, - NULL, - harmony_query_encoding, - harmony_set_params, - harmony_round_blocksize, - harmony_commit_settings, - NULL, - NULL, - NULL, - NULL, - harmony_halt_output, - harmony_halt_input, - NULL, - harmony_getdev, - NULL, - harmony_set_port, - harmony_get_port, - harmony_query_devinfo, - harmony_allocm, - harmony_freem, - harmony_round_buffersize, - NULL, - harmony_get_props, - harmony_trigger_output, - harmony_trigger_input, - NULL, - harmony_get_locks, + .open = harmony_open, + .close = harmony_close, + .query_encoding = harmony_query_encoding, + .set_params = harmony_set_params, + .round_blocksize = harmony_round_blocksize, + .commit_settings = harmony_commit_settings, + .halt_output = harmony_halt_output, + .halt_input = harmony_halt_input, + .getdev = harmony_getdev, + .set_port = harmony_set_port, + .get_port = harmony_get_port, + .query_devinfo = harmony_query_devinfo, + .allocm = harmony_allocm, + .freem = harmony_freem, + .round_buffersize = harmony_round_buffersize, + .get_props = harmony_get_props, + .trigger_output = harmony_trigger_output, + .trigger_input = harmony_trigger_input, + .get_locks = harmony_get_locks, }; int harmony_match(device_t, struct cfdata *, void *); Index: src/sys/arch/macppc/dev/awacs.c diff -u src/sys/arch/macppc/dev/awacs.c:1.45 src/sys/arch/macppc/dev/awacs.c:1.46 --- src/sys/arch/macppc/dev/awacs.c:1.45 Wed Aug 24 14:41:51 2016 +++ src/sys/arch/macppc/dev/awacs.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: awacs.c,v 1.45 2016/08/24 14:41:51 macallan Exp $ */ +/* $NetBSD: awacs.c,v 1.46 2019/03/16 12:09:57 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.45 2016/08/24 14:41:51 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.46 2019/03/16 12:09:57 isaki Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -163,34 +163,22 @@ CFATTACH_DECL_NEW(awacs, sizeof(struct a awacs_match, awacs_attach, NULL, NULL); const struct audio_hw_if awacs_hw_if = { - NULL, /* open */ - awacs_close, - NULL, - awacs_query_encoding, - awacs_set_params, - awacs_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - awacs_halt_output, - awacs_halt_input, - NULL, - awacs_getdev, - NULL, - awacs_set_port, - awacs_get_port, - awacs_query_devinfo, - NULL, - NULL, - awacs_round_buffersize, - awacs_mappage, - awacs_get_props, - awacs_trigger_output, - awacs_trigger_input, - NULL, - awacs_get_locks, + .close = awacs_close, + .query_encoding = awacs_query_encoding, + .set_params = awacs_set_params, + .round_blocksize = awacs_round_blocksize, + .halt_output = awacs_halt_output, + .halt_input = awacs_halt_input, + .getdev = awacs_getdev, + .set_port = awacs_set_port, + .get_port = awacs_get_port, + .query_devinfo = awacs_query_devinfo, + .round_buffersize = awacs_round_buffersize, + .mappage = awacs_mappage, + .get_props = awacs_get_props, + .trigger_output = awacs_trigger_output, + .trigger_input = awacs_trigger_input, + .get_locks = awacs_get_locks, }; struct audio_device awacs_device = { Index: src/sys/arch/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.48 src/sys/arch/macppc/dev/snapper.c:1.49 --- src/sys/arch/macppc/dev/snapper.c:1.48 Mon Sep 3 16:29:25 2018 +++ src/sys/arch/macppc/dev/snapper.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.48 2018/09/03 16:29:25 riastradh Exp $ */ +/* $NetBSD: snapper.c,v 1.49 2019/03/16 12:09:57 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.48 2018/09/03 16:29:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.49 2019/03/16 12:09:57 isaki Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -276,34 +276,21 @@ CFATTACH_DECL_NEW(snapper, sizeof(struct snapper_attach, NULL, NULL); const struct audio_hw_if snapper_hw_if = { - NULL, - NULL, - NULL, - snapper_query_encoding, - snapper_set_params, - snapper_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - snapper_halt_output, - snapper_halt_input, - NULL, - snapper_getdev, - NULL, - snapper_set_port, - snapper_get_port, - snapper_query_devinfo, - NULL, - NULL, - snapper_round_buffersize, - snapper_mappage, - snapper_get_props, - snapper_trigger_output, - snapper_trigger_input, - NULL, - snapper_get_locks, + .query_encoding = snapper_query_encoding, + .set_params = snapper_set_params, + .round_blocksize = snapper_round_blocksize, + .halt_output = snapper_halt_output, + .halt_input = snapper_halt_input, + .getdev = snapper_getdev, + .set_port = snapper_set_port, + .get_port = snapper_get_port, + .query_devinfo = snapper_query_devinfo, + .round_buffersize = snapper_round_buffersize, + .mappage = snapper_mappage, + .get_props = snapper_get_props, + .trigger_output = snapper_trigger_output, + .trigger_input = snapper_trigger_input, + .get_locks = snapper_get_locks, }; struct audio_device snapper_device = { Index: src/sys/arch/prep/isa/paud_isa.c diff -u src/sys/arch/prep/isa/paud_isa.c:1.16 src/sys/arch/prep/isa/paud_isa.c:1.17 --- src/sys/arch/prep/isa/paud_isa.c:1.16 Thu Nov 24 03:35:57 2011 +++ src/sys/arch/prep/isa/paud_isa.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: paud_isa.c,v 1.16 2011/11/24 03:35:57 mrg Exp $ */ +/* $NetBSD: paud_isa.c,v 1.17 2019/03/16 12:09:57 isaki Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: paud_isa.c,v 1.16 2011/11/24 03:35:57 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: paud_isa.c,v 1.17 2019/03/16 12:09:57 isaki Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -94,34 +94,26 @@ static int paud_mixer_get_port(void *, m static int paud_query_devinfo(void *, mixer_devinfo_t *); static const struct audio_hw_if paud_hw_if = { - ad1848_isa_open, - ad1848_isa_close, - NULL, - ad1848_query_encoding, - ad1848_set_params, - ad1848_round_blocksize, - ad1848_commit_settings, - NULL, - NULL, - NULL, - NULL, - ad1848_isa_halt_output, - ad1848_isa_halt_input, - NULL, - paud_getdev, - NULL, - paud_mixer_set_port, - paud_mixer_get_port, - paud_query_devinfo, - ad1848_isa_malloc, - ad1848_isa_free, - ad1848_isa_round_buffersize, - ad1848_isa_mappage, - ad1848_isa_get_props, - ad1848_isa_trigger_output, - ad1848_isa_trigger_input, - NULL, - ad1848_get_locks, + .open = ad1848_isa_open, + .close = ad1848_isa_close, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .round_blocksize = ad1848_round_blocksize, + .commit_settings = ad1848_commit_settings, + .halt_output = ad1848_isa_halt_output, + .halt_input = ad1848_isa_halt_input, + .getdev = paud_getdev, + .set_port = paud_mixer_set_port, + .get_port = paud_mixer_get_port, + .query_devinfo = paud_query_devinfo, + .allocm = ad1848_isa_malloc, + .freem = ad1848_isa_free, + .round_buffersize = ad1848_isa_round_buffersize, + .mappage = ad1848_isa_mappage, + .get_props = ad1848_isa_get_props, + .trigger_output = ad1848_isa_trigger_output, + .trigger_input = ad1848_isa_trigger_input, + .get_locks = ad1848_get_locks, }; /* autoconfig routines */ Index: src/sys/arch/sgimips/hpc/haltwo.c diff -u src/sys/arch/sgimips/hpc/haltwo.c:1.23 src/sys/arch/sgimips/hpc/haltwo.c:1.24 --- src/sys/arch/sgimips/hpc/haltwo.c:1.23 Thu Jun 1 02:45:07 2017 +++ src/sys/arch/sgimips/hpc/haltwo.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: haltwo.c,v 1.23 2017/06/01 02:45:07 chs Exp $ */ +/* $NetBSD: haltwo.c,v 1.24 2019/03/16 12:09:57 isaki Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: haltwo.c,v 1.23 2017/06/01 02:45:07 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: haltwo.c,v 1.24 2019/03/16 12:09:57 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -79,34 +79,21 @@ static void haltwo_get_locks(void *, kmu static bool haltwo_shutdown(device_t, int); static const struct audio_hw_if haltwo_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - haltwo_query_encoding, - haltwo_set_params, - haltwo_round_blocksize, - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - haltwo_halt_output, - haltwo_halt_input, - NULL, /* speaker_ctl */ - haltwo_getdev, - NULL, /* setfd */ - haltwo_set_port, - haltwo_get_port, - haltwo_query_devinfo, - haltwo_malloc, - haltwo_free, - NULL, /* round_buffersize */ - NULL, /* mappage */ - haltwo_get_props, - haltwo_trigger_output, - haltwo_trigger_input, - NULL, /* dev_ioctl */ - haltwo_get_locks, + .query_encoding = haltwo_query_encoding, + .set_params = haltwo_set_params, + .round_blocksize = haltwo_round_blocksize, + .halt_output = haltwo_halt_output, + .halt_input = haltwo_halt_input, + .getdev = haltwo_getdev, + .set_port = haltwo_set_port, + .get_port = haltwo_get_port, + .query_devinfo = haltwo_query_devinfo, + .allocm = haltwo_malloc, + .freem = haltwo_free, + .get_props = haltwo_get_props, + .trigger_output = haltwo_trigger_output, + .trigger_input = haltwo_trigger_input, + .get_locks = haltwo_get_locks, }; static const struct audio_device haltwo_device = { Index: src/sys/arch/sgimips/mace/mavb.c diff -u src/sys/arch/sgimips/mace/mavb.c:1.11 src/sys/arch/sgimips/mace/mavb.c:1.12 --- src/sys/arch/sgimips/mace/mavb.c:1.11 Mon Sep 3 16:29:27 2018 +++ src/sys/arch/sgimips/mace/mavb.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mavb.c,v 1.11 2018/09/03 16:29:27 riastradh Exp $ */ +/* $NetBSD: mavb.c,v 1.12 2019/03/16 12:09:57 isaki Exp $ */ /* $OpenBSD: mavb.c,v 1.6 2005/04/15 13:05:14 mickey Exp $ */ /* @@ -272,34 +272,22 @@ int mavb_trigger_input(void *, void *, v void mavb_get_locks(void *, kmutex_t **, kmutex_t **); struct audio_hw_if mavb_sa_hw_if = { - mavb_open, - mavb_close, - 0, - mavb_query_encoding, - mavb_set_params, - mavb_round_blocksize, - 0, - 0, - 0, - 0, - 0, - mavb_halt_output, - mavb_halt_input, - 0, - mavb_getdev, - 0, - mavb_set_port, - mavb_get_port, - mavb_query_devinfo, - 0, - 0, - mavb_round_buffersize, - 0, - mavb_get_props, - mavb_trigger_output, - mavb_trigger_input, - NULL, - mavb_get_locks, + .open = mavb_open, + .close = mavb_close, + .query_encoding = mavb_query_encoding, + .set_params = mavb_set_params, + .round_blocksize = mavb_round_blocksize, + .halt_output = mavb_halt_output, + .halt_input = mavb_halt_input, + .getdev = mavb_getdev, + .set_port = mavb_set_port, + .get_port = mavb_get_port, + .query_devinfo = mavb_query_devinfo, + .round_buffersize = mavb_round_buffersize, + .get_props = mavb_get_props, + .trigger_output = mavb_trigger_output, + .trigger_input = mavb_trigger_input, + .get_locks = mavb_get_locks, }; struct audio_device mavb_device = { Index: src/sys/arch/sparc/dev/audioamd.c diff -u src/sys/arch/sparc/dev/audioamd.c:1.27 src/sys/arch/sparc/dev/audioamd.c:1.28 --- src/sys/arch/sparc/dev/audioamd.c:1.27 Wed Nov 23 23:07:30 2011 +++ src/sys/arch/sparc/dev/audioamd.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audioamd.c,v 1.27 2011/11/23 23:07:30 jmcneill Exp $ */ +/* $NetBSD: audioamd.c,v 1.28 2019/03/16 12:09:57 isaki Exp $ */ /* NetBSD: am7930_sparc.c,v 1.44 1999/03/14 22:29:00 jonathan Exp */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.27 2011/11/23 23:07:30 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.28 2019/03/16 12:09:57 isaki Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -151,34 +151,22 @@ int audioamd_getdev(void *, struct audio void audioamd_get_locks(void *opaque, kmutex_t **intr, kmutex_t **thread); const struct audio_hw_if sa_hw_if = { - am7930_open, - am7930_close, - 0, - am7930_query_encoding, - am7930_set_params, - am7930_round_blocksize, - am7930_commit_settings, - 0, - 0, - audioamd_start_output, /* md */ - audioamd_start_input, /* md */ - am7930_halt_output, - am7930_halt_input, - 0, - audioamd_getdev, - 0, - am7930_set_port, - am7930_get_port, - am7930_query_devinfo, - 0, - 0, - 0, - 0, - am7930_get_props, - 0, - 0, - 0, - audioamd_get_locks, + .open = am7930_open, + .close = am7930_close, + .query_encoding = am7930_query_encoding, + .set_params = am7930_set_params, + .round_blocksize = am7930_round_blocksize, + .commit_settings = am7930_commit_settings, + .start_output = audioamd_start_output, /* md */ + .start_input = audioamd_start_input, /* md */ + .halt_output = am7930_halt_output, + .halt_input = am7930_halt_input, + .getdev = audioamd_getdev, + .set_port = am7930_set_port, + .get_port = am7930_get_port, + .query_devinfo = am7930_query_devinfo, + .get_props = am7930_get_props, + .get_locks = audioamd_get_locks, }; struct audio_device audioamd_device = { Index: src/sys/arch/vax/vsa/vsaudio.c diff -u src/sys/arch/vax/vsa/vsaudio.c:1.2 src/sys/arch/vax/vsa/vsaudio.c:1.3 --- src/sys/arch/vax/vsa/vsaudio.c:1.2 Mon Sep 3 16:29:28 2018 +++ src/sys/arch/vax/vsa/vsaudio.c Sat Mar 16 12:09:57 2019 @@ -183,34 +183,22 @@ int vsaudio_getdev(void *, struct audio_ void vsaudio_get_locks(void *opaque, kmutex_t **intr, kmutex_t **thread); struct audio_hw_if vsaudio_hw_if = { - am7930_open, - am7930_close, - NULL, - am7930_query_encoding, - am7930_set_params, - am7930_round_blocksize, - am7930_commit_settings, - NULL, - NULL, - vsaudio_start_output, - vsaudio_start_input, - am7930_halt_output, - am7930_halt_input, - NULL, - vsaudio_getdev, - NULL, - am7930_set_port, - am7930_get_port, - am7930_query_devinfo, - NULL, - NULL, - NULL, - NULL, - am7930_get_props, - NULL, - NULL, - NULL, - vsaudio_get_locks, + .open = am7930_open, + .close = am7930_close, + .query_encoding = am7930_query_encoding, + .set_params = am7930_set_params, + .round_blocksize = am7930_round_blocksize, + .commit_settings = am7930_commit_settings, + .start_output = vsaudio_start_output, + .start_input = vsaudio_start_input, + .halt_output = am7930_halt_output, + .halt_input = am7930_halt_input, + .getdev = vsaudio_getdev, + .set_port = am7930_set_port, + .get_port = am7930_get_port, + .query_devinfo = am7930_query_devinfo, + .get_props = am7930_get_props, + .get_locks = vsaudio_get_locks, }; Index: src/sys/arch/x68k/dev/vs.c diff -u src/sys/arch/x68k/dev/vs.c:1.49 src/sys/arch/x68k/dev/vs.c:1.50 --- src/sys/arch/x68k/dev/vs.c:1.49 Sat Sep 30 04:07:04 2017 +++ src/sys/arch/x68k/dev/vs.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vs.c,v 1.49 2017/09/30 04:07:04 isaki Exp $ */ +/* $NetBSD: vs.c,v 1.50 2019/03/16 12:09:57 isaki Exp $ */ /* * Copyright (c) 2001 Tetsuya Isaki. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vs.c,v 1.49 2017/09/30 04:07:04 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vs.c,v 1.50 2019/03/16 12:09:57 isaki Exp $"); #include "audio.h" #include "vs.h" @@ -110,34 +110,25 @@ CFATTACH_DECL_NEW(vs, sizeof(struct vs_s static int vs_attached; static const struct audio_hw_if vs_hw_if = { - vs_open, - vs_close, - NULL, /* drain */ - vs_query_encoding, - vs_set_params, - NULL, /* round_blocksize */ - NULL, /* commit_settings */ - vs_init_output, - vs_init_input, - vs_start_output, - vs_start_input, - vs_halt_output, - vs_halt_input, - NULL, /* speaker_ctl */ - vs_getdev, - NULL, /* setfd */ - vs_set_port, - vs_get_port, - vs_query_devinfo, - vs_allocm, - vs_freem, - vs_round_buffersize, - NULL, /* mappage */ - vs_get_props, - NULL, /* trigger_output */ - NULL, /* trigger_input */ - NULL, - vs_get_locks, + .open = vs_open, + .close = vs_close, + .query_encoding = vs_query_encoding, + .set_params = vs_set_params, + .init_output = vs_init_output, + .init_input = vs_init_input, + .start_output = vs_start_output, + .start_input = vs_start_input, + .halt_output = vs_halt_output, + .halt_input = vs_halt_input, + .getdev = vs_getdev, + .set_port = vs_set_port, + .get_port = vs_get_port, + .query_devinfo = vs_query_devinfo, + .allocm = vs_allocm, + .freem = vs_freem, + .round_buffersize = vs_round_buffersize, + .get_props = vs_get_props, + .get_locks = vs_get_locks, }; static struct audio_device vs_device = { Index: src/sys/dev/bluetooth/btsco.c diff -u src/sys/dev/bluetooth/btsco.c:1.37 src/sys/dev/bluetooth/btsco.c:1.38 --- src/sys/dev/bluetooth/btsco.c:1.37 Sun Feb 3 03:19:27 2019 +++ src/sys/dev/bluetooth/btsco.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: btsco.c,v 1.37 2019/02/03 03:19:27 mrg Exp $ */ +/* $NetBSD: btsco.c,v 1.38 2019/03/16 12:09:57 isaki Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.37 2019/02/03 03:19:27 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.38 2019/03/16 12:09:57 isaki Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -169,34 +169,25 @@ static int btsco_dev_ioctl(void *, u_lon static void btsco_get_locks(void *, kmutex_t **, kmutex_t **); static const struct audio_hw_if btsco_if = { - btsco_open, /* open */ - btsco_close, /* close */ - NULL, /* drain */ - btsco_query_encoding, /* query_encoding */ - btsco_set_params, /* set_params */ - btsco_round_blocksize, /* round_blocksize */ - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - btsco_start_output, /* start_output */ - btsco_start_input, /* start_input */ - btsco_halt_output, /* halt_output */ - btsco_halt_input, /* halt_input */ - NULL, /* speaker_ctl */ - btsco_getdev, /* getdev */ - btsco_setfd, /* setfd */ - btsco_set_port, /* set_port */ - btsco_get_port, /* get_port */ - btsco_query_devinfo, /* query_devinfo */ - btsco_allocm, /* allocm */ - btsco_freem, /* freem */ - NULL, /* round_buffersize */ - NULL, /* mappage */ - btsco_get_props, /* get_props */ - NULL, /* trigger_output */ - NULL, /* trigger_input */ - btsco_dev_ioctl, /* dev_ioctl */ - btsco_get_locks, /* get_locks */ + .open = btsco_open, + .close = btsco_close, + .query_encoding = btsco_query_encoding, + .set_params = btsco_set_params, + .round_blocksize = btsco_round_blocksize, + .start_output = btsco_start_output, + .start_input = btsco_start_input, + .halt_output = btsco_halt_output, + .halt_input = btsco_halt_input, + .getdev = btsco_getdev, + .setfd = btsco_setfd, + .set_port = btsco_set_port, + .get_port = btsco_get_port, + .query_devinfo = btsco_query_devinfo, + .allocm = btsco_allocm, + .freem = btsco_freem, + .get_props = btsco_get_props, + .dev_ioctl = btsco_dev_ioctl, + .get_locks = btsco_get_locks, }; static const struct audio_device btsco_device = { Index: src/sys/dev/ebus/cs4231_ebus.c diff -u src/sys/dev/ebus/cs4231_ebus.c:1.37 src/sys/dev/ebus/cs4231_ebus.c:1.38 --- src/sys/dev/ebus/cs4231_ebus.c:1.37 Tue May 2 08:07:37 2017 +++ src/sys/dev/ebus/cs4231_ebus.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4231_ebus.c,v 1.37 2017/05/02 08:07:37 martin Exp $ */ +/* $NetBSD: cs4231_ebus.c,v 1.38 2019/03/16 12:09:57 isaki Exp $ */ /* * Copyright (c) 2002 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.37 2017/05/02 08:07:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.38 2019/03/16 12:09:57 isaki Exp $"); #ifdef _KERNEL_OPT #include "opt_sparc_arch.h" @@ -96,34 +96,24 @@ static int cs4231_ebus_halt_output(void static int cs4231_ebus_halt_input(void *); const struct audio_hw_if audiocs_ebus_hw_if = { - cs4231_open, - cs4231_close, - NULL, /* drain */ - ad1848_query_encoding, - ad1848_set_params, - cs4231_ebus_round_blocksize, - ad1848_commit_settings, - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - cs4231_ebus_halt_output, - cs4231_ebus_halt_input, - NULL, /* speaker_ctl */ - cs4231_getdev, - NULL, /* setfd */ - cs4231_set_port, - cs4231_get_port, - cs4231_query_devinfo, - cs4231_malloc, - cs4231_free, - NULL, /* round_buffersize */ - NULL, /* mappage */ - cs4231_get_props, - cs4231_ebus_trigger_output, - cs4231_ebus_trigger_input, - NULL, /* dev_ioctl */ - ad1848_get_locks, + .open = cs4231_open, + .close = cs4231_close, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .round_blocksize = cs4231_ebus_round_blocksize, + .commit_settings = ad1848_commit_settings, + .halt_output = cs4231_ebus_halt_output, + .halt_input = cs4231_ebus_halt_input, + .getdev = cs4231_getdev, + .set_port = cs4231_set_port, + .get_port = cs4231_get_port, + .query_devinfo = cs4231_query_devinfo, + .allocm = cs4231_malloc, + .freem = cs4231_free, + .get_props = cs4231_get_props, + .trigger_output = cs4231_ebus_trigger_output, + .trigger_input = cs4231_ebus_trigger_input, + .get_locks = ad1848_get_locks, }; #ifdef AUDIO_DEBUG Index: src/sys/dev/ic/tms320av110.c diff -u src/sys/dev/ic/tms320av110.c:1.24 src/sys/dev/ic/tms320av110.c:1.25 --- src/sys/dev/ic/tms320av110.c:1.24 Sat Mar 16 11:43:40 2019 +++ src/sys/dev/ic/tms320av110.c Sat Mar 16 12:09:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tms320av110.c,v 1.24 2019/03/16 11:43:40 isaki Exp $ */ +/* $NetBSD: tms320av110.c,v 1.25 2019/03/16 12:09:57 isaki Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.24 2019/03/16 11:43:40 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.25 2019/03/16 12:09:57 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -75,34 +75,23 @@ int tav_get_props(void *); void tav_get_locks(void *, kmutex_t **, kmutex_t **); const struct audio_hw_if tav_audio_if = { - tav_open, - tav_close, - 0 /* tav_drain*/, /* optional */ - tav_query_encoding, - tav_set_params, - tav_round_blocksize, - 0 /* commit_settings */, /* optional */ - tav_init_output, /* optional */ - 0 /* tav_init_input */, /* optional */ - tav_start_output, - tav_start_input, - tav_halt_output, - tav_halt_input, - tav_speaker_ctl, /* optional */ - tav_getdev, - 0 /* setfd */, /* optional */ - tav_set_port, - tav_get_port, - tav_query_devinfo, - 0 /* alloc */, /* optional */ - 0 /* free */, /* optional */ - 0 /* round_buffersize */, /* optional */ - 0 /* mappage */, /* optional */ - tav_get_props, - 0, /* trigger_output */ - 0, /* trigger_input */ - 0, /* dev_ioctl */ /* optional */ - tav_get_locks, + .open = tav_open, + .close = tav_close, + .query_encoding = tav_query_encoding, + .set_params = tav_set_params, + .round_blocksize = tav_round_blocksize, + .init_output = tav_init_output, /* optional */ + .start_output = tav_start_output, + .start_input = tav_start_input, + .halt_output = tav_halt_output, + .halt_input = tav_halt_input, + .speaker_ctl = tav_speaker_ctl, /* optional */ + .getdev = tav_getdev, + .set_port = tav_set_port, + .get_port = tav_get_port, + .query_devinfo = tav_query_devinfo, + .get_props = tav_get_props, + .get_locks = tav_get_locks, }; void Index: src/sys/dev/isa/aria.c diff -u src/sys/dev/isa/aria.c:1.38 src/sys/dev/isa/aria.c:1.39 --- src/sys/dev/isa/aria.c:1.38 Sat Mar 16 04:36:19 2019 +++ src/sys/dev/isa/aria.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aria.c,v 1.38 2019/03/16 04:36:19 isaki Exp $ */ +/* $NetBSD: aria.c,v 1.39 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 1995, 1996, 1998 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aria.c,v 1.38 2019/03/16 04:36:19 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aria.c,v 1.39 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -201,34 +201,22 @@ struct audio_device aria_device = { */ const struct audio_hw_if aria_hw_if = { - ariaopen, - ariaclose, - NULL, - aria_query_encoding, - aria_set_params, - aria_round_blocksize, - aria_commit_settings, - NULL, - NULL, - aria_start_output, - aria_start_input, - aria_halt_output, - aria_halt_input, - NULL, - aria_getdev, - NULL, - aria_mixer_set_port, - aria_mixer_get_port, - aria_mixer_query_devinfo, - NULL, - NULL, - NULL, - NULL, - aria_get_props, - NULL, - NULL, - NULL, - aria_get_locks, + .open = ariaopen, + .close = ariaclose, + .query_encoding = aria_query_encoding, + .set_params = aria_set_params, + .round_blocksize = aria_round_blocksize, + .commit_settings = aria_commit_settings, + .start_output = aria_start_output, + .start_input = aria_start_input, + .halt_output = aria_halt_output, + .halt_input = aria_halt_input, + .getdev = aria_getdev, + .set_port = aria_mixer_set_port, + .get_port = aria_mixer_get_port, + .query_devinfo = aria_mixer_query_devinfo, + .get_props = aria_get_props, + .get_locks = aria_get_locks, }; /* Index: src/sys/dev/isa/ess.c diff -u src/sys/dev/isa/ess.c:1.83 src/sys/dev/isa/ess.c:1.84 --- src/sys/dev/isa/ess.c:1.83 Thu Jul 14 10:19:06 2016 +++ src/sys/dev/isa/ess.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ess.c,v 1.83 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: ess.c,v 1.84 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright 1997 @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.83 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.84 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -215,65 +215,51 @@ struct audio_device ess_device = { */ const struct audio_hw_if ess_1788_hw_if = { - ess_open, - ess_close, - ess_drain, - ess_query_encoding, - ess_set_params, - ess_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - ess_audio1_halt, - ess_audio1_halt, - ess_speaker_ctl, - ess_getdev, - NULL, - ess_set_port, - ess_get_port, - ess_query_devinfo, - ess_malloc, - ess_free, - ess_round_buffersize, - ess_mappage, - ess_1788_get_props, - ess_audio1_trigger_output, - ess_audio1_trigger_input, - NULL, - ess_get_locks, + .open = ess_open, + .close = ess_close, + .drain = ess_drain, + .query_encoding = ess_query_encoding, + .set_params = ess_set_params, + .round_blocksize = ess_round_blocksize, + .halt_output = ess_audio1_halt, + .halt_input = ess_audio1_halt, + .speaker_ctl = ess_speaker_ctl, + .getdev = ess_getdev, + .set_port = ess_set_port, + .get_port = ess_get_port, + .query_devinfo = ess_query_devinfo, + .allocm = ess_malloc, + .freem = ess_free, + .round_buffersize = ess_round_buffersize, + .mappage = ess_mappage, + .get_props = ess_1788_get_props, + .trigger_output = ess_audio1_trigger_output, + .trigger_input = ess_audio1_trigger_input, + .get_locks = ess_get_locks, }; const struct audio_hw_if ess_1888_hw_if = { - ess_open, - ess_close, - ess_drain, - ess_query_encoding, - ess_set_params, - ess_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - ess_audio2_halt, - ess_audio1_halt, - ess_speaker_ctl, - ess_getdev, - NULL, - ess_set_port, - ess_get_port, - ess_query_devinfo, - ess_malloc, - ess_free, - ess_round_buffersize, - ess_mappage, - ess_1888_get_props, - ess_audio2_trigger_output, - ess_audio1_trigger_input, - NULL, - ess_get_locks, + .open = ess_open, + .close = ess_close, + .drain = ess_drain, + .query_encoding = ess_query_encoding, + .set_params = ess_set_params, + .round_blocksize = ess_round_blocksize, + .halt_output = ess_audio2_halt, + .halt_input = ess_audio1_halt, + .speaker_ctl = ess_speaker_ctl, + .getdev = ess_getdev, + .set_port = ess_set_port, + .get_port = ess_get_port, + .query_devinfo = ess_query_devinfo, + .allocm = ess_malloc, + .freem = ess_free, + .round_buffersize = ess_round_buffersize, + .mappage = ess_mappage, + .get_props = ess_1888_get_props, + .trigger_output = ess_audio2_trigger_output, + .trigger_input = ess_audio1_trigger_input, + .get_locks = ess_get_locks, }; #define ESS_NFORMATS 8 Index: src/sys/dev/isa/gus.c diff -u src/sys/dev/isa/gus.c:1.114 src/sys/dev/isa/gus.c:1.115 --- src/sys/dev/isa/gus.c:1.114 Sun Feb 3 03:19:27 2019 +++ src/sys/dev/isa/gus.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gus.c,v 1.114 2019/02/03 03:19:27 mrg Exp $ */ +/* $NetBSD: gus.c,v 1.115 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 1996, 1999, 2008 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.114 2019/02/03 03:19:27 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.115 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -576,65 +576,51 @@ static const unsigned short gus_log_volu */ const struct audio_hw_if gus_hw_if = { - gusopen, - gusclose, - NULL, /* drain */ - gus_query_encoding, - gus_set_params, - gus_round_blocksize, - gus_commit_settings, - NULL, - NULL, - gus_dma_output, - gus_dma_input, - gus_halt_out_dma, - gus_halt_in_dma, - gus_speaker_ctl, - gus_getdev, - NULL, - gus_mixer_set_port, - gus_mixer_get_port, - gus_mixer_query_devinfo, - ad1848_isa_malloc, - ad1848_isa_free, - ad1848_isa_round_buffersize, - ad1848_isa_mappage, - gus_get_props, - NULL, - NULL, - NULL, - ad1848_get_locks, + .open = gusopen, + .close = gusclose, + .query_encoding = gus_query_encoding, + .set_params = gus_set_params, + .round_blocksize = gus_round_blocksize, + .commit_settings = gus_commit_settings, + .start_output = gus_dma_output, + .start_input = gus_dma_input, + .halt_output = gus_halt_out_dma, + .halt_input = gus_halt_in_dma, + .speaker_ctl = gus_speaker_ctl, + .getdev = gus_getdev, + .set_port = gus_mixer_set_port, + .get_port = gus_mixer_get_port, + .query_devinfo = gus_mixer_query_devinfo, + .allocm = ad1848_isa_malloc, + .freem = ad1848_isa_free, + .round_buffersize = ad1848_isa_round_buffersize, + .mappage = ad1848_isa_mappage, + .get_props = gus_get_props, + .get_locks = ad1848_get_locks, }; static const struct audio_hw_if gusmax_hw_if = { - gusmaxopen, - gusmax_close, - NULL, /* drain */ - gus_query_encoding, /* query encoding */ - gusmax_set_params, - gusmax_round_blocksize, - gusmax_commit_settings, - NULL, - NULL, - gusmax_dma_output, - gusmax_dma_input, - gusmax_halt_out_dma, - gusmax_halt_in_dma, - gusmax_speaker_ctl, - gus_getdev, - NULL, - gusmax_mixer_set_port, - gusmax_mixer_get_port, - gusmax_mixer_query_devinfo, - ad1848_isa_malloc, - ad1848_isa_free, - ad1848_isa_round_buffersize, - ad1848_isa_mappage, - gusmax_get_props, - NULL, - NULL, - NULL, - ad1848_get_locks, + .open = gusmaxopen, + .close = gusmax_close, + .query_encoding = gus_query_encoding, + .set_params = gusmax_set_params, + .round_blocksize = gusmax_round_blocksize, + .commit_settings = gusmax_commit_settings, + .start_output = gusmax_dma_output, + .start_input = gusmax_dma_input, + .halt_output = gusmax_halt_out_dma, + .halt_input = gusmax_halt_in_dma, + .speaker_ctl = gusmax_speaker_ctl, + .getdev = gus_getdev, + .set_port = gusmax_mixer_set_port, + .get_port = gusmax_mixer_get_port, + .query_devinfo = gusmax_mixer_query_devinfo, + .allocm = ad1848_isa_malloc, + .freem = ad1848_isa_free, + .round_buffersize = ad1848_isa_round_buffersize, + .mappage = ad1848_isa_mappage, + .get_props = gusmax_get_props, + .get_locks = ad1848_get_locks, }; /* Index: src/sys/dev/isa/pas.c diff -u src/sys/dev/isa/pas.c:1.70 src/sys/dev/isa/pas.c:1.71 --- src/sys/dev/isa/pas.c:1.70 Thu Nov 24 03:35:58 2011 +++ src/sys/dev/isa/pas.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pas.c,v 1.70 2011/11/24 03:35:58 mrg Exp $ */ +/* $NetBSD: pas.c,v 1.71 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -57,7 +57,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pas.c,v 1.70 2011/11/24 03:35:58 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pas.c,v 1.71 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -123,34 +123,26 @@ void pasconf(int, int, int, int); */ const struct audio_hw_if pas_hw_if = { - sbdsp_open, - sbdsp_close, - 0, - sbdsp_query_encoding, - sbdsp_set_params, - sbdsp_round_blocksize, - 0, - 0, - 0, - 0, - 0, - sbdsp_halt_output, - sbdsp_halt_input, - sbdsp_speaker_ctl, - pas_getdev, - 0, - sbdsp_mixer_set_port, - sbdsp_mixer_get_port, - sbdsp_mixer_query_devinfo, - sb_malloc, - sb_free, - sb_round_buffersize, - sb_mappage, - sbdsp_get_props, - sbdsp_trigger_output, - sbdsp_trigger_input, - 0, - sbdsp_get_locks, + .open = sbdsp_open, + .close = sbdsp_close, + .query_encoding = sbdsp_query_encoding, + .set_params = sbdsp_set_params, + .round_blocksize = sbdsp_round_blocksize, + .halt_output = sbdsp_halt_output, + .halt_input = sbdsp_halt_input, + .speaker_ctl = sbdsp_speaker_ctl, + .getdev = pas_getdev, + .set_port = sbdsp_mixer_set_port, + .get_port = sbdsp_mixer_get_port, + .query_devinfo = sbdsp_mixer_query_devinfo, + .allocm = sb_malloc, + .freem = sb_free, + .round_buffersize = sb_round_buffersize, + .mappage = sb_mappage, + .get_props = sbdsp_get_props, + .trigger_output = sbdsp_trigger_output, + .trigger_input = sbdsp_trigger_input, + .get_locks = sbdsp_get_locks, }; /* The Address Translation code is used to convert I/O register addresses to Index: src/sys/dev/isa/sb.c diff -u src/sys/dev/isa/sb.c:1.89 src/sys/dev/isa/sb.c:1.90 --- src/sys/dev/isa/sb.c:1.89 Wed Nov 23 23:07:32 2011 +++ src/sys/dev/isa/sb.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sb.c,v 1.89 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: sb.c,v 1.90 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.89 2011/11/23 23:07:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.90 2019/03/16 12:09:58 isaki Exp $"); #include "midi.h" @@ -80,34 +80,26 @@ int sb_getdev(void *, struct audio_devic */ const struct audio_hw_if sb_hw_if = { - sbdsp_open, - sbdsp_close, - 0, - sbdsp_query_encoding, - sbdsp_set_params, - sbdsp_round_blocksize, - 0, - 0, - 0, - 0, - 0, - sbdsp_halt_output, - sbdsp_halt_input, - sbdsp_speaker_ctl, - sb_getdev, - 0, - sbdsp_mixer_set_port, - sbdsp_mixer_get_port, - sbdsp_mixer_query_devinfo, - sb_malloc, - sb_free, - sb_round_buffersize, - sb_mappage, - sbdsp_get_props, - sbdsp_trigger_output, - sbdsp_trigger_input, - NULL, - sbdsp_get_locks, + .open = sbdsp_open, + .close = sbdsp_close, + .query_encoding = sbdsp_query_encoding, + .set_params = sbdsp_set_params, + .round_blocksize = sbdsp_round_blocksize, + .halt_output = sbdsp_halt_output, + .halt_input = sbdsp_halt_input, + .speaker_ctl = sbdsp_speaker_ctl, + .getdev = sb_getdev, + .set_port = sbdsp_mixer_set_port, + .get_port = sbdsp_mixer_get_port, + .query_devinfo = sbdsp_mixer_query_devinfo, + .allocm = sb_malloc, + .freem = sb_free, + .round_buffersize = sb_round_buffersize, + .mappage = sb_mappage, + .get_props = sbdsp_get_props, + .trigger_output = sbdsp_trigger_output, + .trigger_input = sbdsp_trigger_input, + .get_locks = sbdsp_get_locks, }; /* Index: src/sys/dev/isa/wss.c diff -u src/sys/dev/isa/wss.c:1.71 src/sys/dev/isa/wss.c:1.72 --- src/sys/dev/isa/wss.c:1.71 Thu Nov 24 03:35:58 2011 +++ src/sys/dev/isa/wss.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wss.c,v 1.71 2011/11/24 03:35:58 mrg Exp $ */ +/* $NetBSD: wss.c,v 1.72 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.71 2011/11/24 03:35:58 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.72 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,34 +85,26 @@ int wss_query_devinfo(void *, mixer_devi */ const struct audio_hw_if wss_hw_if = { - ad1848_isa_open, - ad1848_isa_close, - NULL, - ad1848_query_encoding, - ad1848_set_params, - ad1848_round_blocksize, - ad1848_commit_settings, - NULL, - NULL, - NULL, - NULL, - ad1848_isa_halt_output, - ad1848_isa_halt_input, - NULL, - wss_getdev, - NULL, - wss_mixer_set_port, - wss_mixer_get_port, - wss_query_devinfo, - ad1848_isa_malloc, - ad1848_isa_free, - ad1848_isa_round_buffersize, - ad1848_isa_mappage, - ad1848_isa_get_props, - ad1848_isa_trigger_output, - ad1848_isa_trigger_input, - NULL, - ad1848_get_locks, + .open = ad1848_isa_open, + .close = ad1848_isa_close, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .round_blocksize = ad1848_round_blocksize, + .commit_settings = ad1848_commit_settings, + .halt_output = ad1848_isa_halt_output, + .halt_input = ad1848_isa_halt_input, + .getdev = wss_getdev, + .set_port = wss_mixer_set_port, + .get_port = wss_mixer_get_port, + .query_devinfo = wss_query_devinfo, + .allocm = ad1848_isa_malloc, + .freem = ad1848_isa_free, + .round_buffersize = ad1848_isa_round_buffersize, + .mappage = ad1848_isa_mappage, + .get_props = ad1848_isa_get_props, + .trigger_output = ad1848_isa_trigger_output, + .trigger_input = ad1848_isa_trigger_input, + .get_locks = ad1848_get_locks, }; /* Index: src/sys/dev/isa/ym.c diff -u src/sys/dev/isa/ym.c:1.44 src/sys/dev/isa/ym.c:1.45 --- src/sys/dev/isa/ym.c:1.44 Fri Nov 8 03:12:17 2013 +++ src/sys/dev/isa/ym.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $ */ +/* $NetBSD: ym.c,v 1.45 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 1999-2002, 2008 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.44 2013/11/08 03:12:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.45 2019/03/16 12:09:58 isaki Exp $"); #include "mpu_ym.h" #include "opt_ym.h" @@ -168,34 +168,26 @@ static bool ym_resume(device_t, const pm const struct audio_hw_if ym_hw_if = { - ad1848_isa_open, - ad1848_isa_close, - NULL, - ad1848_query_encoding, - ad1848_set_params, - ad1848_round_blocksize, - ad1848_commit_settings, - NULL, - NULL, - NULL, - NULL, - ad1848_isa_halt_output, - ad1848_isa_halt_input, - NULL, - ym_getdev, - NULL, - ym_mixer_set_port, - ym_mixer_get_port, - ym_query_devinfo, - ad1848_isa_malloc, - ad1848_isa_free, - ad1848_isa_round_buffersize, - ad1848_isa_mappage, - ad1848_isa_get_props, - ad1848_isa_trigger_output, - ad1848_isa_trigger_input, - NULL, - ad1848_get_locks, + .open = ad1848_isa_open, + .close = ad1848_isa_close, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .round_blocksize = ad1848_round_blocksize, + .commit_settings = ad1848_commit_settings, + .halt_output = ad1848_isa_halt_output, + .halt_input = ad1848_isa_halt_input, + .getdev = ym_getdev, + .set_port = ym_mixer_set_port, + .get_port = ym_mixer_get_port, + .query_devinfo = ym_query_devinfo, + .allocm = ad1848_isa_malloc, + .freem = ad1848_isa_free, + .round_buffersize = ad1848_isa_round_buffersize, + .mappage = ad1848_isa_mappage, + .get_props = ad1848_isa_get_props, + .trigger_output = ad1848_isa_trigger_output, + .trigger_input = ad1848_isa_trigger_input, + .get_locks = ad1848_get_locks, }; static inline int ym_read(struct ym_softc *, int); Index: src/sys/dev/isapnp/gus_isapnp.c diff -u src/sys/dev/isapnp/gus_isapnp.c:1.38 src/sys/dev/isapnp/gus_isapnp.c:1.39 --- src/sys/dev/isapnp/gus_isapnp.c:1.38 Thu Jul 14 10:19:06 2016 +++ src/sys/dev/isapnp/gus_isapnp.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gus_isapnp.c,v 1.38 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: gus_isapnp.c,v 1.39 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1997, 1999, 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.38 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.39 2019/03/16 12:09:58 isaki Exp $"); #include "guspnp.h" #if NGUSPNP > 0 @@ -64,34 +64,30 @@ void gus_isapnp_attach(device_t, device_ static int gus_isapnp_open(void *, int); static const struct audio_hw_if guspnp_hw_if = { - gus_isapnp_open, - iwclose, - NULL, /* drain */ - iw_query_encoding, - iw_set_params, - iw_round_blocksize, - iw_commit_settings, - iw_init_output, - iw_init_input, - iw_start_output, - iw_start_input, - iw_halt_output, - iw_halt_input, - iw_speaker_ctl, - iw_getdev, - iw_setfd, - iw_set_port, - iw_get_port, - iw_query_devinfo, - iw_malloc, - iw_free, - iw_round_buffersize, - iw_mappage, - iw_get_props, - NULL, /* trigger_output */ - NULL, /* trigger_input */ - NULL, /* dev_ioctl */ - iw_get_locks, + .open = gus_isapnp_open, + .close = iwclose, + .query_encoding = iw_query_encoding, + .set_params = iw_set_params, + .round_blocksize = iw_round_blocksize, + .commit_settings = iw_commit_settings, + .init_output = iw_init_output, + .init_input = iw_init_input, + .start_output = iw_start_output, + .start_input = iw_start_input, + .halt_output = iw_halt_output, + .halt_input = iw_halt_input, + .speaker_ctl = iw_speaker_ctl, + .getdev = iw_getdev, + .setfd = iw_setfd, + .set_port = iw_set_port, + .get_port = iw_get_port, + .query_devinfo = iw_query_devinfo, + .allocm = iw_malloc, + .freem = iw_free, + .round_buffersize = iw_round_buffersize, + .mappage = iw_mappage, + .get_props = iw_get_props, + .get_locks = iw_get_locks, }; CFATTACH_DECL_NEW(guspnp, sizeof(struct iw_softc), Index: src/sys/dev/pci/auacer.c diff -u src/sys/dev/pci/auacer.c:1.35 src/sys/dev/pci/auacer.c:1.36 --- src/sys/dev/pci/auacer.c:1.35 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/auacer.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auacer.c,v 1.35 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: auacer.c,v 1.36 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.35 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.36 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -190,34 +190,23 @@ static int auacer_set_rate(struct auacer static void auacer_reset(struct auacer_softc *sc); static const struct audio_hw_if auacer_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - auacer_query_encoding, - auacer_set_params, - auacer_round_blocksize, - NULL, /* commit_setting */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - auacer_halt_output, - auacer_halt_input, - NULL, /* speaker_ctl */ - auacer_getdev, - NULL, /* getfd */ - auacer_set_port, - auacer_get_port, - auacer_query_devinfo, - auacer_allocm, - auacer_freem, - auacer_round_buffersize, - auacer_mappage, - auacer_get_props, - auacer_trigger_output, - auacer_trigger_input, - NULL, /* dev_ioctl */ - auacer_get_locks, + .query_encoding = auacer_query_encoding, + .set_params = auacer_set_params, + .round_blocksize = auacer_round_blocksize, + .halt_output = auacer_halt_output, + .halt_input = auacer_halt_input, + .getdev = auacer_getdev, + .set_port = auacer_set_port, + .get_port = auacer_get_port, + .query_devinfo = auacer_query_devinfo, + .allocm = auacer_allocm, + .freem = auacer_freem, + .round_buffersize = auacer_round_buffersize, + .mappage = auacer_mappage, + .get_props = auacer_get_props, + .trigger_output = auacer_trigger_output, + .trigger_input = auacer_trigger_input, + .get_locks = auacer_get_locks, }; #define AUACER_FORMATS_4CH 1 Index: src/sys/dev/pci/auich.c diff -u src/sys/dev/pci/auich.c:1.152 src/sys/dev/pci/auich.c:1.153 --- src/sys/dev/pci/auich.c:1.152 Sat Mar 24 18:32:13 2018 +++ src/sys/dev/pci/auich.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auich.c,v 1.152 2018/03/24 18:32:13 jdolecek Exp $ */ +/* $NetBSD: auich.c,v 1.153 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2008 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.152 2018/03/24 18:32:13 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.153 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -305,34 +305,25 @@ static enum ac97_host_flags auich_flags_ static void auich_spdif_event(void *, bool); static const struct audio_hw_if auich_hw_if = { - auich_open, - auich_close, - NULL, /* drain */ - auich_query_encoding, - auich_set_params, - auich_round_blocksize, - NULL, /* commit_setting */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - auich_halt_output, - auich_halt_input, - NULL, /* speaker_ctl */ - auich_getdev, - NULL, /* getfd */ - auich_set_port, - auich_get_port, - auich_query_devinfo, - auich_allocm, - auich_freem, - auich_round_buffersize, - auich_mappage, - auich_get_props, - auich_trigger_output, - auich_trigger_input, - NULL, /* dev_ioctl */ - auich_get_locks, + .open = auich_open, + .close = auich_close, + .query_encoding = auich_query_encoding, + .set_params = auich_set_params, + .round_blocksize = auich_round_blocksize, + .halt_output = auich_halt_output, + .halt_input = auich_halt_input, + .getdev = auich_getdev, + .set_port = auich_set_port, + .get_port = auich_get_port, + .query_devinfo = auich_query_devinfo, + .allocm = auich_allocm, + .freem = auich_freem, + .round_buffersize = auich_round_buffersize, + .mappage = auich_mappage, + .get_props = auich_get_props, + .trigger_output = auich_trigger_output, + .trigger_input = auich_trigger_input, + .get_locks = auich_get_locks, }; #define AUICH_FORMATS_1CH 0 Index: src/sys/dev/pci/auixp.c diff -u src/sys/dev/pci/auixp.c:1.44 src/sys/dev/pci/auixp.c:1.45 --- src/sys/dev/pci/auixp.c:1.44 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/auixp.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auixp.c,v 1.44 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: auixp.c,v 1.45 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2004, 2005 Reinoud Zandijk <rein...@netbsd.org> @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.44 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.45 2019/03/16 12:09:58 isaki Exp $"); #include <sys/types.h> #include <sys/errno.h> @@ -207,34 +207,24 @@ static void auixp_dumpreg(void); static const struct audio_hw_if auixp_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - auixp_query_encoding, - auixp_set_params, - auixp_round_blocksize, - auixp_commit_settings, - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - auixp_halt_output, - auixp_halt_input, - NULL, /* speaker_ctl */ - auixp_getdev, - NULL, /* getfd */ - auixp_set_port, - auixp_get_port, - auixp_query_devinfo, - auixp_malloc, - auixp_free, - auixp_round_buffersize, - auixp_mappage, - auixp_get_props, - auixp_trigger_output, - auixp_trigger_input, - NULL, /* dev_ioctl */ - auixp_get_locks, + .query_encoding = auixp_query_encoding, + .set_params = auixp_set_params, + .round_blocksize = auixp_round_blocksize, + .commit_settings = auixp_commit_settings, + .halt_output = auixp_halt_output, + .halt_input = auixp_halt_input, + .getdev = auixp_getdev, + .set_port = auixp_set_port, + .get_port = auixp_get_port, + .query_devinfo = auixp_query_devinfo, + .allocm = auixp_malloc, + .freem = auixp_free, + .round_buffersize = auixp_round_buffersize, + .mappage = auixp_mappage, + .get_props = auixp_get_props, + .trigger_output = auixp_trigger_output, + .trigger_input = auixp_trigger_input, + .get_locks = auixp_get_locks, }; Index: src/sys/dev/pci/fms.c diff -u src/sys/dev/pci/fms.c:1.44 src/sys/dev/pci/fms.c:1.45 --- src/sys/dev/pci/fms.c:1.44 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/fms.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fms.c,v 1.44 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: fms.c,v 1.45 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.44 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.45 2019/03/16 12:09:58 isaki Exp $"); #include "mpu.h" @@ -110,34 +110,23 @@ static struct audio_device fms_device = static const struct audio_hw_if fms_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, - fms_query_encoding, - fms_set_params, - fms_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - fms_halt_output, - fms_halt_input, - NULL, - fms_getdev, - NULL, - fms_set_port, - fms_get_port, - fms_query_devinfo, - fms_malloc, - fms_free, - fms_round_buffersize, - fms_mappage, - fms_get_props, - fms_trigger_output, - fms_trigger_input, - NULL, - fms_get_locks, + .query_encoding = fms_query_encoding, + .set_params = fms_set_params, + .round_blocksize = fms_round_blocksize, + .halt_output = fms_halt_output, + .halt_input = fms_halt_input, + .getdev = fms_getdev, + .set_port = fms_set_port, + .get_port = fms_get_port, + .query_devinfo = fms_query_devinfo, + .allocm = fms_malloc, + .freem = fms_free, + .round_buffersize = fms_round_buffersize, + .mappage = fms_mappage, + .get_props = fms_get_props, + .trigger_output = fms_trigger_output, + .trigger_input = fms_trigger_input, + .get_locks = fms_get_locks, }; static int fms_attach_codec(void *, struct ac97_codec_if *); Index: src/sys/dev/pci/autri.c diff -u src/sys/dev/pci/autri.c:1.55 src/sys/dev/pci/autri.c:1.56 --- src/sys/dev/pci/autri.c:1.55 Thu Jun 1 02:45:11 2017 +++ src/sys/dev/pci/autri.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autri.c,v 1.55 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: autri.c,v 1.56 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autri.c,v 1.55 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autri.c,v 1.56 2019/03/16 12:09:58 isaki Exp $"); #include "midi.h" @@ -136,34 +136,24 @@ static int autri_query_devinfo(void *, m static void autri_get_locks(void *, kmutex_t **, kmutex_t **); static const struct audio_hw_if autri_hw_if = { - autri_open, - NULL, /* close */ - NULL, /* drain */ - autri_query_encoding, - autri_set_params, - autri_round_blocksize, - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - autri_halt_output, - autri_halt_input, - NULL, /* speaker_ctl */ - autri_getdev, - NULL, /* setfd */ - autri_mixer_set_port, - autri_mixer_get_port, - autri_query_devinfo, - autri_malloc, - autri_free, - autri_round_buffersize, - autri_mappage, - autri_get_props, - autri_trigger_output, - autri_trigger_input, - NULL, /* dev_ioctl */ - autri_get_locks, + .open = autri_open, + .query_encoding = autri_query_encoding, + .set_params = autri_set_params, + .round_blocksize = autri_round_blocksize, + .halt_output = autri_halt_output, + .halt_input = autri_halt_input, + .getdev = autri_getdev, + .set_port = autri_mixer_set_port, + .get_port = autri_mixer_get_port, + .query_devinfo = autri_query_devinfo, + .allocm = autri_malloc, + .freem = autri_free, + .round_buffersize = autri_round_buffersize, + .mappage = autri_mappage, + .get_props = autri_get_props, + .trigger_output = autri_trigger_output, + .trigger_input = autri_trigger_input, + .get_locks = autri_get_locks, }; #if NMIDI > 0 Index: src/sys/dev/pci/auvia.c diff -u src/sys/dev/pci/auvia.c:1.81 src/sys/dev/pci/auvia.c:1.82 --- src/sys/dev/pci/auvia.c:1.81 Sat Mar 16 04:41:09 2019 +++ src/sys/dev/pci/auvia.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auvia.c,v 1.81 2019/03/16 04:41:09 isaki Exp $ */ +/* $NetBSD: auvia.c,v 1.82 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.81 2019/03/16 04:41:09 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.82 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -210,34 +210,25 @@ CFATTACH_DECL2_NEW(auvia, sizeof (struct #define TIMEOUT 50 static const struct audio_hw_if auvia_hw_if = { - auvia_open, - auvia_close, - NULL, /* drain */ - auvia_query_encoding, - auvia_set_params, - auvia_round_blocksize, - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - auvia_halt_output, - auvia_halt_input, - NULL, /* speaker_ctl */ - auvia_getdev, - NULL, /* setfd */ - auvia_set_port, - auvia_get_port, - auvia_query_devinfo, - auvia_malloc, - auvia_free, - auvia_round_buffersize, - auvia_mappage, - auvia_get_props, - auvia_trigger_output, - auvia_trigger_input, - NULL, /* dev_ioctl */ - auvia_get_locks, + .open = auvia_open, + .close = auvia_close, + .query_encoding = auvia_query_encoding, + .set_params = auvia_set_params, + .round_blocksize = auvia_round_blocksize, + .halt_output = auvia_halt_output, + .halt_input = auvia_halt_input, + .getdev = auvia_getdev, + .set_port = auvia_set_port, + .get_port = auvia_get_port, + .query_devinfo = auvia_query_devinfo, + .allocm = auvia_malloc, + .freem = auvia_free, + .round_buffersize = auvia_round_buffersize, + .mappage = auvia_mappage, + .get_props = auvia_get_props, + .trigger_output = auvia_trigger_output, + .trigger_input = auvia_trigger_input, + .get_locks = auvia_get_locks, }; #define AUVIA_FORMATS_4CH_16 2 Index: src/sys/dev/pci/azalia.c diff -u src/sys/dev/pci/azalia.c:1.85 src/sys/dev/pci/azalia.c:1.86 --- src/sys/dev/pci/azalia.c:1.85 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/azalia.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: azalia.c,v 1.85 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: azalia.c,v 1.86 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.85 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.86 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -233,34 +233,24 @@ CFATTACH_DECL2_NEW(azalia, sizeof(azalia NULL, azalia_childdet); static const struct audio_hw_if azalia_hw_if = { - azalia_open, - azalia_close, - NULL, /* drain */ - azalia_query_encoding, - azalia_set_params, - azalia_round_blocksize, - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* satart_inpu */ - azalia_halt_output, - azalia_halt_input, - NULL, /* speaker_ctl */ - azalia_getdev, - NULL, /* setfd */ - azalia_set_port, - azalia_get_port, - azalia_query_devinfo, - azalia_allocm, - azalia_freem, - azalia_round_buffersize, - NULL, /* mappage */ - azalia_get_props, - azalia_trigger_output, - azalia_trigger_input, - NULL, /* dev_ioctl */ - azalia_get_locks, + .open = azalia_open, + .close = azalia_close, + .query_encoding = azalia_query_encoding, + .set_params = azalia_set_params, + .round_blocksize = azalia_round_blocksize, + .halt_output = azalia_halt_output, + .halt_input = azalia_halt_input, + .getdev = azalia_getdev, + .set_port = azalia_set_port, + .get_port = azalia_get_port, + .query_devinfo = azalia_query_devinfo, + .allocm = azalia_allocm, + .freem = azalia_freem, + .round_buffersize = azalia_round_buffersize, + .get_props = azalia_get_props, + .trigger_output = azalia_trigger_output, + .trigger_input = azalia_trigger_input, + .get_locks = azalia_get_locks, }; static const char *pin_colors[16] = { Index: src/sys/dev/pci/cmpci.c diff -u src/sys/dev/pci/cmpci.c:1.51 src/sys/dev/pci/cmpci.c:1.52 --- src/sys/dev/pci/cmpci.c:1.51 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/cmpci.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cmpci.c,v 1.51 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: cmpci.c,v 1.52 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.51 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.52 2019/03/16 12:09:58 isaki Exp $"); #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) if (cmpcidebug) printf x @@ -150,34 +150,23 @@ static int cmpci_trigger_input(void *, v static void cmpci_get_locks(void *, kmutex_t **, kmutex_t **); static const struct audio_hw_if cmpci_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - cmpci_query_encoding, /* query_encoding */ - cmpci_set_params, /* set_params */ - cmpci_round_blocksize, /* round_blocksize */ - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - cmpci_halt_output, /* halt_output */ - cmpci_halt_input, /* halt_input */ - NULL, /* speaker_ctl */ - cmpci_getdev, /* getdev */ - NULL, /* setfd */ - cmpci_set_port, /* set_port */ - cmpci_get_port, /* get_port */ - cmpci_query_devinfo, /* query_devinfo */ - cmpci_allocm, /* allocm */ - cmpci_freem, /* freem */ - cmpci_round_buffersize,/* round_buffersize */ - cmpci_mappage, /* mappage */ - cmpci_get_props, /* get_props */ - cmpci_trigger_output, /* trigger_output */ - cmpci_trigger_input, /* trigger_input */ - NULL, /* dev_ioctl */ - cmpci_get_locks, /* get_locks */ + .query_encoding = cmpci_query_encoding, + .set_params = cmpci_set_params, + .round_blocksize = cmpci_round_blocksize, + .halt_output = cmpci_halt_output, + .halt_input = cmpci_halt_input, + .getdev = cmpci_getdev, + .set_port = cmpci_set_port, + .get_port = cmpci_get_port, + .query_devinfo = cmpci_query_devinfo, + .allocm = cmpci_allocm, + .freem = cmpci_freem, + .round_buffersize = cmpci_round_buffersize, + .mappage = cmpci_mappage, + .get_props = cmpci_get_props, + .trigger_output = cmpci_trigger_output, + .trigger_input = cmpci_trigger_input, + .get_locks = cmpci_get_locks, }; #define CMPCI_NFORMATS 4 Index: src/sys/dev/pci/neo.c diff -u src/sys/dev/pci/neo.c:1.51 src/sys/dev/pci/neo.c:1.52 --- src/sys/dev/pci/neo.c:1.51 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/neo.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: neo.c,v 1.51 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: neo.c,v 1.52 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1999 Cameron Grant <gand...@vilnya.demon.co.uk> @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.51 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.52 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -243,34 +243,23 @@ static const struct audio_format neo_for /* -------------------------------------------------------------------- */ static const struct audio_hw_if neo_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - neo_query_encoding, - neo_set_params, - neo_round_blocksize, - NULL, /* commit_setting */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - neo_halt_output, - neo_halt_input, - NULL, /* speaker_ctl */ - neo_getdev, - NULL, /* getfd */ - neo_mixer_set_port, - neo_mixer_get_port, - neo_query_devinfo, - neo_malloc, - neo_free, - neo_round_buffersize, - neo_mappage, - neo_get_props, - neo_trigger_output, - neo_trigger_input, - NULL, - neo_get_locks, + .query_encoding = neo_query_encoding, + .set_params = neo_set_params, + .round_blocksize = neo_round_blocksize, + .halt_output = neo_halt_output, + .halt_input = neo_halt_input, + .getdev = neo_getdev, + .set_port = neo_mixer_set_port, + .get_port = neo_mixer_get_port, + .query_devinfo = neo_query_devinfo, + .allocm = neo_malloc, + .freem = neo_free, + .round_buffersize = neo_round_buffersize, + .mappage = neo_mappage, + .get_props = neo_get_props, + .trigger_output = neo_trigger_output, + .trigger_input = neo_trigger_input, + .get_locks = neo_get_locks, }; /* -------------------------------------------------------------------- */ Index: src/sys/dev/pci/cs4280.c diff -u src/sys/dev/pci/cs4280.c:1.70 src/sys/dev/pci/cs4280.c:1.71 --- src/sys/dev/pci/cs4280.c:1.70 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/cs4280.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4280.c,v 1.70 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: cs4280.c,v 1.71 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved. @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.70 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.71 2019/03/16 12:09:58 isaki Exp $"); #include "midi.h" @@ -159,34 +159,23 @@ static const struct cs4280_card_t cs4280 #define CS4280_CARDS_SIZE (sizeof(cs4280_cards)/sizeof(cs4280_cards[0])) static const struct audio_hw_if cs4280_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, - cs4280_query_encoding, - cs4280_set_params, - cs428x_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - cs4280_halt_output, - cs4280_halt_input, - NULL, - cs4280_getdev, - NULL, - cs428x_mixer_set_port, - cs428x_mixer_get_port, - cs428x_query_devinfo, - cs428x_malloc, - cs428x_free, - cs428x_round_buffersize, - cs428x_mappage, - cs428x_get_props, - cs4280_trigger_output, - cs4280_trigger_input, - NULL, - cs428x_get_locks, + .query_encoding = cs4280_query_encoding, + .set_params = cs4280_set_params, + .round_blocksize = cs428x_round_blocksize, + .halt_output = cs4280_halt_output, + .halt_input = cs4280_halt_input, + .getdev = cs4280_getdev, + .set_port = cs428x_mixer_set_port, + .get_port = cs428x_mixer_get_port, + .query_devinfo = cs428x_query_devinfo, + .allocm = cs428x_malloc, + .freem = cs428x_free, + .round_buffersize = cs428x_round_buffersize, + .mappage = cs428x_mappage, + .get_props = cs428x_get_props, + .trigger_output = cs4280_trigger_output, + .trigger_input = cs4280_trigger_input, + .get_locks = cs428x_get_locks, }; #if NMIDI > 0 Index: src/sys/dev/pci/cs4281.c diff -u src/sys/dev/pci/cs4281.c:1.53 src/sys/dev/pci/cs4281.c:1.54 --- src/sys/dev/pci/cs4281.c:1.53 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/cs4281.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4281.c,v 1.53 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: cs4281.c,v 1.54 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2000 Tatoku Ogaito. All rights reserved. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs4281.c,v 1.53 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4281.c,v 1.54 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -110,34 +110,23 @@ static bool cs4281_suspend(device_t, con static bool cs4281_resume(device_t, const pmf_qual_t *); static const struct audio_hw_if cs4281_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, - cs4281_query_encoding, - cs4281_set_params, - cs428x_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - cs4281_halt_output, - cs4281_halt_input, - NULL, - cs4281_getdev, - NULL, - cs428x_mixer_set_port, - cs428x_mixer_get_port, - cs428x_query_devinfo, - cs428x_malloc, - cs428x_free, - cs428x_round_buffersize, - cs428x_mappage, - cs428x_get_props, - cs4281_trigger_output, - cs4281_trigger_input, - NULL, - cs428x_get_locks, + .query_encoding = cs4281_query_encoding, + .set_params = cs4281_set_params, + .round_blocksize = cs428x_round_blocksize, + .halt_output = cs4281_halt_output, + .halt_input = cs4281_halt_input, + .getdev = cs4281_getdev, + .set_port = cs428x_mixer_set_port, + .get_port = cs428x_mixer_get_port, + .query_devinfo = cs428x_query_devinfo, + .allocm = cs428x_malloc, + .freem = cs428x_free, + .round_buffersize = cs428x_round_buffersize, + .mappage = cs428x_mappage, + .get_props = cs428x_get_props, + .trigger_output = cs4281_trigger_output, + .trigger_input = cs4281_trigger_input, + .get_locks = cs428x_get_locks, }; #if NMIDI > 0 && 0 Index: src/sys/dev/pci/sv.c diff -u src/sys/dev/pci/sv.c:1.53 src/sys/dev/pci/sv.c:1.54 --- src/sys/dev/pci/sv.c:1.53 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/sv.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.53 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: sv.c,v 1.54 2019/03/16 12:09:58 isaki Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.53 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.54 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -168,34 +168,24 @@ void sv_dumpregs(struct sv_softc *sc) #endif static const struct audio_hw_if sv_hw_if = { - sv_open, - NULL, /* close */ - NULL, - sv_query_encoding, - sv_set_params, - sv_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - sv_halt_output, - sv_halt_input, - NULL, - sv_getdev, - NULL, - sv_mixer_set_port, - sv_mixer_get_port, - sv_query_devinfo, - sv_malloc, - sv_free, - sv_round_buffersize, - sv_mappage, - sv_get_props, - sv_trigger_output, - sv_trigger_input, - NULL, - sv_get_locks, + .open = sv_open, + .query_encoding = sv_query_encoding, + .set_params = sv_set_params, + .round_blocksize = sv_round_blocksize, + .halt_output = sv_halt_output, + .halt_input = sv_halt_input, + .getdev = sv_getdev, + .set_port = sv_mixer_set_port, + .get_port = sv_mixer_get_port, + .query_devinfo = sv_query_devinfo, + .allocm = sv_malloc, + .freem = sv_free, + .round_buffersize = sv_round_buffersize, + .mappage = sv_mappage, + .get_props = sv_get_props, + .trigger_output = sv_trigger_output, + .trigger_input = sv_trigger_input, + .get_locks = sv_get_locks, }; #define SV_NFORMATS 4 Index: src/sys/dev/pci/eap.c diff -u src/sys/dev/pci/eap.c:1.98 src/sys/dev/pci/eap.c:1.99 --- src/sys/dev/pci/eap.c:1.98 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/eap.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: eap.c,v 1.98 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: eap.c,v 1.99 2019/03/16 12:09:58 isaki Exp $ */ /* $OpenBSD: eap.c,v 1.6 1999/10/05 19:24:42 csapuntz Exp $ */ /* @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.98 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.99 2019/03/16 12:09:58 isaki Exp $"); #include "midi.h" #include "joy_eap.h" @@ -159,65 +159,45 @@ static void eap_uart_txrdy(struct eap_so #endif static const struct audio_hw_if eap1370_hw_if = { - eap_open, - NULL, /* close */ - NULL, - eap_query_encoding, - eap_set_params, - eap_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - eap_halt_output, - eap_halt_input, - NULL, - eap_getdev, - NULL, - eap1370_mixer_set_port, - eap1370_mixer_get_port, - eap1370_query_devinfo, - eap_malloc, - eap_free, - eap_round_buffersize, - eap_mappage, - eap_get_props, - eap_trigger_output, - eap_trigger_input, - NULL, - eap_get_locks, + .open = eap_open, + .query_encoding = eap_query_encoding, + .set_params = eap_set_params, + .round_blocksize = eap_round_blocksize, + .halt_output = eap_halt_output, + .halt_input = eap_halt_input, + .getdev = eap_getdev, + .set_port = eap1370_mixer_set_port, + .get_port = eap1370_mixer_get_port, + .query_devinfo = eap1370_query_devinfo, + .allocm = eap_malloc, + .freem = eap_free, + .round_buffersize = eap_round_buffersize, + .mappage = eap_mappage, + .get_props = eap_get_props, + .trigger_output = eap_trigger_output, + .trigger_input = eap_trigger_input, + .get_locks = eap_get_locks, }; static const struct audio_hw_if eap1371_hw_if = { - eap_open, - NULL, /* close */ - NULL, - eap_query_encoding, - eap_set_params, - eap_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - eap_halt_output, - eap_halt_input, - NULL, - eap_getdev, - NULL, - eap1371_mixer_set_port, - eap1371_mixer_get_port, - eap1371_query_devinfo, - eap_malloc, - eap_free, - eap_round_buffersize, - eap_mappage, - eap_get_props, - eap_trigger_output, - eap_trigger_input, - NULL, - eap_get_locks, + .open = eap_open, + .query_encoding = eap_query_encoding, + .set_params = eap_set_params, + .round_blocksize = eap_round_blocksize, + .halt_output = eap_halt_output, + .halt_input = eap_halt_input, + .getdev = eap_getdev, + .set_port = eap1371_mixer_set_port, + .get_port = eap1371_mixer_get_port, + .query_devinfo = eap1371_query_devinfo, + .allocm = eap_malloc, + .freem = eap_free, + .round_buffersize = eap_round_buffersize, + .mappage = eap_mappage, + .get_props = eap_get_props, + .trigger_output = eap_trigger_output, + .trigger_input = eap_trigger_input, + .get_locks = eap_get_locks, }; #if NMIDI > 0 Index: src/sys/dev/pci/emuxki.c diff -u src/sys/dev/pci/emuxki.c:1.66 src/sys/dev/pci/emuxki.c:1.67 --- src/sys/dev/pci/emuxki.c:1.66 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/emuxki.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: emuxki.c,v 1.66 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: emuxki.c,v 1.67 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.66 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.67 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -177,34 +177,25 @@ CFATTACH_DECL_NEW(emuxki, sizeof(struct emuxki_match, emuxki_attach, emuxki_detach, NULL); static const struct audio_hw_if emuxki_hw_if = { - emuxki_open, - emuxki_close, - NULL, /* drain */ - emuxki_query_encoding, - emuxki_set_params, - emuxki_round_blocksize, - NULL, /* commit settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - emuxki_halt_output, - emuxki_halt_input, - NULL, /* speaker_ctl */ - emuxki_getdev, - NULL, /* setfd */ - emuxki_set_port, - emuxki_get_port, - emuxki_query_devinfo, - emuxki_allocm, - emuxki_freem, - emuxki_round_buffersize, - emuxki_mappage, - emuxki_get_props, - emuxki_trigger_output, - emuxki_trigger_input, - NULL, /* dev_ioctl */ - emuxki_get_locks, + .open = emuxki_open, + .close = emuxki_close, + .query_encoding = emuxki_query_encoding, + .set_params = emuxki_set_params, + .round_blocksize = emuxki_round_blocksize, + .halt_output = emuxki_halt_output, + .halt_input = emuxki_halt_input, + .getdev = emuxki_getdev, + .set_port = emuxki_set_port, + .get_port = emuxki_get_port, + .query_devinfo = emuxki_query_devinfo, + .allocm = emuxki_allocm, + .freem = emuxki_freem, + .round_buffersize = emuxki_round_buffersize, + .mappage = emuxki_mappage, + .get_props = emuxki_get_props, + .trigger_output = emuxki_trigger_output, + .trigger_input = emuxki_trigger_input, + .get_locks = emuxki_get_locks, }; #if 0 Index: src/sys/dev/pci/esa.c diff -u src/sys/dev/pci/esa.c:1.62 src/sys/dev/pci/esa.c:1.63 --- src/sys/dev/pci/esa.c:1.62 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/esa.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: esa.c,v 1.62 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: esa.c,v 1.63 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2001-2008 Jared D. McNeill <jmcne...@invisible.ca> @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.62 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.63 2019/03/16 12:09:58 isaki Exp $"); #include <sys/types.h> #include <sys/errno.h> @@ -196,34 +196,24 @@ static const struct audio_format esa_for }; static const struct audio_hw_if esa_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - esa_query_encoding, - esa_set_params, - esa_round_blocksize, - esa_commit_settings, - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - esa_halt_output, - esa_halt_input, - NULL, /* speaker_ctl */ - esa_getdev, - NULL, /* getfd */ - esa_set_port, - esa_get_port, - esa_query_devinfo, - esa_malloc, - esa_free, - esa_round_buffersize, - esa_mappage, - esa_get_props, - esa_trigger_output, - esa_trigger_input, - NULL, /* dev_ioctl */ - esa_get_locks, + .query_encoding = esa_query_encoding, + .set_params = esa_set_params, + .round_blocksize = esa_round_blocksize, + .commit_settings = esa_commit_settings, + .halt_output = esa_halt_output, + .halt_input = esa_halt_input, + .getdev = esa_getdev, + .set_port = esa_set_port, + .get_port = esa_get_port, + .query_devinfo = esa_query_devinfo, + .allocm = esa_malloc, + .freem = esa_free, + .round_buffersize = esa_round_buffersize, + .mappage = esa_mappage, + .get_props = esa_get_props, + .trigger_output = esa_trigger_output, + .trigger_input = esa_trigger_input, + .get_locks = esa_get_locks, }; CFATTACH_DECL2_NEW(esa, sizeof(struct esa_softc), esa_match, esa_attach, Index: src/sys/dev/pci/esm.c diff -u src/sys/dev/pci/esm.c:1.60 src/sys/dev/pci/esm.c:1.61 --- src/sys/dev/pci/esm.c:1.60 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/esm.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: esm.c,v 1.60 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: esm.c,v 1.61 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2002, 2003 Matt Fredette @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.60 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.61 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -160,34 +160,25 @@ CFATTACH_DECL2_NEW(esm, sizeof(struct es esm_match, esm_attach, esm_detach, NULL, NULL, esm_childdet); const struct audio_hw_if esm_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - esm_query_encoding, - esm_set_params, - esm_round_blocksize, - NULL, /* commit_settings */ - esm_init_output, - esm_init_input, - NULL, /* start_output */ - NULL, /* start_input */ - esm_halt_output, - esm_halt_input, - NULL, /* speaker_ctl */ - esm_getdev, - NULL, /* getfd */ - esm_set_port, - esm_get_port, - esm_query_devinfo, - esm_malloc, - esm_free, - esm_round_buffersize, - esm_mappage, - esm_get_props, - esm_trigger_output, - esm_trigger_input, - NULL, - esm_get_locks, + .query_encoding = esm_query_encoding, + .set_params = esm_set_params, + .round_blocksize = esm_round_blocksize, + .init_output = esm_init_output, + .init_input = esm_init_input, + .halt_output = esm_halt_output, + .halt_input = esm_halt_input, + .getdev = esm_getdev, + .set_port = esm_set_port, + .get_port = esm_get_port, + .query_devinfo = esm_query_devinfo, + .allocm = esm_malloc, + .freem = esm_free, + .round_buffersize = esm_round_buffersize, + .mappage = esm_mappage, + .get_props = esm_get_props, + .trigger_output = esm_trigger_output, + .trigger_input = esm_trigger_input, + .get_locks = esm_get_locks, }; struct audio_device esm_device = { Index: src/sys/dev/pci/eso.c diff -u src/sys/dev/pci/eso.c:1.68 src/sys/dev/pci/eso.c:1.69 --- src/sys/dev/pci/eso.c:1.68 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/eso.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: eso.c,v 1.68 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: eso.c,v 1.69 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.68 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.69 2019/03/16 12:09:58 isaki Exp $"); #include "mpu.h" @@ -154,34 +154,23 @@ static int eso_trigger_input(void *, voi static void eso_get_locks(void *, kmutex_t **, kmutex_t **); static const struct audio_hw_if eso_hw_if = { - NULL, /* open */ - NULL, /* close */ - NULL, /* drain */ - eso_query_encoding, - eso_set_params, - eso_round_blocksize, - NULL, /* commit_settings */ - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - eso_halt_output, - eso_halt_input, - NULL, /* speaker_ctl */ - eso_getdev, - NULL, /* setfd */ - eso_set_port, - eso_get_port, - eso_query_devinfo, - eso_allocm, - eso_freem, - eso_round_buffersize, - eso_mappage, - eso_get_props, - eso_trigger_output, - eso_trigger_input, - NULL, /* dev_ioctl */ - eso_get_locks, + .query_encoding = eso_query_encoding, + .set_params = eso_set_params, + .round_blocksize = eso_round_blocksize, + .halt_output = eso_halt_output, + .halt_input = eso_halt_input, + .getdev = eso_getdev, + .set_port = eso_set_port, + .get_port = eso_get_port, + .query_devinfo = eso_query_devinfo, + .allocm = eso_allocm, + .freem = eso_freem, + .round_buffersize = eso_round_buffersize, + .mappage = eso_mappage, + .get_props = eso_get_props, + .trigger_output = eso_trigger_output, + .trigger_input = eso_trigger_input, + .get_locks = eso_get_locks, }; static const char * const eso_rev2model[] = { Index: src/sys/dev/sbus/cs4231_sbus.c diff -u src/sys/dev/sbus/cs4231_sbus.c:1.50 src/sys/dev/sbus/cs4231_sbus.c:1.51 --- src/sys/dev/sbus/cs4231_sbus.c:1.50 Tue May 2 08:11:16 2017 +++ src/sys/dev/sbus/cs4231_sbus.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4231_sbus.c,v 1.50 2017/05/02 08:11:16 martin Exp $ */ +/* $NetBSD: cs4231_sbus.c,v 1.51 2019/03/16 12:09:58 isaki Exp $ */ /*- * Copyright (c) 1998, 1999, 2002, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.50 2017/05/02 08:11:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.51 2019/03/16 12:09:58 isaki Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -97,34 +97,23 @@ static int cs4231_sbus_halt_output(void static int cs4231_sbus_halt_input(void *); const struct audio_hw_if audiocs_sbus_hw_if = { - cs4231_open, - cs4231_close, - NULL, /* drain */ - ad1848_query_encoding, - ad1848_set_params, - NULL, /* round_blocksize */ - ad1848_commit_settings, - NULL, /* init_output */ - NULL, /* init_input */ - NULL, /* start_output */ - NULL, /* start_input */ - cs4231_sbus_halt_output, - cs4231_sbus_halt_input, - NULL, /* speaker_ctl */ - cs4231_getdev, - NULL, /* setfd */ - cs4231_set_port, - cs4231_get_port, - cs4231_query_devinfo, - cs4231_malloc, - cs4231_free, - NULL, /* round_buffersize */ - NULL, /* mappage */ - cs4231_get_props, - cs4231_sbus_trigger_output, - cs4231_sbus_trigger_input, - NULL, /* dev_ioctl */ - ad1848_get_locks, + .open = cs4231_open, + .close = cs4231_close, + .query_encoding = ad1848_query_encoding, + .set_params = ad1848_set_params, + .commit_settings = ad1848_commit_settings, + .halt_output = cs4231_sbus_halt_output, + .halt_input = cs4231_sbus_halt_input, + .getdev = cs4231_getdev, + .set_port = cs4231_set_port, + .get_port = cs4231_get_port, + .query_devinfo = cs4231_query_devinfo, + .allocm = cs4231_malloc, + .freem = cs4231_free, + .get_props = cs4231_get_props, + .trigger_output = cs4231_sbus_trigger_output, + .trigger_input = cs4231_sbus_trigger_input, + .get_locks = ad1848_get_locks, }; Index: src/sys/dev/tc/bba.c diff -u src/sys/dev/tc/bba.c:1.41 src/sys/dev/tc/bba.c:1.42 --- src/sys/dev/tc/bba.c:1.41 Mon Sep 3 16:29:33 2018 +++ src/sys/dev/tc/bba.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bba.c,v 1.41 2018/09/03 16:29:33 riastradh Exp $ */ +/* $NetBSD: bba.c,v 1.42 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ /* maxine/alpha baseboard audio (bba) */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.41 2018/09/03 16:29:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.42 2019/03/16 12:09:58 isaki Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -151,34 +151,26 @@ static void bba_get_locks(void *opaque, kmutex_t **thread); static const struct audio_hw_if sa_hw_if = { - am7930_open, - am7930_close, - 0, - am7930_query_encoding, - am7930_set_params, - bba_round_blocksize, /* md */ - am7930_commit_settings, - 0, - 0, - 0, - 0, - bba_halt_output, /* md */ - bba_halt_input, /* md */ - 0, - bba_getdev, - 0, - am7930_set_port, - am7930_get_port, - am7930_query_devinfo, - bba_allocm, /* md */ - bba_freem, /* md */ - bba_round_buffersize, /* md */ - bba_mappage, - bba_get_props, - bba_trigger_output, /* md */ - bba_trigger_input, /* md */ - 0, - bba_get_locks, + .open = am7930_open, + .close = am7930_close, + .query_encoding = am7930_query_encoding, + .set_params = am7930_set_params, + .round_blocksize = bba_round_blocksize, /* md */ + .commit_settings = am7930_commit_settings, + .halt_output = bba_halt_output, /* md */ + .halt_input = bba_halt_input, /* md */ + .getdev = bba_getdev, + .set_port = am7930_set_port, + .get_port = am7930_get_port, + .query_devinfo = am7930_query_devinfo, + .allocm = bba_allocm, /* md */ + .freem = bba_freem, /* md */ + .round_buffersize = bba_round_buffersize, /* md */ + .mappage = bba_mappage, + .get_props = bba_get_props, + .trigger_output = bba_trigger_output, /* md */ + .trigger_input = bba_trigger_input, /* md */ + .get_locks = bba_get_locks, }; static struct audio_device bba_device = { Index: src/sys/dev/usb/uaudio.c diff -u src/sys/dev/usb/uaudio.c:1.157 src/sys/dev/usb/uaudio.c:1.158 --- src/sys/dev/usb/uaudio.c:1.157 Mon Sep 3 16:29:34 2018 +++ src/sys/dev/usb/uaudio.c Sat Mar 16 12:09:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.157 2018/09/03 16:29:34 riastradh Exp $ */ +/* $NetBSD: uaudio.c,v 1.158 2019/03/16 12:09:58 isaki Exp $ */ /* * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.157 2018/09/03 16:29:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.158 2019/03/16 12:09:58 isaki Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -357,34 +357,22 @@ Static int uaudio_get_props(void *); Static void uaudio_get_locks(void *, kmutex_t **, kmutex_t **); Static const struct audio_hw_if uaudio_hw_if = { - uaudio_open, - uaudio_close, - uaudio_drain, - uaudio_query_encoding, - uaudio_set_params, - uaudio_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - uaudio_halt_out_dma, - uaudio_halt_in_dma, - NULL, - uaudio_getdev, - NULL, - uaudio_mixer_set_port, - uaudio_mixer_get_port, - uaudio_query_devinfo, - NULL, - NULL, - NULL, - NULL, - uaudio_get_props, - uaudio_trigger_output, - uaudio_trigger_input, - NULL, - uaudio_get_locks, + .open = uaudio_open, + .close = uaudio_close, + .drain = uaudio_drain, + .query_encoding = uaudio_query_encoding, + .set_params = uaudio_set_params, + .round_blocksize = uaudio_round_blocksize, + .halt_output = uaudio_halt_out_dma, + .halt_input = uaudio_halt_in_dma, + .getdev = uaudio_getdev, + .set_port = uaudio_mixer_set_port, + .get_port = uaudio_mixer_get_port, + .query_devinfo = uaudio_query_devinfo, + .get_props = uaudio_get_props, + .trigger_output = uaudio_trigger_output, + .trigger_input = uaudio_trigger_input, + .get_locks = uaudio_get_locks, }; int uaudio_match(device_t, cfdata_t, void *);