Use C99 struct init for struct audio_hw_if
authorkn <kn@openbsd.org>
Wed, 19 Oct 2022 19:14:16 +0000 (19:14 +0000)
committerkn <kn@openbsd.org>
Wed, 19 Oct 2022 19:14:16 +0000 (19:14 +0000)
This audio(9) struct will lose a member, but drivers init their struct quite
inconsistently, most pre-C99 style.

Use C99 style everywhere, to get rid of all annoying differences and allow
for easy member removals/additions:
- don't change current order of members
- no explicit NULL members
- no comments or blank lines
- trailing comma in last member line

GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.

macppc and alpha build-tested by miod
OK ratchov miod

37 files changed:
sys/arch/hppa/gsc/harmony.c
sys/arch/luna88k/cbus/nec86.c
sys/arch/macppc/dev/aoa.c
sys/arch/macppc/dev/awacs.c
sys/arch/macppc/dev/daca.c
sys/arch/macppc/dev/onyx.c
sys/arch/macppc/dev/snapper.c
sys/arch/macppc/dev/tumbler.c
sys/arch/sparc64/dev/ce4231.c
sys/dev/isa/ess.c
sys/dev/isa/gus.c
sys/dev/isa/pas.c
sys/dev/isa/sb.c
sys/dev/pci/auacer.c
sys/dev/pci/auglx.c
sys/dev/pci/auich.c
sys/dev/pci/auixp.c
sys/dev/pci/autri.c
sys/dev/pci/auvia.c
sys/dev/pci/azalia.c
sys/dev/pci/cmpci.c
sys/dev/pci/cs4280.c
sys/dev/pci/cs4281.c
sys/dev/pci/eap.c
sys/dev/pci/emuxki.c
sys/dev/pci/envy.c
sys/dev/pci/esa.c
sys/dev/pci/eso.c
sys/dev/pci/fms.c
sys/dev/pci/maestro.c
sys/dev/pci/neo.c
sys/dev/pci/sv.c
sys/dev/pci/yds.c
sys/dev/sbus/cs4231.c
sys/dev/tc/bba.c
sys/dev/usb/uaudio.c
sys/dev/usb/utvfu.c

index ade991c..fea73b0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: harmony.c,v 1.38 2022/03/21 19:22:39 miod Exp $       */
+/*     $OpenBSD: harmony.c,v 1.39 2022/10/19 19:14:16 kn Exp $ */
 
 /*
  * Copyright (c) 2003 Jason L. Wright (jason@thought.net)
@@ -74,28 +74,22 @@ int     harmony_trigger_input(void *, void *, void *, int,
     void (*intr)(void *), void *, struct audio_params *);
 
 const struct audio_hw_if harmony_sa_hw_if = {
-       harmony_open,
-       harmony_close,
-       harmony_set_params,
-       harmony_round_blocksize,
-       harmony_commit_settings,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       harmony_halt_output,
-       harmony_halt_input,
-       NULL,
-       NULL,
-       harmony_set_port,
-       harmony_get_port,
-       harmony_query_devinfo,
-       harmony_allocm,
-       harmony_freem,
-       harmony_round_buffersize,
-       harmony_get_props,
-       harmony_trigger_output,
-       harmony_trigger_input
+       .open = harmony_open,
+       .close = harmony_close,
+       .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,
+       .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,
 };
 
 int harmony_match(struct device *, void *, void *);
index 4eb61f1..b745ad8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: nec86.c,v 1.6 2022/10/19 15:34:02 kn Exp $    */
+/*     $OpenBSD: nec86.c,v 1.7 2022/10/19 19:14:16 kn Exp $    */
 /*     $NecBSD: nec86.c,v 1.11 1999/07/23 11:04:39 honda Exp $ */
 /*     $NetBSD$        */
 
@@ -83,12 +83,7 @@ const struct audio_hw_if nec86_hw_if = {
        .set_port       = nec86hw_mixer_set_port,
        .get_port       = nec86hw_mixer_get_port,
        .query_devinfo  = nec86hw_mixer_query_devinfo,
-       .allocm         = NULL,
-       .freem          = NULL,
-       .round_buffersize       = NULL,
        .get_props      = nec86_get_props,
-       .trigger_output = NULL,
-       .trigger_input  = NULL
 };
 
 /*
index f637287..30e7b4a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: aoa.c,v 1.14 2022/03/21 19:22:39 miod Exp $   */
+/*     $OpenBSD: aoa.c,v 1.15 2022/10/19 19:14:16 kn Exp $     */
 
 /*-
  * Copyright (c) 2005 Tsubai Masanari.  All rights reserved.
@@ -66,28 +66,20 @@ struct cfdriver aoa_cd = {
 };
 
 const struct audio_hw_if aoa_hw_if = {
-       i2s_open,
-       i2s_close,
-       i2s_set_params,
-       i2s_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       i2s_halt_output,
-       i2s_halt_input,
-       NULL,
-       NULL,
-       i2s_set_port,
-       i2s_get_port,
-       i2s_query_devinfo,
-       i2s_allocm,
-       NULL,
-       i2s_round_buffersize,
-       i2s_get_props,
-       i2s_trigger_output,
-       i2s_trigger_input
+       .open = i2s_open,
+       .close = i2s_close,
+       .set_params = i2s_set_params,
+       .round_blocksize = i2s_round_blocksize,
+       .halt_output = i2s_halt_output,
+       .halt_input = i2s_halt_input,
+       .set_port = i2s_set_port,
+       .get_port = i2s_get_port,
+       .query_devinfo = i2s_query_devinfo,
+       .allocm = i2s_allocm,
+       .round_buffersize = i2s_round_buffersize,
+       .get_props = i2s_get_props,
+       .trigger_output = i2s_trigger_output,
+       .trigger_input = i2s_trigger_input,
 };
 
 int
index 0327213..c6e0623 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: awacs.c,v 1.38 2022/10/18 08:22:18 kn Exp $   */
+/*     $OpenBSD: awacs.c,v 1.39 2022/10/19 19:14:16 kn Exp $   */
 /*     $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $    */
 
 /*-
@@ -127,28 +127,20 @@ struct cfdriver awacs_cd = {
 };
 
 const struct audio_hw_if awacs_hw_if = {
-       awacs_open,
-       awacs_close,
-       awacs_set_params,
-       awacs_round_blocksize,
-       NULL,                   /* commit_setting */
-       NULL,                   /* init_output */
-       NULL,                   /* init_input */
-       NULL,                   /* start_output */
-       NULL,                   /* start_input */
-       awacs_halt_output,
-       awacs_halt_input,
-       NULL,                   /* speaker_ctl */
-       NULL,                   /* getfd */
-       awacs_set_port,
-       awacs_get_port,
-       awacs_query_devinfo,
-       awacs_allocm,           /* allocm */
-       NULL,                   /* freem */
-       awacs_round_buffersize, /* round_buffersize */
-       awacs_get_props,
-       awacs_trigger_output,
-       awacs_trigger_input
+       .open = awacs_open,
+       .close = awacs_close,
+       .set_params = awacs_set_params,
+       .round_blocksize = awacs_round_blocksize,
+       .halt_output = awacs_halt_output,
+       .halt_input = awacs_halt_input,
+       .set_port = awacs_set_port,
+       .get_port = awacs_get_port,
+       .query_devinfo = awacs_query_devinfo,
+       .allocm = awacs_allocm,
+       .round_buffersize = awacs_round_buffersize,
+       .get_props = awacs_get_props,
+       .trigger_output = awacs_trigger_output,
+       .trigger_input = awacs_trigger_input,
 };
 
 /* register offset */
