From: anton Date: Wed, 16 Feb 2022 06:21:18 +0000 (+0000) Subject: Make room for a cookie argument passed to audio_attach_mi(). Currently X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2baa08e2d3c5f080938f9e6e6241ed77ae632585;p=openbsd Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices. ok ratchov@ --- diff --git a/sys/arch/hppa/gsc/harmony.c b/sys/arch/hppa/gsc/harmony.c index 033a3d2c356..c1ba6900ffe 100644 --- a/sys/arch/hppa/gsc/harmony.c +++ b/sys/arch/hppa/gsc/harmony.c @@ -1,4 +1,4 @@ -/* $OpenBSD: harmony.c,v 1.35 2020/05/29 04:42:23 deraadt Exp $ */ +/* $OpenBSD: harmony.c,v 1.36 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2003 Jason L. Wright (jason@thought.net) @@ -249,7 +249,7 @@ harmony_attach(parent, self, aux) if ((rev & CS4215_REV_VER) >= CS4215_REV_VER_E) sc->sc_hasulinear8 = 1; - audio_attach_mi(&harmony_sa_hw_if, sc, &sc->sc_dv); + audio_attach_mi(&harmony_sa_hw_if, sc, NULL, &sc->sc_dv); timeout_set(&sc->sc_acc_tmo, harmony_acc_tmo, sc); sc->sc_acc_num = 0xa5a5a5a5; diff --git a/sys/arch/luna88k/cbus/nec86.c b/sys/arch/luna88k/cbus/nec86.c index b6516cc4888..ed86c021355 100644 --- a/sys/arch/luna88k/cbus/nec86.c +++ b/sys/arch/luna88k/cbus/nec86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nec86.c,v 1.3 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: nec86.c,v 1.4 2022/02/16 06:21:18 anton Exp $ */ /* $NecBSD: nec86.c,v 1.11 1999/07/23 11:04:39 honda Exp $ */ /* $NetBSD$ */ @@ -237,7 +237,7 @@ nec86_attachsubr(struct nec86_softc *sc) if (sc->sc_attached == 0) { printf(": %s\n", boardname[ysc->model]); - audio_attach_mi(&nec86_hw_if, ysc, &ysc->sc_dev); + audio_attach_mi(&nec86_hw_if, ysc, NULL, &ysc->sc_dev); sc->sc_attached = 1; } } diff --git a/sys/arch/macppc/dev/aoa.c b/sys/arch/macppc/dev/aoa.c index a2ca8e10a95..30f2ae57410 100644 --- a/sys/arch/macppc/dev/aoa.c +++ b/sys/arch/macppc/dev/aoa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aoa.c,v 1.11 2020/08/26 03:29:06 visa Exp $ */ +/* $OpenBSD: aoa.c,v 1.12 2022/02/16 06:21:18 anton Exp $ */ /*- * Copyright (c) 2005 Tsubai Masanari. All rights reserved. @@ -134,7 +134,7 @@ aoa_defer(struct device *dev) { struct aoa_softc *sc = (struct aoa_softc *)dev; - audio_attach_mi(&aoa_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&aoa_hw_if, sc, NULL, &sc->sc_dev); deq_reset(sc); } diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c index 8ea7d4869a0..c5bcfa9d68e 100644 --- a/sys/arch/macppc/dev/awacs.c +++ b/sys/arch/macppc/dev/awacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awacs.c,v 1.34 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: awacs.c,v 1.35 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */ /*- @@ -340,7 +340,7 @@ awacs_attach(struct device *parent, struct device *self, void *aux) awacs_halt_input(sc); printf("\n"); - audio_attach_mi(&awacs_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&awacs_hw_if, sc, NULL, &sc->sc_dev); } u_int diff --git a/sys/arch/macppc/dev/daca.c b/sys/arch/macppc/dev/daca.c index 070b839c99a..4943f7a761a 100644 --- a/sys/arch/macppc/dev/daca.c +++ b/sys/arch/macppc/dev/daca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: daca.c,v 1.10 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: daca.c,v 1.11 2022/02/16 06:21:18 anton Exp $ */ /*- * Copyright (c) 2002,2003 Tsubai Masanari. All rights reserved. @@ -154,7 +154,7 @@ daca_defer(struct device *dev) /* XXX If i2c has failed to attach, what should we do? */ - audio_attach_mi(&daca_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&daca_hw_if, sc, NULL, &sc->sc_dev); daca_init(sc); } diff --git a/sys/arch/macppc/dev/onyx.c b/sys/arch/macppc/dev/onyx.c index c279258f091..62ed93cfc8e 100644 --- a/sys/arch/macppc/dev/onyx.c +++ b/sys/arch/macppc/dev/onyx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: onyx.c,v 1.12 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: onyx.c,v 1.13 2022/02/16 06:21:18 anton Exp $ */ /*- * Copyright (c) 2005 Tsubai Masanari. All rights reserved. @@ -165,7 +165,7 @@ onyx_defer(struct device *dev) /* XXX If i2c has failed to attach, what should we do? */ - audio_attach_mi(&onyx_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&onyx_hw_if, sc, NULL, &sc->sc_dev); deq_reset(sc); onyx_set_volume(sc, 192, 192); diff --git a/sys/arch/macppc/dev/snapper.c b/sys/arch/macppc/dev/snapper.c index 3fbf58aec0f..f21a6d728a9 100644 --- a/sys/arch/macppc/dev/snapper.c +++ b/sys/arch/macppc/dev/snapper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snapper.c,v 1.39 2020/08/26 03:29:06 visa Exp $ */ +/* $OpenBSD: snapper.c,v 1.40 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */ /*- @@ -486,7 +486,7 @@ snapper_defer(struct device *dev) /* XXX If i2c has failed to attach, what should we do? */ - audio_attach_mi(&snapper_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&snapper_hw_if, sc, NULL, &sc->sc_dev); /* kiic_setmode(sc->sc_i2c, I2C_STDSUBMODE); */ snapper_init(sc); diff --git a/sys/arch/macppc/dev/tumbler.c b/sys/arch/macppc/dev/tumbler.c index 6c522a10585..504a321a97c 100644 --- a/sys/arch/macppc/dev/tumbler.c +++ b/sys/arch/macppc/dev/tumbler.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tumbler.c,v 1.9 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: tumbler.c,v 1.10 2022/02/16 06:21:18 anton Exp $ */ /*- * Copyright (c) 2001,2003 Tsubai Masanari. All rights reserved. @@ -299,7 +299,7 @@ tumbler_defer(struct device *dev) /* XXX If i2c has failed to attach, what should we do? */ - audio_attach_mi(&tumbler_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&tumbler_hw_if, sc, NULL, &sc->sc_dev); tumbler_init(sc); } diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c index 5e97b0fb228..5e220907150 100644 --- a/sys/arch/sparc64/dev/ce4231.c +++ b/sys/arch/sparc64/dev/ce4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231.c,v 1.37 2021/10/24 17:05:03 mpi Exp $ */ +/* $OpenBSD: ce4231.c,v 1.38 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -268,7 +268,7 @@ ce4231_attach(struct device *parent, struct device *self, void *aux) printf(": nvaddrs %d\n", ea->ea_nvaddrs); - audio_attach_mi(&ce4231_sa_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&ce4231_sa_hw_if, sc, NULL, &sc->sc_dev); /* Enable mode 2. */ ce4231_write(sc, SP_MISC_INFO, ce4231_read(sc, SP_MISC_INFO) | MODE2); diff --git a/sys/dev/audio.c b/sys/dev/audio.c index ec52ee6ef01..856a88bae98 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.194 2022/01/09 05:42:36 jsg Exp $ */ +/* $OpenBSD: audio.c,v 1.195 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2015 Alexandre Ratchov * @@ -112,6 +112,7 @@ struct mixer_ev { struct audio_softc { struct device dev; struct audio_hw_if *ops; /* driver funcs */ + void *cookie; /* wskbd cookie */ void *arg; /* first arg to driver funcs */ int mode; /* bitmask of AUMODE_* */ int quiesce; /* device suspended */ @@ -1236,6 +1237,7 @@ audio_attach(struct device *parent, struct device *self, void *aux) } #endif sc->ops = ops; + sc->cookie = sa->cookie; sc->arg = arg; #if NWSKBD > 0 @@ -1467,13 +1469,14 @@ audio_submatch(struct device *parent, void *match, void *aux) } struct device * -audio_attach_mi(struct audio_hw_if *ops, void *arg, struct device *dev) +audio_attach_mi(struct audio_hw_if *ops, void *arg, void *cookie, struct device *dev) { struct audio_attach_args aa; aa.type = AUDIODEV_TYPE_AUDIO; aa.hwif = ops; aa.hdl = arg; + aa.cookie = cookie; /* * attach this driver to the caller (hardware driver), this diff --git a/sys/dev/audio_if.h b/sys/dev/audio_if.h index 8b96211bced..4f43d0e39aa 100644 --- a/sys/dev/audio_if.h +++ b/sys/dev/audio_if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: audio_if.h,v 1.36 2019/09/05 05:33:57 ratchov Exp $ */ +/* $OpenBSD: audio_if.h,v 1.37 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */ /* @@ -143,6 +143,7 @@ struct audio_attach_args { int type; void *hwif; /* either audio_hw_if * or midi_hw_if * */ void *hdl; + void *cookie; }; #define AUDIODEV_TYPE_AUDIO 0 #define AUDIODEV_TYPE_MIDI 1 @@ -151,7 +152,7 @@ struct audio_attach_args { #define AUDIODEV_TYPE_RADIO 4 /* Attach the MI driver(s) to the MD driver. */ -struct device *audio_attach_mi(struct audio_hw_if *, void *, struct device *); +struct device *audio_attach_mi(struct audio_hw_if *, void *, void *, struct device *); int audioprint(void *, const char *); int audio_blksz_bytes(int, struct audio_params *, struct audio_params *, int); diff --git a/sys/dev/fdt/graphaudio.c b/sys/dev/fdt/graphaudio.c index bf2889306bf..900daf57226 100644 --- a/sys/dev/fdt/graphaudio.c +++ b/sys/dev/fdt/graphaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: graphaudio.c,v 1.1 2021/04/07 17:12:22 kettenis Exp $ */ +/* $OpenBSD: graphaudio.c,v 1.2 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2020 Patrick Wildt * Copyright (c) 2021 Mark Kettenis @@ -186,7 +186,7 @@ graphaudio_attach_deferred(struct device *self) graphaudio_set_format(sc, fmt, pol, clk); - audio_attach_mi(&graphaudio_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&graphaudio_hw_if, sc, NULL, &sc->sc_dev); } void diff --git a/sys/dev/fdt/simpleaudio.c b/sys/dev/fdt/simpleaudio.c index 055f2e78e10..9ed72558849 100644 --- a/sys/dev/fdt/simpleaudio.c +++ b/sys/dev/fdt/simpleaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simpleaudio.c,v 1.2 2021/04/05 14:36:18 kn Exp $ */ +/* $OpenBSD: simpleaudio.c,v 1.3 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2020 Patrick Wildt * @@ -206,7 +206,7 @@ simpleaudio_attach_deferred(struct device *self) simpleaudio_set_format(sc, fmt, pol, clk); - audio_attach_mi(&simpleaudio_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&simpleaudio_hw_if, sc, NULL, &sc->sc_dev); } void diff --git a/sys/dev/ic/arcofi.c b/sys/dev/ic/arcofi.c index 9c34840db1a..3bf44fbc1ce 100644 --- a/sys/dev/ic/arcofi.c +++ b/sys/dev/ic/arcofi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arcofi.c,v 1.17 2016/09/19 22:21:09 kettenis Exp $ */ +/* $OpenBSD: arcofi.c,v 1.18 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2011 Miodrag Vallat. @@ -1125,7 +1125,7 @@ arcofi_attach(struct arcofi_softc *sc, const char *version) arcofi_write(sc, ARCOFI_FIFO_IR, 0); arcofi_write(sc, ARCOFI_CSR, CSR_INTR_ENABLE); - audio_attach_mi(&arcofi_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&arcofi_hw_if, sc, NULL, &sc->sc_dev); return; error: diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c index 221bfb46b0f..86df2f0f815 100644 --- a/sys/dev/isa/ess.c +++ b/sys/dev/isa/ess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ess.c,v 1.26 2022/01/09 05:42:42 jsg Exp $ */ +/* $OpenBSD: ess.c,v 1.27 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */ /* @@ -975,9 +975,9 @@ essattach(struct ess_softc *sc) sc->spkr_state = SPKR_OFF; if (ESS_USE_AUDIO1(sc->sc_model)) - audio_attach_mi(&ess_1788_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&ess_1788_hw_if, sc, NULL, &sc->sc_dev); else - audio_attach_mi(&ess_1888_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&ess_1888_hw_if, sc, NULL, &sc->sc_dev); arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index 32dc84502d7..8ff717032c8 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gus.c,v 1.48 2021/03/07 06:17:03 jsg Exp $ */ +/* $OpenBSD: gus.c,v 1.49 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */ /*- @@ -3398,7 +3398,7 @@ gus_subattach(struct gus_softc *sc, struct isa_attach_args *ia) */ audio_attach_mi(&gus_hw_if, HAS_CODEC(sc) ? (void *)&sc->sc_codec : - (void *)sc, &sc->sc_dev); + (void *)sc, NULL, &sc->sc_dev); } /* diff --git a/sys/dev/isa/pas.c b/sys/dev/isa/pas.c index fd3363d0ec8..cb206ec4f4f 100644 --- a/sys/dev/isa/pas.c +++ b/sys/dev/isa/pas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pas.c,v 1.30 2021/03/07 06:17:04 jsg Exp $ */ +/* $OpenBSD: pas.c,v 1.31 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: pas.c,v 1.37 1998/01/12 09:43:43 thorpej Exp $ */ /* @@ -398,5 +398,5 @@ pasattach(struct device *parent, struct device *self, void *aux) sbdsp_attach(&sc->sc_sbdsp); - audio_attach_mi(&pas_hw_if, &sc->sc_sbdsp, &sc->sc_sbdsp.sc_dev); + audio_attach_mi(&pas_hw_if, &sc->sc_sbdsp, NULL, &sc->sc_sbdsp.sc_dev); } diff --git a/sys/dev/isa/sb.c b/sys/dev/isa/sb.c index 9458d043c4e..2a7ae30b936 100644 --- a/sys/dev/isa/sb.c +++ b/sys/dev/isa/sb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sb.c,v 1.30 2021/03/07 06:17:04 jsg Exp $ */ +/* $OpenBSD: sb.c,v 1.31 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: sb.c,v 1.57 1998/01/12 09:43:46 thorpej Exp $ */ /* @@ -264,7 +264,7 @@ sbattach(struct sbdsp_softc *sc) midi_attach_mi(mhw, sc, &sc->sc_dev); #endif - audio_attach_mi(&sb_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&sb_hw_if, sc, NULL, &sc->sc_dev); arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index c42f78e0abb..c042bedc8b9 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auacer.c,v 1.22 2019/12/14 12:35:19 fcambus Exp $ */ +/* $OpenBSD: auacer.c,v 1.23 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */ /*- @@ -274,7 +274,7 @@ auacer_attach(struct device *parent, struct device *self, void *aux) if (ac97_attach(&sc->host_if) != 0) return; - audio_attach_mi(&auacer_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&auacer_hw_if, sc, NULL, &sc->sc_dev); auacer_reset(sc); } diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c index 84bbf238a5b..dd293021742 100644 --- a/sys/dev/pci/auglx.c +++ b/sys/dev/pci/auglx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auglx.c,v 1.17 2019/12/14 12:37:05 fcambus Exp $ */ +/* $OpenBSD: auglx.c,v 1.18 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -334,7 +334,7 @@ auglx_attach(struct device *parent, struct device *self, void *aux) bus_space_unmap(sc->sc_iot, sc->sc_ioh, bar_size); return; } - audio_attach_mi(&auglx_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&auglx_hw_if, sc, NULL, &sc->sc_dev); } /* Functions to communicate with the AC97 Codec via the ACC */ diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index ab1403a6c73..925c960103e 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.113 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: auich.c,v 1.114 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -512,7 +512,7 @@ auich_attach(struct device *parent, struct device *self, void *aux) goto fail_disestablish_intr; sc->codec_if->vtbl->unlock(sc->codec_if); - audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&auich_hw_if, sc, NULL, &sc->sc_dev); /* Watch for power changes */ sc->suspend = DVACT_RESUME; diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 578572e1a91..a69a66f1a64 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.44 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: auixp.c,v 1.45 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -1035,7 +1035,7 @@ auixp_post_config(struct device *self) return; } - audio_attach_mi(&auixp_hw_if, &sc->sc_codec, &sc->sc_dev); + audio_attach_mi(&auixp_hw_if, &sc->sc_codec, NULL, &sc->sc_dev); if (sc->has_spdif) sc->has_spdif = 0; diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c index 7f85a254b81..228e3f2d0e5 100644 --- a/sys/dev/pci/autri.c +++ b/sys/dev/pci/autri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autri.c,v 1.44 2020/01/11 09:08:39 cheloha Exp $ */ +/* $OpenBSD: autri.c,v 1.45 2022/02/16 06:21:18 anton Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -574,7 +574,7 @@ autri_attach(struct device *parent, struct device *self, void *aux) ctl.dev = autri_get_portnum_by_name(sc,AudioCoutputs,AudioNmaster,NULL); autri_mixer_set_port(sc, &ctl); - audio_attach_mi(&autri_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&autri_hw_if, sc, NULL, &sc->sc_dev); #if NMIDI > 0 midi_attach_mi(&autri_midi_hw_if, sc, &sc->sc_dev); diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c index 8ca4e924543..39145b52e39 100644 --- a/sys/dev/pci/auvia.c +++ b/sys/dev/pci/auvia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auvia.c,v 1.60 2019/12/01 21:14:13 fcambus Exp $ */ +/* $OpenBSD: auvia.c,v 1.61 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */ /*- @@ -346,7 +346,7 @@ auvia_attach(struct device *parent, struct device *self, void *aux) AudioCoutputs, AudioNmaster, NULL); auvia_set_port(sc, &ctl); - audio_attach_mi(&auvia_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&auvia_hw_if, sc, NULL, &sc->sc_dev); sc->codec_if->vtbl->unlock(sc->codec_if); } diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 83fa8d1d7f0..ee3da2b6451 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.268 2022/01/11 00:37:23 jsg Exp $ */ +/* $OpenBSD: azalia.c,v 1.269 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -588,7 +588,7 @@ azalia_pci_attach(struct device *parent, struct device *self, void *aux) if (azalia_init_streams(sc)) goto err_exit; - audio_attach_mi(&azalia_hw_if, sc, &sc->dev); + audio_attach_mi(&azalia_hw_if, sc, NULL, &sc->dev); return; diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index 40ebb9bad7d..03c0c39b9e2 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmpci.c,v 1.46 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: cmpci.c,v 1.47 2022/02/16 06:21:18 anton Exp $ */ /* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */ /* @@ -392,7 +392,7 @@ cmpci_attach(struct device *parent, struct device *self, void *aux) sc->sc_dmat = pa->pa_dmat; - audio_attach_mi(&cmpci_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&cmpci_hw_if, sc, NULL, &sc->sc_dev); /* attach OPL device */ aa.type = AUDIODEV_TYPE_OPL; diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index f24d6d75dda..e75aa0c034e 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4280.c,v 1.54 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: cs4280.c,v 1.55 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */ /* @@ -548,7 +548,7 @@ cs4280_attachhook(struct device *self) AudioNcd, AudioNmute); cs4280_mixer_set_port(sc, &ctl); - audio_attach_mi(&cs4280_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&cs4280_hw_if, sc, NULL, &sc->sc_dev); #if NMIDI > 0 midi_attach_mi(&cs4280_midi_hw_if, sc, &sc->sc_dev); diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c index ac2ae6bccf4..b21149786b1 100644 --- a/sys/dev/pci/cs4281.c +++ b/sys/dev/pci/cs4281.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4281.c,v 1.39 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: cs4281.c,v 1.40 2022/02/16 06:21:19 anton Exp $ */ /* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */ /* @@ -327,7 +327,7 @@ cs4281_attach(struct device *parent, struct device *self, void *aux) printf("%s: ac97_attach failed\n", sc->sc_dev.dv_xname); return; } - audio_attach_mi(&cs4281_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&cs4281_hw_if, sc, NULL, &sc->sc_dev); #if NMIDI > 0 midi_attach_mi(&cs4281_midi_hw_if, sc, &sc->sc_dev); diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index 18662619337..e20114c4789 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.58 2020/01/11 09:09:09 cheloha Exp $ */ +/* $OpenBSD: eap.c,v 1.59 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -588,7 +588,7 @@ eap_attach(struct device *parent, struct device *self, void *aux) eap_hw_if = &eap1371_hw_if; } - audio_attach_mi(eap_hw_if, sc, &sc->sc_dev); + audio_attach_mi(eap_hw_if, sc, NULL, &sc->sc_dev); #if NMIDI > 0 sc->sc_mididev = midi_attach_mi(&eap_midi_hw_if, sc, &sc->sc_dev); #endif diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c index 35ae40dda02..792a9b449cc 100644 --- a/sys/dev/pci/emuxki.c +++ b/sys/dev/pci/emuxki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emuxki.c,v 1.55 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: emuxki.c,v 1.56 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */ /*- @@ -474,7 +474,7 @@ emuxki_attach(struct device *parent, struct device *self, void *aux) if (emuxki_scinit(sc, 0) || /* APS has no ac97 XXX */ (sc->sc_flags & EMUXKI_APS || emuxki_ac97_init(sc)) || - (sc->sc_audev = audio_attach_mi(&emuxki_hw_if, sc, self)) == NULL) { + (sc->sc_audev = audio_attach_mi(&emuxki_hw_if, sc, NULL, self)) == NULL) { emuxki_pci_shutdown(sc); return; } diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index c43bbf43ece..22ae8ea3cf1 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.81 2020/01/05 01:07:58 jsg Exp $ */ +/* $OpenBSD: envy.c,v 1.82 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov * @@ -1761,7 +1761,7 @@ envyattach(struct device *parent, struct device *self, void *aux) printf("%s: %s, %u inputs, %u outputs\n", DEVNAME(sc), sc->card->name, sc->card->nich, sc->card->noch); envy_reset(sc); - sc->audio = audio_attach_mi(&envy_hw_if, sc, &sc->dev); + sc->audio = audio_attach_mi(&envy_hw_if, sc, NULL, &sc->dev); #if NMIDI > 0 if (sc->card->nmidi > 0 && (!sc->isht || sc->eeprom[ENVY_EEPROM_CONF] & ENVY_CONF_MIDI)) { diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 286db17038b..7d3627d8862 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.35 2018/09/14 08:37:34 miko Exp $ */ +/* $OpenBSD: esa.c,v 1.36 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -1048,7 +1048,7 @@ esa_attach(struct device *parent, struct device *self, void *aux) sc->voice[i].parent = (struct device *)sc; sc->voice[i].index = i; sc->sc_audiodev[i] = - audio_attach_mi(&esa_hw_if, &sc->voice[i], &sc->sc_dev); + audio_attach_mi(&esa_hw_if, &sc->voice[i], NULL, &sc->sc_dev); } } diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index 3df0f89b01b..21e84e24b8b 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eso.c,v 1.47 2020/01/19 00:18:34 cheloha Exp $ */ +/* $OpenBSD: eso.c,v 1.48 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */ /* @@ -289,7 +289,7 @@ eso_attach(struct device *parent, struct device *self, void *aux) config_defer((struct device *)sc, eso_defer); } - audio_attach_mi(&eso_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&eso_hw_if, sc, NULL, &sc->sc_dev); aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index b07694ff71a..1c5aa781a8d 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fms.c,v 1.30 2016/12/20 15:31:00 ratchov Exp $ */ +/* $OpenBSD: fms.c,v 1.31 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */ /*- @@ -256,7 +256,7 @@ fms_attach(struct device *parent, struct device *self, void *aux) fms_set_port(sc, &ctl); } - audio_attach_mi(&fms_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&fms_hw_if, sc, NULL, &sc->sc_dev); aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index f3523120203..c5e6692bd9b 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.43 2018/04/11 04:48:31 ratchov Exp $ */ +/* $OpenBSD: maestro.c,v 1.44 2022/02/16 06:21:19 anton 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 @@ -727,7 +727,7 @@ maestro_attach(struct device *parent, struct device *self, void *aux) sc->record.mode = 0; /* Attach audio */ - audio_attach_mi(&maestro_hw_if, sc, &sc->dev); + audio_attach_mi(&maestro_hw_if, sc, NULL, &sc->dev); return; bad: diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c index 3548c09f2da..b01986863c6 100644 --- a/sys/dev/pci/neo.c +++ b/sys/dev/pci/neo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neo.c,v 1.34 2022/01/09 05:42:58 jsg Exp $ */ +/* $OpenBSD: neo.c,v 1.35 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 1999 Cameron Grant @@ -597,7 +597,7 @@ neo_attach(struct device *parent, struct device *self, void *aux) if ((error = ac97_attach(&sc->host_if)) != 0) return; - audio_attach_mi(&neo_hw_if, sc, &sc->dev); + audio_attach_mi(&neo_hw_if, sc, NULL, &sc->dev); return; } diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index 40e38941a0a..d402785fc2e 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sv.c,v 1.37 2022/02/02 03:55:29 jsg Exp $ */ +/* $OpenBSD: sv.c,v 1.38 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 1998 Constantine Paul Sapuntzakis @@ -357,7 +357,7 @@ sv_attach(struct device *parent, struct device *self, void *aux) sv_init_mixer(sc); - audio_attach_mi(&sv_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&sv_hw_if, sc, NULL, &sc->sc_dev); } #ifdef AUDIO_DEBUG diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 010665375d7..84fd5d8805b 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.56 2022/01/09 05:42:58 jsg Exp $ */ +/* $OpenBSD: yds.c,v 1.57 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -785,7 +785,7 @@ yds_attachhook(struct device *self) sc->sc_codec[0].codec_if, AudioCoutputs, AudioNmaster, NULL); yds_mixer_set_port(sc, &ctl); - audio_attach_mi(&yds_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&yds_hw_if, sc, NULL, &sc->sc_dev); /* Watch for power changes */ sc->suspend = DVACT_RESUME; diff --git a/sys/dev/sbus/cs4231.c b/sys/dev/sbus/cs4231.c index 959b9bee704..bb3e8138112 100644 --- a/sys/dev/sbus/cs4231.c +++ b/sys/dev/sbus/cs4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231.c,v 1.38 2017/01/04 07:33:14 ratchov Exp $ */ +/* $OpenBSD: cs4231.c,v 1.39 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -243,7 +243,7 @@ cs4231_attach(struct device *parent, struct device *self, void *aux) printf("\n"); - audio_attach_mi(&cs4231_sa_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&cs4231_sa_hw_if, sc, NULL, &sc->sc_dev); /* Default to speaker, unmuted, reasonable volume */ sc->sc_out_port = CSPORT_SPEAKER; diff --git a/sys/dev/tc/bba.c b/sys/dev/tc/bba.c index 41c7b43a8ce..1c774d5ef6e 100644 --- a/sys/dev/tc/bba.c +++ b/sys/dev/tc/bba.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bba.c,v 1.7 2016/09/19 06:46:44 ratchov Exp $ */ +/* $OpenBSD: bba.c,v 1.8 2022/02/16 06:21:19 anton Exp $ */ /* $NetBSD: bba.c,v 1.38 2011/06/04 01:27:57 tsutsui Exp $ */ /* * Copyright (c) 2011 Miodrag Vallat. @@ -229,7 +229,7 @@ bba_attach(struct device *parent, struct device *self, void *aux) ioasic_intr_establish(parent, ia->iada_cookie, IPL_AUDIO, bba_intr, sc, self->dv_xname); - audio_attach_mi(&bba_hw_if, sc, self); + audio_attach_mi(&bba_hw_if, sc, NULL, self); } void diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index 025892ddf04..f7afca68c8c 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.165 2022/01/28 07:11:14 guenther Exp $ */ +/* $OpenBSD: uaudio.c,v 1.166 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 2018 Alexandre Ratchov * @@ -3841,7 +3841,7 @@ uaudio_attach(struct device *parent, struct device *self, void *aux) /* print a nice uaudio attach line */ uaudio_print(sc); - audio_attach_mi(&uaudio_hw_if, sc, &sc->dev); + audio_attach_mi(&uaudio_hw_if, sc, NULL, &sc->dev); } int diff --git a/sys/dev/usb/utvfu.c b/sys/dev/usb/utvfu.c index 6f99460f1db..87e9bcee943 100644 --- a/sys/dev/usb/utvfu.c +++ b/sys/dev/usb/utvfu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utvfu.c,v 1.15 2021/11/28 14:10:32 mglocker Exp $ */ +/* $OpenBSD: utvfu.c,v 1.16 2022/02/16 06:21:19 anton Exp $ */ /* * Copyright (c) 2013 Lubomir Rintel * Copyright (c) 2013 Federico Simoncelli @@ -958,7 +958,7 @@ utvfu_attach(struct device *parent, struct device *self, void *aux) rw_init(&sc->sc_audio.rwlock, "audiorwl"); - sc->sc_audiodev = audio_attach_mi(&utvfu_au_hw_if, sc, &sc->sc_dev); + sc->sc_audiodev = audio_attach_mi(&utvfu_au_hw_if, sc, NULL, &sc->sc_dev); sc->sc_videodev = video_attach_mi(&utvfu_vid_hw_if, sc, &sc->sc_dev); }