index 178b1da..f776843 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: daca.c,v 1.13 2022/03/21 19:22:39 miod Exp $  */
+/*     $OpenBSD: daca.c,v 1.14 2022/10/19 19:14:16 kn Exp $    */
 
 /*-
  * Copyright (c) 2002,2003 Tsubai Masanari.  All rights reserved.
@@ -72,28 +72,20 @@ struct cfdriver daca_cd = {
 };
 
 const struct audio_hw_if daca_hw_if = {
-       i2s_open,
-       i2s_close,
-       i2s_set_params,
-       i2s_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       i2s_halt_output,
-       i2s_halt_input,
-       NULL,
-       NULL,
-       i2s_set_port,
-       i2s_get_port,
-       i2s_query_devinfo,
-       i2s_allocm,             /* allocm */
-       NULL,
-       i2s_round_buffersize,
-       i2s_get_props,
-       i2s_trigger_output,
-       i2s_trigger_input
+       .open = i2s_open,
+       .close = i2s_close,
+       .set_params = i2s_set_params,
+       .round_blocksize = i2s_round_blocksize,
+       .halt_output = i2s_halt_output,
+       .halt_input = i2s_halt_input,
+       .set_port = i2s_set_port,
+       .get_port = i2s_get_port,
+       .query_devinfo = i2s_query_devinfo,
+       .allocm = i2s_allocm,
+       .round_buffersize = i2s_round_buffersize,
+       .get_props = i2s_get_props,
+       .trigger_output = i2s_trigger_output,
+       .trigger_input = i2s_trigger_input,
 };
 
 /* DAC3550A registers */
index 989ed3d..7ed4aae 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: onyx.c,v 1.15 2022/03/21 19:22:39 miod Exp $  */
+/*     $OpenBSD: onyx.c,v 1.16 2022/10/19 19:14:16 kn Exp $    */
 
 /*-
  * Copyright (c) 2005 Tsubai Masanari.  All rights reserved.
@@ -81,28 +81,20 @@ struct cfdriver onyx_cd = {
 };
 
 const struct audio_hw_if onyx_hw_if = {
-       i2s_open,
-       i2s_close,
-       i2s_set_params,
-       i2s_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       i2s_halt_output,
-       i2s_halt_input,
-       NULL,
-       NULL,
-       i2s_set_port,
-       i2s_get_port,
-       i2s_query_devinfo,
-       i2s_allocm,
-       NULL,
-       i2s_round_buffersize,
-       i2s_get_props,
-       i2s_trigger_output,
-       i2s_trigger_input
+       .open = i2s_open,
+       .close = i2s_close,
+       .set_params = i2s_set_params,
+       .round_blocksize = i2s_round_blocksize,
+       .halt_output =i2s_halt_output,
+       .halt_input = i2s_halt_input,
+       .set_port = i2s_set_port,
+       .get_port = i2s_get_port,
+       .query_devinfo = i2s_query_devinfo,
+       .allocm = i2s_allocm,
+       .round_buffersize = i2s_round_buffersize,
+       .get_props = i2s_get_props,
+       .trigger_output = i2s_trigger_output,
+       .trigger_input = i2s_trigger_input,
 };
 
 int
index e4ce407..56f21b0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: snapper.c,v 1.42 2022/03/21 19:22:39 miod Exp $       */
+/*     $OpenBSD: snapper.c,v 1.43 2022/10/19 19:14:16 kn Exp $ */
 /*     $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $        */
 
 /*-
@@ -78,28 +78,20 @@ struct cfdriver snapper_cd = {
 };
 
 const struct audio_hw_if snapper_hw_if = {
-       i2s_open,
-       i2s_close,
-       i2s_set_params,
-       i2s_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       i2s_halt_output,
-       i2s_halt_input,
-       NULL,
-       NULL,
-       i2s_set_port,
-       i2s_get_port,
-       i2s_query_devinfo,
-       i2s_allocm,             /* allocm */
-       NULL,
-       i2s_round_buffersize,
-       i2s_get_props,
-       i2s_trigger_output,
-       i2s_trigger_input
+       .open = i2s_open,
+       .close = i2s_close,
+       .set_params = i2s_set_params,
+       .round_blocksize = i2s_round_blocksize,
+       .halt_output = i2s_halt_output,
+       .halt_input = i2s_halt_input,
+       .set_port = i2s_set_port,
+       .get_port = i2s_get_port,
+       .query_devinfo = i2s_query_devinfo,
+       .allocm = i2s_allocm,
+       .round_buffersize = i2s_round_buffersize,
+       .get_props = i2s_get_props,
+       .trigger_output = i2s_trigger_output,
+       .trigger_input = i2s_trigger_input,
 };
 
 const uint8_t snapper_trebletab[] = {
index fbc343b..0b89e03 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: tumbler.c,v 1.12 2022/03/21 19:22:39 miod Exp $       */
+/*     $OpenBSD: tumbler.c,v 1.13 2022/10/19 19:14:16 kn Exp $ */
 
 /*-
  * Copyright (c) 2001,2003 Tsubai Masanari.  All rights reserved.
@@ -76,28 +76,20 @@ struct cfdriver tumbler_cd = {
 };
 
 const struct audio_hw_if tumbler_hw_if = {
-       i2s_open,
-       i2s_close,
-       i2s_set_params,
-       i2s_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       i2s_halt_output,
-       i2s_halt_input,
-       NULL,
-       NULL,
-       i2s_set_port,
-       i2s_get_port,
-       i2s_query_devinfo,
-       i2s_allocm,             /* allocm */
-       NULL,
-       i2s_round_buffersize,
-       i2s_get_props,
-       i2s_trigger_output,
-       i2s_trigger_input
+       .open = i2s_open,
+       .close = i2s_close,
+       .set_params = i2s_set_params,
+       .round_blocksize = i2s_round_blocksize,
+       .halt_output = i2s_halt_output,
+       .halt_input = i2s_halt_input,
+       .set_port = i2s_set_port,
+       .get_port = i2s_get_port,
+       .query_devinfo = i2s_query_devinfo,
+       .allocm = i2s_allocm,
+       .round_buffersize = i2s_round_buffersize,
+       .get_props = i2s_get_props,
+       .trigger_output = i2s_trigger_output,
+       .trigger_input = i2s_trigger_input,
 };
 
 const uint8_t tumbler_trebletab[] = {
index edd74d3..b4425d8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ce4231.c,v 1.39 2022/03/21 19:22:39 miod Exp $        */
+/*     $OpenBSD: ce4231.c,v 1.40 2022/10/19 19:14:16 kn Exp $  */
 
 /*
  * Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -151,28 +151,21 @@ int       ce4231_trigger_input(void *, void *, void *, int,
     void (*intr)(void *), void *arg, struct audio_params *);
 
 const struct audio_hw_if ce4231_sa_hw_if = {
-       ce4231_open,
-       ce4231_close,
-       ce4231_set_params,
-       ce4231_round_blocksize,
-       ce4231_commit_settings,
-       0,
-       0,
-       0,
-       0,
-       ce4231_halt_output,
-       ce4231_halt_input,
-       0,
-       0,
-       ce4231_set_port,
-       ce4231_get_port,
-       ce4231_query_devinfo,
-       ce4231_alloc,
-       ce4231_free,
-       0,
-       ce4231_get_props,
-       ce4231_trigger_output,
-       ce4231_trigger_input
+       .open = ce4231_open,
+       .close = ce4231_close,
+       .set_params = ce4231_set_params,
+       .round_blocksize = ce4231_round_blocksize,
+       .commit_settings = ce4231_commit_settings,
+       .halt_output = ce4231_halt_output,
+       .halt_input = ce4231_halt_input,
+       .set_port = ce4231_set_port,
+       .get_port = ce4231_get_port,
+       .query_devinfo = ce4231_query_devinfo,
+       .allocm = ce4231_alloc,
+       .freem = ce4231_free,
+       .get_props = ce4231_get_props,
+       .trigger_output = ce4231_trigger_output,
+       .trigger_input = ce4231_trigger_input,
 };
 
 const struct cfattach audioce_ca = {
index 1bdc170..8989dd9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ess.c,v 1.30 2022/10/19 07:57:49 kn Exp $     */
+/*     $OpenBSD: ess.c,v 1.31 2022/10/19 19:14:16 kn Exp $     */
 /*     $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $     */
 
 /*
@@ -198,53 +198,41 @@ static const char *essmodel[] = {
  */
 
 const struct audio_hw_if ess_1788_hw_if = {
-       ess_open,
-       ess_1788_close,
-       ess_set_params,
-       ess_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       ess_audio1_halt,
-       ess_audio1_halt,
-       ess_speaker_ctl,
-       NULL,
-       ess_set_port,
-       ess_get_port,
-       ess_query_devinfo,
-       ess_malloc,
-       ess_free,
-       ess_round_buffersize,
-       ess_1788_get_props,
-       ess_audio1_trigger_output,
-       ess_audio1_trigger_input
+       .open = ess_open,
+       .close = ess_1788_close,
+       .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,
+       .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,
+       .get_props = ess_1788_get_props,
+       .trigger_output = ess_audio1_trigger_output,
+       .trigger_input = ess_audio1_trigger_input,
 };
 
 const struct audio_hw_if ess_1888_hw_if = {
-       ess_open,
-       ess_1888_close,
-       ess_set_params,
-       ess_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       ess_audio2_halt,
-       ess_audio1_halt,
-       ess_speaker_ctl,
-       NULL,
-       ess_set_port,
-       ess_get_port,
-       ess_query_devinfo,
-       ess_malloc,
-       ess_free,
-       ess_round_buffersize,
-       ess_1888_get_props,
-       ess_audio2_trigger_output,
-       ess_audio1_trigger_input
+       .open = ess_open,
+       .close = ess_1888_close,
+       .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,
+       .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,
+       .get_props = ess_1888_get_props,
+       .trigger_output = ess_audio2_trigger_output,
+       .trigger_input = ess_audio1_trigger_input,
 };
 
 #ifdef AUDIO_DEBUG
index 091491c..45fe009 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: gus.c,v 1.52 2022/10/18 08:22:18 kn Exp $     */
+/*     $OpenBSD: gus.c,v 1.53 2022/10/19 19:14:16 kn Exp $     */
 /*     $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
 
 /*-
@@ -261,66 +261,43 @@ static const unsigned short gus_log_volumes[512] = {
  * Interface to higher level audio driver
  */
 const struct audio_hw_if gus_hw_if = {
-       gusopen,
-       gusclose,
-       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,
-
-       NULL,
-       gus_mixer_set_port,
-       gus_mixer_get_port,
-       gus_mixer_query_devinfo,
-       gus_malloc,
-       gus_free,
-       gus_round,
-       gus_get_props,
-
-       NULL,
-       NULL
+       .open = gusopen,
+       .close = gusclose,
+       .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,
+       .set_port = gus_mixer_set_port,
+       .get_port = gus_mixer_get_port,
+       .query_devinfo = gus_mixer_query_devinfo,
+       .allocm = gus_malloc,
+       .freem = gus_free,
+       .round_buffersize = gus_round,
+       .get_props = gus_get_props,
 };
 
 static const struct audio_hw_if gusmax_hw_if = {
-       gusmaxopen,
-       gusmax_close,
-       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,
-
-       NULL,
-       gusmax_mixer_set_port,
-       gusmax_mixer_get_port,
-       gusmax_mixer_query_devinfo,
-       ad1848_malloc,
-       ad1848_free,
-       ad1848_round,
-       gusmax_get_props,
-
-       NULL,
-       NULL
+       .open = gusmaxopen,
+       .close = gusmax_close,
+       .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,
+       .set_port = gusmax_mixer_set_port,
+       .get_port = gusmax_mixer_get_port,
+       .query_devinfo = gusmax_mixer_query_devinfo,
+       .allocm = ad1848_malloc,
+       .freem = ad1848_free,
+       .round_buffersize = ad1848_round,
+       .get_props = gusmax_get_props,
 };
 
 int
index 677a266..2204b1b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pas.c,v 1.34 2022/10/19 07:57:49 kn Exp $     */
+/*     $OpenBSD: pas.c,v 1.35 2022/10/19 19:14:16 kn Exp $     */
 /*     $NetBSD: pas.c,v 1.37 1998/01/12 09:43:43 thorpej Exp $ */
 
 /*
@@ -109,28 +109,22 @@ void      pasconf(int, int, int, int);
  */
 
 const struct audio_hw_if pas_hw_if = {
-       sbdsp_open,
-       sbdsp_close,
-       sbdsp_set_params,
-       sbdsp_round_blocksize,
-       0,
-       0,
-       0,
-       0,
-       0,
-       sbdsp_haltdma,
-       sbdsp_haltdma,
-       sbdsp_speaker_ctl,
-       0,
-       sbdsp_mixer_set_port,
-       sbdsp_mixer_get_port,
-       sbdsp_mixer_query_devinfo,
-       sb_malloc,
-       sb_free,
-       sb_round,
-       sbdsp_get_props,
-       sbdsp_trigger_output,
-       sbdsp_trigger_input
+       .open = sbdsp_open,
+       .close = sbdsp_close,
+       .set_params = sbdsp_set_params,
+       .round_blocksize = sbdsp_round_blocksize,
+       .halt_output = sbdsp_haltdma,
+       .halt_input = sbdsp_haltdma,
+       .speaker_ctl = sbdsp_speaker_ctl,
+       .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,
+       .get_props = sbdsp_get_props,
+       .trigger_output = sbdsp_trigger_output,
+       .trigger_input = sbdsp_trigger_input,
 };
 
 /* The Address Translation code is used to convert I/O register addresses to
index 7577926..bf2bb45 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sb.c,v 1.32 2022/03/21 19:22:40 miod Exp $    */
+/*     $OpenBSD: sb.c,v 1.33 2022/10/19 19:14:16 kn Exp $      */
 /*     $NetBSD: sb.c,v 1.57 1998/01/12 09:43:46 thorpej Exp $  */
 
 /*
@@ -94,28 +94,22 @@ const struct midi_hw_if sb_mpu401_hw_if = {
  */
 
 const struct audio_hw_if sb_hw_if = {
-       sbdsp_open,
-       sbdsp_close,
-       sbdsp_set_params,
-       sbdsp_round_blocksize,
-       0,
-       0,
-       0,
-       0,
-       0,
-       sbdsp_haltdma,
-       sbdsp_haltdma,
-       sbdsp_speaker_ctl,
-       0,
-       sbdsp_mixer_set_port,
-       sbdsp_mixer_get_port,
-       sbdsp_mixer_query_devinfo,
-       sb_malloc,
-       sb_free,
-       sb_round,
-       sbdsp_get_props,
-       sbdsp_trigger_output,
-       sbdsp_trigger_input
+       .open = sbdsp_open,
+       .close = sbdsp_close,
+       .set_params = sbdsp_set_params,
+       .round_blocksize = sbdsp_round_blocksize,
+       .halt_output = sbdsp_haltdma,
+       .halt_input = sbdsp_haltdma,
+       .speaker_ctl = sbdsp_speaker_ctl,
+       .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,
+       .get_props = sbdsp_get_props,
+       .trigger_output = sbdsp_trigger_output,
+       .trigger_input = sbdsp_trigger_input,
 };
 
 #ifdef AUDIO_DEBUG
index ea4e821..bfb41fb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: auacer.c,v 1.26 2022/10/18 08:22:18 kn Exp $  */
+/*     $OpenBSD: auacer.c,v 1.27 2022/10/19 19:14:16 kn Exp $  */
 /*     $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $  */
 
 /*-
@@ -180,28 +180,21 @@ void      auacer_finish_attach(struct device *);
 static void auacer_reset(struct auacer_softc *sc);
 
 const struct audio_hw_if auacer_hw_if = {
-       auacer_open,
-       auacer_close,
-       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 */
-       NULL,                   /* getfd */
-       auacer_set_port,
-       auacer_get_port,
-       auacer_query_devinfo,
-       auacer_allocm,
-       auacer_freem,
-       auacer_round_buffersize,
-       auacer_get_props,
-       auacer_trigger_output,
-       auacer_trigger_input
+       .open = auacer_open,
+       .close = auacer_close,
+       .set_params = auacer_set_params,
+       .round_blocksize = auacer_round_blocksize,
+       .halt_output = auacer_halt_output,
+       .halt_input = auacer_halt_input,
+       .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,
+       .get_props = auacer_get_props,
+       .trigger_output = auacer_trigger_output,
+       .trigger_input = auacer_trigger_input,
 };
 
 int    auacer_attach_codec(void *, struct ac97_codec_if *);
index 310ea89..d37871a 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: auglx.c,v 1.21 2022/10/18 08:22:19 kn Exp $  */
+/*      $OpenBSD: auglx.c,v 1.22 2022/10/19 19:14:16 kn Exp $  */
 
 /*
  * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -235,28 +235,21 @@ int auglx_allocmem(struct auglx_softc *, size_t, size_t, struct auglx_dma *);
 void auglx_freemem(struct auglx_softc *, struct auglx_dma *);
 
 const struct audio_hw_if auglx_hw_if = {
-       auglx_open,
-       auglx_close,
-       auglx_set_params,
-       auglx_round_blocksize,
-       NULL,                   /* commit_setting */
-       NULL,                   /* init_output */
-       NULL,                   /* init_input */
-       NULL,                   /* start_output */
-       NULL,                   /* start_input */
-       auglx_halt_output,
-       auglx_halt_input,
-       NULL,                   /* speaker_ctl */
-       NULL,                   /* getfd */
-       auglx_set_port,
-       auglx_get_port,
-       auglx_query_devinfo,
-       auglx_allocm,
-       auglx_freem,
-       auglx_round_buffersize,
-       auglx_get_props,
-       auglx_trigger_output,
-       auglx_trigger_input
+       .open = auglx_open,
+       .close = auglx_close,
+       .set_params = auglx_set_params,
+       .round_blocksize = auglx_round_blocksize,
+       .halt_output = auglx_halt_output,
+       .halt_input = auglx_halt_input,
+       .set_port = auglx_set_port,
+       .get_port = auglx_get_port,
+       .query_devinfo = auglx_query_devinfo,
+       .allocm = auglx_allocm,
+       .freem = auglx_freem,
+       .round_buffersize = auglx_round_buffersize,
+       .get_props = auglx_get_props,
+       .trigger_output = auglx_trigger_output,
+       .trigger_input = auglx_trigger_input,
 };
 
 int    auglx_match(struct device *, void *, void *);
index 1917394..9258dff 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: auich.c,v 1.117 2022/10/18 08:22:19 kn Exp $  */
+/*     $OpenBSD: auich.c,v 1.118 2022/10/19 19:14:16 kn Exp $  */
 
 /*
  * Copyright (c) 2000,2001 Michael Shalayeff
@@ -316,28 +316,21 @@ void auich_freemem(struct auich_softc *, struct auich_dma *);
 void auich_resume(struct auich_softc *);
 
 const struct audio_hw_if auich_hw_if = {
-       auich_open,
-       auich_close,
-       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 */
-       NULL,                   /* getfd */
-       auich_set_port,
-       auich_get_port,
-       auich_query_devinfo,
-       auich_allocm,
-       auich_freem,
-       auich_round_buffersize,
-       auich_get_props,
-       auich_trigger_output,
-       auich_trigger_input
+       .open = auich_open,
+       .close = auich_close,
+       .set_params = auich_set_params,
+       .round_blocksize = auich_round_blocksize,
+       .halt_output = auich_halt_output,
+       .halt_input = auich_halt_input,
+       .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,
+       .get_props = auich_get_props,
+       .trigger_output = auich_trigger_output,
+       .trigger_input = auich_trigger_input,
 };
 
 int  auich_attach_codec(void *, struct ac97_codec_if *);
index 5120c38..3a5e0fb 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixp.c,v 1.49 2022/10/18 08:22:19 kn Exp $ */
+/* $OpenBSD: auixp.c,v 1.50 2022/10/19 19:14:16 kn Exp $ */
 /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
 
 /*
@@ -155,28 +155,21 @@ void      auixp_update_busbusy(struct auixp_softc *);
 #endif
 
 const struct audio_hw_if auixp_hw_if = {
-       auixp_open,
-       auixp_close,
-       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 */
-       NULL,                   /* getfd */
-       auixp_set_port,
-       auixp_get_port,
-       auixp_query_devinfo,
-       auixp_malloc,
-       auixp_free,
-       NULL,                   /* round_buffersize */
-       auixp_get_props,
-       auixp_trigger_output,
-       auixp_trigger_input
+       .open = auixp_open,
+       .close = auixp_close,
+       .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,
+       .set_port = auixp_set_port,
+       .get_port = auixp_get_port,
+       .query_devinfo = auixp_query_devinfo,
+       .allocm = auixp_malloc,
+       .freem = auixp_free,
+       .get_props = auixp_get_props,
+       .trigger_output = auixp_trigger_output,
+       .trigger_input = auixp_trigger_input,
 };
 
 int
index 6d18e2b..5e026bd 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: autri.c,v 1.48 2022/10/18 08:22:19 kn Exp $   */
+/*     $OpenBSD: autri.c,v 1.49 2022/10/19 19:14:16 kn Exp $   */
 
 /*
  * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -140,28 +140,20 @@ int       autri_query_devinfo(void *addr, mixer_devinfo_t *dip);
 int    autri_get_portnum_by_name(struct autri_softc *, char *, char *, char *);
 
 const struct audio_hw_if autri_hw_if = {
-       autri_open,
-       autri_close,
-       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 */
-       NULL,                   /* setfd */
-       autri_mixer_set_port,
-       autri_mixer_get_port,
-       autri_query_devinfo,
-       autri_malloc,
-       autri_free,
-       NULL,
-       autri_get_props,
-       autri_trigger_output,
-       autri_trigger_input
+       .open = autri_open,
+       .close = autri_close,
+       .set_params = autri_set_params,
+       .round_blocksize = autri_round_blocksize,
+       .halt_output = autri_halt_output,
+       .halt_input = autri_halt_input,
+       .set_port = autri_mixer_set_port,
+       .get_port = autri_mixer_get_port,
+       .query_devinfo = autri_query_devinfo,
+       .allocm = autri_malloc,
+       .freem = autri_free,
+       .get_props = autri_get_props,
+       .trigger_output = autri_trigger_output,
+       .trigger_input = autri_trigger_input,
 };
 
 #if NMIDI > 0
index 71fa838..9033900 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: auvia.c,v 1.64 2022/10/18 08:22:19 kn Exp $ */
+/*     $OpenBSD: auvia.c,v 1.65 2022/10/19 19:14:16 kn Exp $ */
 /*     $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $  */
 
 /*-
@@ -179,28 +179,21 @@ const struct cfattach auvia_ca = {
 #define TIMEOUT        50
 
 const struct audio_hw_if auvia_hw_if = {
-       auvia_open,
-       auvia_close,
-       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 */
-       NULL, /* setfd */
-       auvia_set_port,
-       auvia_get_port,
-       auvia_query_devinfo,
-       auvia_malloc,
-       auvia_free,
-       auvia_round_buffersize,
-       auvia_get_props,
-       auvia_trigger_output,
-       auvia_trigger_input
+       .open = auvia_open,
+       .close = auvia_close,
+       .set_params = auvia_set_params,
+       .round_blocksize = auvia_round_blocksize,
+       .halt_output = auvia_halt_output,
+       .halt_input = auvia_halt_input,
+       .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,
+       .get_props = auvia_get_props,
+       .trigger_output = auvia_trigger_output,
+       .trigger_input = auvia_trigger_input,
 };
 
 int    auvia_attach_codec(void *, struct ac97_codec_if *);
index 7ae0624..328ab32 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: azalia.c,v 1.277 2022/10/18 08:22:19 kn Exp $ */
+/*     $OpenBSD: azalia.c,v 1.278 2022/10/19 19:14:16 kn Exp $ */
 /*     $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
 
 /*-
@@ -290,32 +290,22 @@ struct cfdriver azalia_cd = {
 };
 
 const struct audio_hw_if azalia_hw_if = {
-       azalia_open,
-       azalia_close,
-       azalia_set_params,
-       NULL,                   /* round_blocksize */
-       NULL,                   /* commit_settings */
-       NULL,                   /* init_output */
-       NULL,                   /* init_input */
-       NULL,                   /* start_output */
-       NULL,                   /* start_input */
-       azalia_halt_output,
-       azalia_halt_input,
-       NULL,                   /* speaker_ctl */
-       NULL,                   /* setfd */
-       azalia_set_port,
-       azalia_get_port,
-       azalia_query_devinfo,
-       azalia_allocm,
-       azalia_freem,
-       azalia_round_buffersize,
-       azalia_get_props,
-       azalia_trigger_output,
-       azalia_trigger_input,
-       NULL,                   /* copy_output */
-       NULL,                   /* underrun */
-       azalia_set_blksz,
-       azalia_set_nblks
+       .open = azalia_open,
+       .close = azalia_close,
+       .set_params = azalia_set_params,
+       .halt_output = azalia_halt_output,
+       .halt_input = azalia_halt_input,
+       .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,
+       .set_blksz = azalia_set_blksz,
+       .set_nblks = azalia_set_nblks,
 };
 
 static const char *pin_devices[16] = {
index 241fd82..ff3561c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cmpci.c,v 1.50 2022/10/18 08:22:19 kn Exp $   */
+/*     $OpenBSD: cmpci.c,v 1.51 2022/10/19 19:14:16 kn Exp $   */
 /*     $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $       */
 
 /*
@@ -150,28 +150,21 @@ int cmpci_trigger_input(void *, void *, void *, int,
                                    struct audio_params *);
 
 const struct audio_hw_if cmpci_hw_if = {
-       cmpci_open,             /* open */
-       cmpci_close,            /* close */
-       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 */
-       NULL,                   /* setfd */
-       cmpci_set_port,         /* set_port */
-       cmpci_get_port,         /* get_port */
-       cmpci_query_devinfo,    /* query_devinfo */
-       cmpci_malloc,           /* malloc */
-       cmpci_free,             /* free */
-       cmpci_round_buffersize,/* round_buffersize */
-       cmpci_get_props,        /* get_props */
-       cmpci_trigger_output,   /* trigger_output */
-       cmpci_trigger_input     /* trigger_input */
+       .open = cmpci_open,
+       .close = cmpci_close,
+       .set_params = cmpci_set_params,
+       .round_blocksize = cmpci_round_blocksize,
+       .halt_output = cmpci_halt_output,
+       .halt_input = cmpci_halt_input,
+       .set_port = cmpci_set_port,
+       .get_port = cmpci_get_port,
+       .query_devinfo = cmpci_query_devinfo,
+       .allocm = cmpci_malloc,
+       .freem = cmpci_free,
+       .round_buffersize = cmpci_round_buffersize,
+       .get_props = cmpci_get_props,
+       .trigger_output = cmpci_trigger_output,
+       .trigger_input = cmpci_trigger_input,
 };
 
 /*
index c85f238..1ca4e01 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cs4280.c,v 1.58 2022/10/18 08:22:19 kn Exp $  */
+/*     $OpenBSD: cs4280.c,v 1.59 2022/10/19 19:14:16 kn Exp $  */
 /*     $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $        */
 
 /*
@@ -234,28 +234,20 @@ int       cs4280_midi_output(void *, int);
 #endif
 
 const struct audio_hw_if cs4280_hw_if = {
-       cs4280_open,
-       cs4280_close,
-       cs4280_set_params,
-       cs4280_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       cs4280_halt_output,
-       cs4280_halt_input,
-       NULL,
-       NULL,
-       cs4280_mixer_set_port,
-       cs4280_mixer_get_port,
-       cs4280_query_devinfo,
-       cs4280_malloc,
-       cs4280_free,
-       NULL,
-       cs4280_get_props,
-       cs4280_trigger_output,
-       cs4280_trigger_input
+       .open = cs4280_open,
+       .close = cs4280_close,
+       .set_params = cs4280_set_params,
+       .round_blocksize = cs4280_round_blocksize,
+       .halt_output = cs4280_halt_output,
+       .halt_input = cs4280_halt_input,
+       .set_port = cs4280_mixer_set_port,
+       .get_port = cs4280_mixer_get_port,
+       .query_devinfo = cs4280_query_devinfo,
+       .allocm = cs4280_malloc,
+       .freem = cs4280_free,
+       .get_props = cs4280_get_props,
+       .trigger_output = cs4280_trigger_output,
+       .trigger_input = cs4280_trigger_input,
 };
 
 #if NMIDI > 0
index 9ab76ca..a92c55d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cs4281.c,v 1.43 2022/10/18 08:22:19 kn Exp $ */
+/*     $OpenBSD: cs4281.c,v 1.44 2022/10/19 19:14:16 kn Exp $ */
 /*     $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $  */
 
 /*
@@ -195,28 +195,21 @@ int cs4281_debug = 5;
 #endif
 
 const struct audio_hw_if cs4281_hw_if = {
-       cs4281_open,
-       cs4281_close,
-       cs4281_set_params,
-       cs4281_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       cs4281_halt_output,
-       cs4281_halt_input,
-       NULL,
-       NULL,
-       cs4281_mixer_set_port,
-       cs4281_mixer_get_port,
-       cs4281_query_devinfo,
-       cs4281_malloc,
-       cs4281_free,
-       cs4281_round_buffersize,
-       cs4281_get_props,
-       cs4281_trigger_output,
-       cs4281_trigger_input
+       .open = cs4281_open,
+       .close = cs4281_close,
+       .set_params = cs4281_set_params,
+       .round_blocksize = cs4281_round_blocksize,
+       .halt_output = cs4281_halt_output,
+       .halt_input = cs4281_halt_input,
+       .set_port = cs4281_mixer_set_port,
+       .get_port = cs4281_mixer_get_port,
+       .query_devinfo = cs4281_query_devinfo,
+       .allocm = cs4281_malloc,
+       .freem = cs4281_free,
+       .round_buffersize = cs4281_round_buffersize,
+       .get_props = cs4281_get_props,
+       .trigger_output = cs4281_trigger_output,
+       .trigger_input = cs4281_trigger_input,
 };
 
 #if NMIDI > 0
index 7d3df1c..f1280d0 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: eap.c,v 1.62 2022/10/18 08:22:19 kn Exp $ */
+/*      $OpenBSD: eap.c,v 1.63 2022/10/19 19:14:16 kn Exp $ */
 /*     $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
 
 /*
@@ -195,53 +195,37 @@ int       eap_midi_output(void *, int);
 #endif
 
 const struct audio_hw_if eap1370_hw_if = {
-       eap_open,
-       eap_close,
-       eap_set_params,
-       eap_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       eap_halt_output,
-       eap_halt_input,
-       NULL,
-       NULL,
-       eap1370_mixer_set_port,
-       eap1370_mixer_get_port,
-       eap1370_query_devinfo,
-       eap_malloc,
-       eap_free,
-       NULL,
-       eap_get_props,
-       eap_trigger_output,
-       eap_trigger_input
+       .open = eap_open,
+       .close = eap_close,
+       .set_params = eap_set_params,
+       .round_blocksize = eap_round_blocksize,
+       .halt_output = eap_halt_output,
+       .halt_input = eap_halt_input,
+       .set_port = eap1370_mixer_set_port,
+       .get_port = eap1370_mixer_get_port,
+       .query_devinfo = eap1370_query_devinfo,
+       .allocm = eap_malloc,
+       .freem = eap_free,
+       .get_props = eap_get_props,
+       .trigger_output = eap_trigger_output,
+       .trigger_input = eap_trigger_input,
 };
 
 const struct audio_hw_if eap1371_hw_if = {
-       eap_open,
-       eap_close,
-       eap_set_params,
-       eap_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       eap_halt_output,
-       eap_halt_input,
-       NULL,
-       NULL,
-       eap1371_mixer_set_port,
-       eap1371_mixer_get_port,
-       eap1371_query_devinfo,
-       eap_malloc,
-       eap_free,
-       NULL,
-       eap_get_props,
-       eap_trigger_output,
-       eap_trigger_input
+       .open = eap_open,
+       .close = eap_close,
+       .set_params = eap_set_params,
+       .round_blocksize = eap_round_blocksize,
+       .halt_output = eap_halt_output,
+       .halt_input = eap_halt_input,
+       .set_port = eap1371_mixer_set_port,
+       .get_port = eap1371_mixer_get_port,
+       .query_devinfo = eap1371_query_devinfo,
+       .allocm = eap_malloc,
+       .freem = eap_free,
+       .get_props = eap_get_props,
+       .trigger_output = eap_trigger_output,
+       .trigger_input = eap_trigger_input,
 };
 
 #if NMIDI > 0
index 96a4e46..7d32dec 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: emuxki.c,v 1.59 2022/10/18 08:22:19 kn Exp $  */
+/*     $OpenBSD: emuxki.c,v 1.60 2022/10/19 19:14:16 kn Exp $  */
 /*     $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $      */
 
 /*-
@@ -212,28 +212,21 @@ const struct cfattach emu_ca = {
 };
 
 const struct audio_hw_if emuxki_hw_if = {
-       emuxki_open,
-       emuxki_close,
-       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 */
-       NULL,                   /* setfd */
-       emuxki_set_port,
-       emuxki_get_port,
-       emuxki_query_devinfo,
-       emuxki_allocm,
-       emuxki_freem,
-       emuxki_round_buffersize,
-       emuxki_get_props,
-       emuxki_trigger_output,
-       emuxki_trigger_input
+       .open = emuxki_open,
+       .close = emuxki_close,
+       .set_params = emuxki_set_params,
+       .round_blocksize = emuxki_round_blocksize,
+       .halt_output = emuxki_halt_output,
+       .halt_input = emuxki_halt_input,
+       .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,
+       .get_props = emuxki_get_props,
+       .trigger_output = emuxki_trigger_output,
+       .trigger_input = emuxki_trigger_input,
 };
 
 #if 0
index 378c31b..ab95ab0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: envy.c,v 1.85 2022/10/18 08:22:19 kn Exp $    */
+/*     $OpenBSD: envy.c,v 1.86 2022/10/19 19:14:16 kn Exp $    */
 /*
  * Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org>
  *
@@ -180,28 +180,20 @@ struct cfdriver envy_cd = {
 };
 
 const struct audio_hw_if envy_hw_if = {
-       envy_open,              /* open */
-       envy_close,             /* close */
-       envy_set_params,        /* set_params */
-       envy_round_blocksize,   /* round_blocksize */
-       NULL,                   /* commit_settings */
-       NULL,                   /* init_output */
-       NULL,                   /* init_input */
-       NULL,                   /* start_output */
-       NULL,                   /* start_input */
-       envy_halt_output,       /* halt_output */
-       envy_halt_input,        /* halt_input */
-       NULL,                   /* speaker_ctl */
-       NULL,                   /* setfd */
-       envy_set_port,          /* set_port */
-       envy_get_port,          /* get_port */
-       envy_query_devinfo,     /* query_devinfo */
-       envy_allocm,            /* malloc */
-       envy_freem,             /* free */
-       NULL,                   /* round_buffersize */
-       envy_get_props,         /* get_props */
-       envy_trigger_output,    /* trigger_output */
-       envy_trigger_input      /* trigger_input */
+       .open = envy_open,
+       .close = envy_close,
+       .set_params = envy_set_params,
+       .round_blocksize = envy_round_blocksize,
+       .halt_output = envy_halt_output,
+       .halt_input = envy_halt_input,
+       .set_port = envy_set_port,
+       .get_port = envy_get_port,
+       .query_devinfo = envy_query_devinfo,
+       .allocm = envy_allocm,
+       .freem = envy_freem,
+       .get_props = envy_get_props,
+       .trigger_output = envy_trigger_output,
+       .trigger_input = envy_trigger_input,
 };
 
 #if NMIDI > 0
index e0026d9..55603e2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: esa.c,v 1.39 2022/10/18 08:22:19 kn Exp $     */
+/*     $OpenBSD: esa.c,v 1.40 2022/10/19 19:14:16 kn Exp $     */
 /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
 
 /*
@@ -152,28 +152,22 @@ void              esa_suspend(struct esa_softc *);
 void           esa_resume(struct esa_softc *);
 
 const struct audio_hw_if esa_hw_if = {
-       esa_open,
-       esa_close,
-       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 */
-       NULL,                   /* getfd */
-       esa_set_port,
-       esa_get_port,
-       esa_query_devinfo,
-       esa_malloc,
-       esa_free,
-       esa_round_buffersize,
-       esa_get_props,
-       esa_trigger_output,
-       esa_trigger_input
+       .open = esa_open,
+       .close = esa_close,
+       .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,
+       .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,
+       .get_props = esa_get_props,
+       .trigger_output = esa_trigger_output,
+       .trigger_input = esa_trigger_input,
 };
 
 struct cfdriver esa_cd = {
index eec3e04..87e7c8f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: eso.c,v 1.51 2022/10/18 08:22:19 kn Exp $     */
+/*     $OpenBSD: eso.c,v 1.52 2022/10/19 19:14:17 kn Exp $     */
 /*     $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $  */
 
 /*
@@ -124,28 +124,21 @@ int       eso_trigger_input(void *, void *, void *, int,
 void   eso_setup(struct eso_softc *, int, int);
 
 const struct audio_hw_if eso_hw_if = {
-       eso_open,
-       eso_close,
-       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 */
-       NULL,                   /* setfd */
-       eso_set_port,
-       eso_get_port,
-       eso_query_devinfo,
-       eso_allocm,
-       eso_freem,
-       eso_round_buffersize,
-       eso_get_props,
-       eso_trigger_output,
-       eso_trigger_input
+       .open = eso_open,
+       .close = eso_close,
+       .set_params = eso_set_params,
+       .round_blocksize = eso_round_blocksize,
+       .halt_output = eso_halt_output,
+       .halt_input = eso_halt_input,
+       .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,
+       .get_props = eso_get_props,
+       .trigger_output = eso_trigger_output,
+       .trigger_input = eso_trigger_input,
 };
 
 const char * const eso_rev2model[] = {
index 56adec0..9a154ea 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: fms.c,v 1.34 2022/10/18 08:22:19 kn Exp $ */
+/*     $OpenBSD: fms.c,v 1.35 2022/10/19 19:14:17 kn Exp $ */
 /*     $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $       */
 
 /*-
@@ -100,28 +100,20 @@ const struct cfattach fms_ca = {
 };
 
 const struct audio_hw_if fms_hw_if = {
-       fms_open,
-       fms_close,
-       fms_set_params,
-       fms_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       fms_halt_output,
-       fms_halt_input,
-       NULL,
-       NULL,
-       fms_set_port,
-       fms_get_port,
-       fms_query_devinfo,
-       fms_malloc,
-       fms_free,
-       NULL,
-       fms_get_props,
-       fms_trigger_output,
-       fms_trigger_input
+       .open = fms_open,
+       .close = fms_close,
+       .set_params = fms_set_params,
+       .round_blocksize = fms_round_blocksize,
+       .halt_output = fms_halt_output,
+       .halt_input = fms_halt_input,
+       .set_port = fms_set_port,
+       .get_port = fms_get_port,
+       .query_devinfo = fms_query_devinfo,
+       .allocm = fms_malloc,
+       .freem = fms_free,
+       .get_props = fms_get_props,
+       .trigger_output = fms_trigger_output,
+       .trigger_input = fms_trigger_input,
 };
 
 int    fms_attach_codec(void *, struct ac97_codec_if *);
index 1f68eca..1de34df 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: maestro.c,v 1.48 2022/10/19 09:11:26 kn Exp $ */
+/*     $OpenBSD: maestro.c,v 1.49 2022/10/19 19:14:17 kn Exp $ */
 /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
 /*
  * FreeBSD's ESS Agogo/Maestro driver 
@@ -528,28 +528,20 @@ const struct cfattach maestro_ca = {
 };
 
 const struct audio_hw_if maestro_hw_if = {
-       maestro_open,
-       maestro_close,
-       maestro_set_params,
-       maestro_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       maestro_halt_output,
-       maestro_halt_input,
-       NULL,
-       NULL,
-       maestro_set_port,
-       maestro_get_port,
-       maestro_query_devinfo,
-       maestro_malloc,
-       maestro_free,
-       NULL,
-       maestro_get_props,
-       maestro_trigger_output,
-       maestro_trigger_input
+       .open = maestro_open,
+       .close = maestro_close,
+       .set_params = maestro_set_params,
+       .round_blocksize = maestro_round_blocksize,
+       .halt_output = maestro_halt_output,
+       .halt_input = maestro_halt_input,
+       .set_port = maestro_set_port,
+       .get_port = maestro_get_port,
+       .query_devinfo = maestro_query_devinfo,
+       .allocm = maestro_malloc,
+       .freem = maestro_free,
+       .get_props = maestro_get_props,
+       .trigger_output = maestro_trigger_output,
+       .trigger_input = maestro_trigger_input,
 };
 
 const struct {
index d185889..0057e54 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: neo.c,v 1.38 2022/10/18 08:22:19 kn Exp $       */
+/*      $OpenBSD: neo.c,v 1.39 2022/10/19 19:14:17 kn Exp $       */
 
 /*
  * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -238,32 +238,21 @@ static int samplerates[9] = {
 /* -------------------------------------------------------------------- */
 
 const struct audio_hw_if neo_hw_if = {
-       neo_open,
-       neo_close,
-       neo_set_params,
-#if 1
-       neo_round_blocksize,
-#else
-       NULL,
-#endif
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       neo_halt_output,
-       neo_halt_input,
-       NULL,
-       NULL,
-       neo_mixer_set_port,
-       neo_mixer_get_port,
-       neo_query_devinfo,
-       neo_malloc,
-       neo_free,
-       neo_round_buffersize,
-       neo_get_props,
-       neo_trigger_output,
-       neo_trigger_input
+       .open = neo_open,
+       .close = neo_close,
+       .set_params = neo_set_params,
+       .round_blocksize = neo_round_blocksize,
+       .halt_output = neo_halt_output,
+       .halt_input = neo_halt_input,
+       .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,
+       .get_props = neo_get_props,
+       .trigger_output = neo_trigger_output,
+       .trigger_input = neo_trigger_input,
 
 };
 
index 862aad7..1d019e6 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: sv.c,v 1.41 2022/10/18 08:22:19 kn Exp $ */
+/*      $OpenBSD: sv.c,v 1.42 2022/10/19 19:14:17 kn Exp $ */
 
 /*
  * Copyright (c) 1998 Constantine Paul Sapuntzakis
@@ -147,28 +147,22 @@ int       sv_get_props(void *);
 void    sv_dumpregs(struct sv_softc *sc);
 
 const struct audio_hw_if sv_hw_if = {
-       sv_open,
-       sv_close,
-       sv_set_params,
-       sv_round_blocksize,
-       NULL,
-       sv_dma_init_output,
-       sv_dma_init_input,
-       sv_dma_output,
-       sv_dma_input,
-       sv_halt_out_dma,
-       sv_halt_in_dma,
-       NULL,
-       NULL,
-       sv_mixer_set_port,
-       sv_mixer_get_port,
-       sv_query_devinfo,
-       sv_malloc,
-       sv_free,
-       NULL,
-       sv_get_props,
-       NULL,
-       NULL
+       .open = sv_open,
+       .close = sv_close,
+       .set_params = sv_set_params,
+       .round_blocksize = sv_round_blocksize,
+       .init_output = sv_dma_init_output,
+       .init_input = sv_dma_init_input,
+       .start_output = sv_dma_output,
+       .start_input = sv_dma_input,
+       .halt_output = sv_halt_out_dma,
+       .halt_input = sv_halt_in_dma,
+       .set_port = sv_mixer_set_port,
+       .get_port = sv_mixer_get_port,
+       .query_devinfo = sv_query_devinfo,
+       .allocm = sv_malloc,
+       .freem = sv_free,
+       .get_props = sv_get_props,
 };
 
 
index b26b3ec..3cf060f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: yds.c,v 1.61 2022/10/18 08:22:19 kn Exp $     */
+/*     $OpenBSD: yds.c,v 1.62 2022/10/19 19:14:17 kn Exp $     */
 /*     $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $  */
 
 /*
@@ -200,28 +200,21 @@ static void yds_dump_play_slot(struct yds_softc *, int);
 #endif /* AUDIO_DEBUG */
 
 static const struct audio_hw_if yds_hw_if = {
-       yds_open,
-       yds_close,
-       yds_set_params,
-       yds_round_blocksize,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       yds_halt_output,
-       yds_halt_input,
-       NULL,
-       NULL,
-       yds_mixer_set_port,
-       yds_mixer_get_port,
-       yds_query_devinfo,
-       yds_malloc,
-       yds_free,
-       yds_round_buffersize,
-       yds_get_props,
-       yds_trigger_output,
-       yds_trigger_input
+       .open = yds_open,
+       .close = yds_close,
+       .set_params = yds_set_params,
+       .round_blocksize = yds_round_blocksize,
+       .halt_output = yds_halt_output,
+       .halt_input = yds_halt_input,
+       .set_port = yds_mixer_set_port,
+       .get_port = yds_mixer_get_port,
+       .query_devinfo = yds_query_devinfo,
+       .allocm = yds_malloc,
+       .freem = yds_free,
+       .round_buffersize = yds_round_buffersize,
+       .get_props = yds_get_props,
+       .trigger_output = yds_trigger_output,
+       .trigger_input = yds_trigger_input,
 };
 
 static const struct {
index bdf2613..9ef430f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cs4231.c,v 1.42 2022/08/29 06:08:04 jsg Exp $ */
+/*     $OpenBSD: cs4231.c,v 1.43 2022/10/19 19:14:17 kn Exp $  */
 
 /*
  * Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -152,28 +152,21 @@ int       cs4231_trigger_input(void *, void *, void *, int,
     void (*)(void *), void *, struct audio_params *);
 
 const struct audio_hw_if cs4231_sa_hw_if = {
-       cs4231_open,
-       cs4231_close,
-       cs4231_set_params,
-       cs4231_round_blocksize,
-       cs4231_commit_settings,
-       0,
-       0,
-       0,
-       0,
-       cs4231_halt_output,
-       cs4231_halt_input,
-       0,
-       0,
-       cs4231_set_port,
-       cs4231_get_port,
-       cs4231_query_devinfo,
-       cs4231_alloc,
-       cs4231_free,
-       0,
-       cs4231_get_props,
-       cs4231_trigger_output,
-       cs4231_trigger_input
+       .open = cs4231_open,
+       .close = cs4231_close,
+       .set_params = cs4231_set_params,
+       .round_blocksize = cs4231_round_blocksize,
+       .commit_settings = cs4231_commit_settings,
+       .halt_output = cs4231_halt_output,
+       .halt_input = cs4231_halt_input,
+       .set_port = cs4231_set_port,
+       .get_port = cs4231_get_port,
+       .query_devinfo = cs4231_query_devinfo,
+       .allocm = cs4231_alloc,
+       .freem = cs4231_free,
+       .get_props = cs4231_get_props,
+       .trigger_output = cs4231_trigger_output,
+       .trigger_input = cs4231_trigger_input,
 };
 
 const struct cfattach audiocs_ca = {
index 2fe39dc..ea1050c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: bba.c,v 1.10 2022/10/18 08:22:19 kn Exp $     */
+/*     $OpenBSD: bba.c,v 1.11 2022/10/19 19:14:17 kn Exp $     */
 /* $NetBSD: bba.c,v 1.38 2011/06/04 01:27:57 tsutsui Exp $ */
 /*
  * Copyright (c) 2011 Miodrag Vallat.
@@ -153,28 +153,22 @@ int       bba_trigger_input(void *, void *, void *, int,
            void (*)(void *), void *, struct audio_params *);
 
 const struct audio_hw_if bba_hw_if = {
-       am7930_open,
-       am7930_close,
-       am7930_set_params,
-       bba_round_blocksize,            /* md */
-       am7930_commit_settings,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       bba_halt_output,                /* md */
-       bba_halt_input,                 /* md */
-       NULL,
-       NULL,
-       am7930_set_port,
-       am7930_get_port,
-       am7930_query_devinfo,
-       bba_allocm,                     /* md */
-       bba_freem,                      /* md */
-       bba_round_buffersize,           /* md */
-       bba_get_props,
-       bba_trigger_output,             /* md */
-       bba_trigger_input               /* md */
+       .open = am7930_open,
+       .close = am7930_close,
+       .set_params = am7930_set_params,
+       .round_blocksize = bba_round_blocksize,
+       .commit_settings = am7930_commit_settings,
+       .halt_output = bba_halt_output,
+       .halt_input = bba_halt_input,
+       .set_port = am7930_set_port,
+       .get_port = am7930_get_port,
+       .query_devinfo = am7930_query_devinfo,
+       .allocm = bba_allocm,
+       .freem = bba_freem,
+       .round_buffersize = bba_round_buffersize,
+       .get_props = bba_get_props,
+       .trigger_output = bba_trigger_output,
+       .trigger_input = bba_trigger_input,
 };
 
 int    bba_intr(void *);
index 154773b..e16b925 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uaudio.c,v 1.170 2022/10/19 09:11:26 kn Exp $ */
+/*     $OpenBSD: uaudio.c,v 1.171 2022/10/19 19:14:17 kn Exp $ */
 /*
  * Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org>
  *
@@ -469,31 +469,20 @@ const struct cfattach uaudio_ca = {
 };
 
 const struct audio_hw_if uaudio_hw_if = {
-       uaudio_open,            /* open */
-       uaudio_close,           /* close */
-       uaudio_set_params,      /* set_params */
-       NULL,                   /* round_blocksize */
-       NULL,                   /* commit_settings */
-       NULL,                   /* init_output */
-       NULL,                   /* init_input */
-       NULL,                   /* start_output */
-       NULL,                   /* start_input */
-       uaudio_halt_output,     /* halt_output */
-       uaudio_halt_input,      /* halt_input */
-       NULL,                   /* speaker_ctl */
-       NULL,                   /* setfd */
-       uaudio_set_port,        /* set_port */
-       uaudio_get_port,        /* get_port */
-       uaudio_query_devinfo,   /* query_devinfo */
-       NULL,                   /* malloc, we use bounce buffers :'( */
-       NULL,                   /* free */
-       NULL,                   /* round_buffersize */
-       uaudio_get_props,       /* get_props */
-       uaudio_trigger_output,  /* trigger_output */
-       uaudio_trigger_input,   /* trigger_input */
-       uaudio_copy_output,     /* copy_output */
-       uaudio_underrun,        /* underrun */
-       uaudio_set_blksz        /* set_blksz */
+       .open = uaudio_open,
+       .close = uaudio_close,
+       .set_params = uaudio_set_params,
+       .halt_output = uaudio_halt_output,
+       .halt_input = uaudio_halt_input,
+       .set_port = uaudio_set_port,
+       .get_port = uaudio_get_port,
+       .query_devinfo = uaudio_query_devinfo,
+       .get_props = uaudio_get_props,
+       .trigger_output = uaudio_trigger_output,
+       .trigger_input = uaudio_trigger_input,
+       .copy_output = uaudio_copy_output,
+       .underrun = uaudio_underrun,
+       .set_blksz = uaudio_set_blksz,
 };
 
 /*
index 7e39c3b..930f2d1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: utvfu.c,v 1.17 2022/03/21 19:22:42 miod Exp $ */
+/*     $OpenBSD: utvfu.c,v 1.18 2022/10/19 19:14:17 kn Exp $ */
 /*
  * Copyright (c) 2013 Lubomir Rintel
  * Copyright (c) 2013 Federico Simoncelli
@@ -843,28 +843,17 @@ const struct video_hw_if utvfu_vid_hw_if = {
 };
 
 const struct audio_hw_if utvfu_au_hw_if = {
-       utvfu_audio_open,               /* open hardware */
-       utvfu_audio_close,              /* close hardware */
-       utvfu_audio_set_params,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       utvfu_audio_halt_out,
-       utvfu_audio_halt_in,
-       NULL,
-       NULL,
-       utvfu_audio_mixer_set_port,
-       utvfu_audio_mixer_get_port,
-       utvfu_audio_query_devinfo,
-       NULL,
-       NULL,
-       NULL,
-       utvfu_audio_get_props,
-       utvfu_audio_trigger_output,
-       utvfu_audio_trigger_input
+       .open = utvfu_audio_open,
+       .close = utvfu_audio_close,
+       .set_params = utvfu_audio_set_params,
+       .halt_output = utvfu_audio_halt_out,
+       .halt_input = utvfu_audio_halt_in,
+       .set_port = utvfu_audio_mixer_set_port,
+       .get_port = utvfu_audio_mixer_get_port,
+       .query_devinfo = utvfu_audio_query_devinfo,
+       .get_props = utvfu_audio_get_props,
+       .trigger_output = utvfu_audio_trigger_output,
+       .trigger_input = utvfu_audio_trigger_input,
 };
 
 int