-/* $OpenBSD: harmony.c,v 1.37 2022/03/13 08:04:38 mpi Exp $ */
+/* $OpenBSD: harmony.c,v 1.38 2022/03/21 19:22:39 miod Exp $ */
/*
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
int harmony_trigger_input(void *, void *, void *, int,
void (*intr)(void *), void *, struct audio_params *);
-struct audio_hw_if harmony_sa_hw_if = {
+const struct audio_hw_if harmony_sa_hw_if = {
harmony_open,
harmony_close,
harmony_set_params,
-/* $OpenBSD: nec86.c,v 1.4 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: nec86.c,v 1.5 2022/03/21 19:22:39 miod Exp $ */
/* $NecBSD: nec86.c,v 1.11 1999/07/23 11:04:39 honda Exp $ */
/* $NetBSD$ */
* Define our interface to the higher level audio driver.
*/
-struct audio_hw_if nec86_hw_if = {
+const struct audio_hw_if nec86_hw_if = {
.open = nec86hw_open,
.close = nec86hw_close,
.set_params = nec86hw_set_params,
-/* $OpenBSD: nec86var.h,v 1.1 2014/12/28 13:03:18 aoyama Exp $ */
+/* $OpenBSD: nec86var.h,v 1.2 2022/03/21 19:22:39 miod Exp $ */
/* $NecBSD: nec86var.h,v 1.6 1998/03/14 07:04:57 kmatsuda Exp $ */
/* $NetBSD$ */
int sc_intlevel;
};
-extern struct audio_hw_if nec86_hw_if;
+extern const struct audio_hw_if nec86_hw_if;
int nec86_probesubr(bus_space_tag_t, bus_space_handle_t,
bus_space_handle_t);
void nec86_attachsubr(struct nec86_softc *);
-/* $OpenBSD: aoa.c,v 1.13 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: aoa.c,v 1.14 2022/03/21 19:22:39 miod Exp $ */
/*-
* Copyright (c) 2005 Tsubai Masanari. All rights reserved.
NULL, "aoa", DV_DULL
};
-struct audio_hw_if aoa_hw_if = {
+const struct audio_hw_if aoa_hw_if = {
i2s_open,
i2s_close,
i2s_set_params,
-/* $OpenBSD: awacs.c,v 1.36 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: awacs.c,v 1.37 2022/03/21 19:22:39 miod Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
NULL, "awacs", DV_DULL
};
-struct audio_hw_if awacs_hw_if = {
+const struct audio_hw_if awacs_hw_if = {
awacs_open,
awacs_close,
awacs_set_params,
-/* $OpenBSD: daca.c,v 1.12 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: daca.c,v 1.13 2022/03/21 19:22:39 miod Exp $ */
/*-
* Copyright (c) 2002,2003 Tsubai Masanari. All rights reserved.
NULL, "daca", DV_DULL
};
-struct audio_hw_if daca_hw_if = {
+const struct audio_hw_if daca_hw_if = {
i2s_open,
i2s_close,
i2s_set_params,
-/* $OpenBSD: onyx.c,v 1.14 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: onyx.c,v 1.15 2022/03/21 19:22:39 miod Exp $ */
/*-
* Copyright (c) 2005 Tsubai Masanari. All rights reserved.
NULL, "onyx", DV_DULL
};
-struct audio_hw_if onyx_hw_if = {
+const struct audio_hw_if onyx_hw_if = {
i2s_open,
i2s_close,
i2s_set_params,
-/* $OpenBSD: snapper.c,v 1.41 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: snapper.c,v 1.42 2022/03/21 19:22:39 miod Exp $ */
/* $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
NULL, "snapper", DV_DULL
};
-struct audio_hw_if snapper_hw_if = {
+const struct audio_hw_if snapper_hw_if = {
i2s_open,
i2s_close,
i2s_set_params,
-/* $OpenBSD: tumbler.c,v 1.11 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: tumbler.c,v 1.12 2022/03/21 19:22:39 miod Exp $ */
/*-
* Copyright (c) 2001,2003 Tsubai Masanari. All rights reserved.
NULL, "tumbler", DV_DULL
};
-struct audio_hw_if tumbler_hw_if = {
+const struct audio_hw_if tumbler_hw_if = {
i2s_open,
i2s_close,
i2s_set_params,
-/* $OpenBSD: ce4231.c,v 1.38 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: ce4231.c,v 1.39 2022/03/21 19:22:39 miod Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
int ce4231_trigger_input(void *, void *, void *, int,
void (*intr)(void *), void *arg, struct audio_params *);
-struct audio_hw_if ce4231_sa_hw_if = {
+const struct audio_hw_if ce4231_sa_hw_if = {
ce4231_open,
ce4231_close,
ce4231_set_params,
-/* $OpenBSD: audio.c,v 1.197 2022/02/22 07:34:06 visa Exp $ */
+/* $OpenBSD: audio.c,v 1.198 2022/03/21 19:22:39 miod Exp $ */
/*
* Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org>
*
*/
struct audio_softc {
struct device dev;
- struct audio_hw_if *ops; /* driver funcs */
+ const struct audio_hw_if *ops; /* driver funcs */
void *cookie; /* wskbd cookie */
void *arg; /* first arg to driver funcs */
int mode; /* bitmask of AUMODE_* */
{
struct audio_softc *sc = (void *)self;
struct audio_attach_args *sa = aux;
- struct audio_hw_if *ops = sa->hwif;
+ const struct audio_hw_if *ops = sa->hwif;
struct mixer_devinfo *mi;
struct mixer_ctrl *ent;
void *arg = sa->hdl;
}
struct device *
-audio_attach_mi(struct audio_hw_if *ops, void *arg, void *cookie, struct device *dev)
+audio_attach_mi(const struct audio_hw_if *ops, void *arg, void *cookie,
+ struct device *dev)
{
struct audio_attach_args aa;
-/* $OpenBSD: audio_if.h,v 1.37 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: audio_if.h,v 1.38 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: audio_if.h,v 1.24 1998/01/10 14:07:25 tv Exp $ */
/*
struct audio_attach_args {
int type;
- void *hwif; /* either audio_hw_if * or midi_hw_if * */
+ const void *hwif; /* either audio_hw_if * or midi_hw_if * */
void *hdl;
void *cookie;
};
#define AUDIODEV_TYPE_RADIO 4
/* Attach the MI driver(s) to the MD driver. */
-struct device *audio_attach_mi(struct audio_hw_if *, void *, void *, struct device *);
+struct device *audio_attach_mi(const 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);
-/* $OpenBSD: es8316ac.c,v 1.1 2020/06/11 00:04:28 patrick Exp $ */
+/* $OpenBSD: es8316ac.c,v 1.2 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: es8316ac.c,v 1.2 2020/01/03 01:00:08 jmcneill Exp $ */
/*-
* Copyright (c) 2020 Jared McNeill <jmcneill@invisible.ca>
int escodec_get_port(void *, mixer_ctrl_t *);
int escodec_query_devinfo(void *, mixer_devinfo_t *);
-struct audio_hw_if escodec_hw_if = {
+const struct audio_hw_if escodec_hw_if = {
.set_port = escodec_set_port,
.get_port = escodec_get_port,
.query_devinfo = escodec_query_devinfo,
-/* $OpenBSD: graphaudio.c,v 1.2 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: graphaudio.c,v 1.3 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
int graphaudio_halt_output(void *);
int graphaudio_halt_input(void *);
-struct audio_hw_if graphaudio_hw_if = {
+const struct audio_hw_if graphaudio_hw_if = {
.open = graphaudio_open,
.close = graphaudio_close,
.set_params = graphaudio_set_params,
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error;
dai = sc->sc_dai_cpu;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
dai = sc->sc_dai_codec;
hwif = dai->dd_hw_if;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
uint32_t rate;
int error;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->allocm)
return hwif->allocm(dai->dd_cookie,
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->freem)
hwif->freem(dai->dd_cookie, addr, type);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->set_port)
return hwif->set_port(dai->dd_cookie, cp);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->get_port)
return hwif->get_port(dai->dd_cookie, cp);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->query_devinfo)
return hwif->query_devinfo(dai->dd_cookie, dip);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->get_props)
return hwif->get_props(dai->dd_cookie);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->round_blocksize)
return hwif->round_blocksize(dai->dd_cookie, block);
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->round_buffersize)
return hwif->round_buffersize(dai->dd_cookie,
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error;
dai = sc->sc_dai_codec;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error;
dai = sc->sc_dai_codec;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
dai = sc->sc_dai_codec;
hwif = dai->dd_hw_if;
{
struct graphaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
dai = sc->sc_dai_codec;
hwif = dai->dd_hw_if;
-/* $OpenBSD: rkiis.c,v 1.1 2020/06/11 00:02:08 patrick Exp $ */
+/* $OpenBSD: rkiis.c,v 1.2 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: rk_i2s.c,v 1.3 2020/02/29 05:51:10 isaki Exp $ */
/*-
* Copyright (c) 2019 Jared McNeill <jmcneill@invisible.ca>
struct dai_device sc_dai;
};
-struct audio_hw_if rkiis_hw_if = {
+const struct audio_hw_if rkiis_hw_if = {
.set_params = rkiis_set_params,
.get_props = rkiis_get_props,
.allocm = rkiis_allocm,
-/* $OpenBSD: simpleamp.c,v 1.2 2022/02/14 00:53:40 jsg Exp $ */
+/* $OpenBSD: simpleamp.c,v 1.3 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
*
uint32_t sc_vcc;
};
-struct audio_hw_if simpleamp_hw_if = {
+const struct audio_hw_if simpleamp_hw_if = {
.open = simpleamp_open,
.close = simpleamp_close,
};
-/* $OpenBSD: simpleaudio.c,v 1.3 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: simpleaudio.c,v 1.4 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
*
int simpleaudio_halt_output(void *);
int simpleaudio_halt_input(void *);
-struct audio_hw_if simpleaudio_hw_if = {
+const struct audio_hw_if simpleaudio_hw_if = {
.open = simpleaudio_open,
.close = simpleaudio_close,
.set_params = simpleaudio_set_params,
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error, i;
dai = sc->sc_dai_cpu;
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int i;
for (i = 0; i < sc->sc_dai_naux; i++) {
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
uint32_t rate;
int error;
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->allocm)
return hwif->allocm(dai->dd_cookie,
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->freem)
hwif->freem(dai->dd_cookie, addr, type);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->set_port)
return hwif->set_port(dai->dd_cookie, cp);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->get_port)
return hwif->get_port(dai->dd_cookie, cp);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_codec;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->query_devinfo)
return hwif->query_devinfo(dai->dd_cookie, dip);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->get_props)
return hwif->get_props(dai->dd_cookie);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->round_blocksize)
return hwif->round_blocksize(dai->dd_cookie, block);
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai = sc->sc_dai_cpu;
- struct audio_hw_if *hwif = dai->dd_hw_if;
+ const struct audio_hw_if *hwif = dai->dd_hw_if;
if (hwif->round_buffersize)
return hwif->round_buffersize(dai->dd_cookie,
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error, i;
for (i = 0; i < sc->sc_dai_naux; i++) {
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int error, i;
for (i = 0; i < sc->sc_dai_naux; i++) {
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int i;
for (i = 0; i < sc->sc_dai_naux; i++) {
{
struct simpleaudio_softc *sc = cookie;
struct dai_device *dai;
- struct audio_hw_if *hwif;
+ const struct audio_hw_if *hwif;
int i;
for (i = 0; i < sc->sc_dai_naux; i++) {
-/* $OpenBSD: tascodec.c,v 1.2 2022/02/14 14:57:00 kettenis Exp $ */
+/* $OpenBSD: tascodec.c,v 1.3 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
void (*)(void *), void *, struct audio_params *);
int tascodec_halt_output(void *);
-struct audio_hw_if tascodec_hw_if = {
+const struct audio_hw_if tascodec_hw_if = {
.set_port = tascodec_set_port,
.get_port = tascodec_get_port,
.query_devinfo = tascodec_query_devinfo,
-/* $OpenBSD: arcofi.c,v 1.18 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: arcofi.c,v 1.19 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2011 Miodrag Vallat.
int arcofi_start_input(void *, void *, int, void (*)(void *), void *);
int arcofi_start_output(void *, void *, int, void (*)(void *), void *);
-/* const */ struct audio_hw_if arcofi_hw_if = {
+const struct audio_hw_if arcofi_hw_if = {
.open = arcofi_open,
.close = arcofi_close,
.set_params = arcofi_set_params,
-/* $OpenBSD: mpuvar.h,v 1.6 2008/06/26 05:42:15 ray Exp $ */
+/* $OpenBSD: mpuvar.h,v 1.7 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: mpu401var.h,v 1.3 1998/11/25 22:17:06 augustss Exp $ */
/*
void *arg; /* arg for intr() */
};
-extern struct midi_hw_if mpu_midi_hw_if;
+extern const struct midi_hw_if mpu_midi_hw_if;
int mpu_intr(void *);
int mpu_find(void *);
-/* $OpenBSD: ess.c,v 1.27 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: ess.c,v 1.28 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */
/*
* Define our interface to the higher level audio driver.
*/
-struct audio_hw_if ess_1788_hw_if = {
+const struct audio_hw_if ess_1788_hw_if = {
ess_open,
ess_1788_close,
ess_set_params,
ess_audio1_trigger_input
};
-struct audio_hw_if ess_1888_hw_if = {
+const struct audio_hw_if ess_1888_hw_if = {
ess_open,
ess_1888_close,
ess_set_params,
-/* $OpenBSD: gus.c,v 1.49 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: gus.c,v 1.50 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
/*
* Interface to higher level audio driver
*/
-struct audio_hw_if gus_hw_if = {
+const struct audio_hw_if gus_hw_if = {
gusopen,
gusclose,
gus_set_params,
NULL
};
-static struct audio_hw_if gusmax_hw_if = {
+const static struct audio_hw_if gusmax_hw_if = {
gusmaxopen,
gusmax_close,
gusmax_set_params,
sc->sc_codec.parent = sc;
sc->sc_codec.sc_drq = sc->sc_recdrq;
sc->sc_codec.sc_recdrq = sc->sc_drq;
- gus_hw_if = gusmax_hw_if;
/* enable line in and mic in the GUS mixer; the codec chip
will do the real mixing for them. */
sc->sc_mixcontrol &= ~GUSMASK_LINE_IN; /* 0 enables. */
* Attach to the generic audio layer
*/
- audio_attach_mi(&gus_hw_if, HAS_CODEC(sc) ? (void *)&sc->sc_codec :
- (void *)sc, NULL, &sc->sc_dev);
+ if (HAS_CODEC(sc)) {
+ audio_attach_mi(&gusmax_hw_if, (void *)&sc->sc_codec, NULL,
+ &sc->sc_dev);
+ } else {
+ audio_attach_mi(&gus_hw_if, (void *)sc, NULL, &sc->sc_dev);
+ }
}
/*
-/* $OpenBSD: gusvar.h,v 1.10 2016/09/19 06:46:44 ratchov Exp $ */
+/* $OpenBSD: gusvar.h,v 1.11 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
#define splgus splaudio
-extern struct audio_hw_if gus_hw_if;
+extern const struct audio_hw_if gus_hw_if;
#define FLIP_REV 5 /* This rev has flipped mixer chans */
-/* $OpenBSD: mpu401.c,v 1.16 2021/03/07 06:17:04 jsg Exp $ */
+/* $OpenBSD: mpu401.c,v 1.17 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: mpu401.c,v 1.3 1998/11/25 22:17:06 augustss Exp $ */
/*
NULL, "mpu", DV_DULL
};
-struct midi_hw_if mpu_midi_hw_if = {
+const struct midi_hw_if mpu_midi_hw_if = {
mpu_open,
mpu_close,
mpu_output,
-/* $OpenBSD: pas.c,v 1.31 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: pas.c,v 1.32 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: pas.c,v 1.37 1998/01/12 09:43:43 thorpej Exp $ */
/*
* Define our interface to the higher level audio driver.
*/
-struct audio_hw_if pas_hw_if = {
+const struct audio_hw_if pas_hw_if = {
sbdsp_open,
sbdsp_close,
sbdsp_set_params,
-/* $OpenBSD: sb.c,v 1.31 2022/02/16 06:21:18 anton Exp $ */
+/* $OpenBSD: sb.c,v 1.32 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: sb.c,v 1.57 1998/01/12 09:43:46 thorpej Exp $ */
/*
int sb_mpu401_output(void *, int);
void sb_mpu401_getinfo(void *, struct midi_info *);
-struct midi_hw_if sb_midi_hw_if = {
+const struct midi_hw_if sb_midi_hw_if = {
sbdsp_midi_open,
sbdsp_midi_close,
sbdsp_midi_output,
0, /* ioctl */
};
-struct midi_hw_if sb_mpu401_hw_if = {
+const struct midi_hw_if sb_mpu401_hw_if = {
sb_mpu401_open,
sb_mpu401_close,
sb_mpu401_output,
* Define our interface to the higher level audio driver.
*/
-struct audio_hw_if sb_hw_if = {
+const struct audio_hw_if sb_hw_if = {
sbdsp_open,
sbdsp_close,
sbdsp_set_params,
{
struct audio_attach_args arg;
#if NMIDI > 0
- struct midi_hw_if *mhw = &sb_midi_hw_if;
+ const struct midi_hw_if *mhw = &sb_midi_hw_if;
#endif
sc->sc_ih = isa_intr_establish(sc->sc_ic, sc->sc_irq,
-/* $OpenBSD: midi.c,v 1.52 2021/10/30 12:48:11 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.53 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2003, 2004 Alexandre Ratchov
struct midi_info mi;
struct midi_softc *sc = (struct midi_softc *)self;
struct audio_attach_args *sa = (struct audio_attach_args *)aux;
- struct midi_hw_if *hwif = sa->hwif;
+ const struct midi_hw_if *hwif = sa->hwif;
void *hdl = sa->hdl;
#ifdef DIAGNOSTIC
}
struct device *
-midi_attach_mi(struct midi_hw_if *hwif, void *hdl, struct device *dev)
+midi_attach_mi(const struct midi_hw_if *hwif, void *hdl, struct device *dev)
{
struct audio_attach_args arg;
-/* $OpenBSD: midi_if.h,v 1.9 2015/05/16 10:04:20 ratchov Exp $ */
+/* $OpenBSD: midi_if.h,v 1.10 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: midi_if.h,v 1.3 1998/11/25 22:17:07 augustss Exp $ */
/*
int (*ioctl)(void *, u_long, caddr_t, int, struct proc *);
};
-struct device *midi_attach_mi(struct midi_hw_if *, void *, struct device *);
+struct device *midi_attach_mi(const struct midi_hw_if *, void *,
+ struct device *);
#endif /* _SYS_DEV_MIDI_IF_H_ */
-/* $OpenBSD: midivar.h,v 1.12 2021/10/30 12:26:26 ratchov Exp $ */
+/* $OpenBSD: midivar.h,v 1.13 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2003, 2004 Alexandre Ratchov
struct midi_softc {
struct device dev;
- struct midi_hw_if *hw_if;
+ const struct midi_hw_if *hw_if;
void *hw_hdl;
int isbusy; /* concerns only the output */
int flags; /* open flags */
-/* $OpenBSD: ofw_misc.h,v 1.23 2022/03/02 12:00:46 kettenis Exp $ */
+/* $OpenBSD: ofw_misc.h,v 1.24 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2017-2021 Mark Kettenis
*
struct dai_device {
int dd_node;
void *dd_cookie;
- void *dd_hw_if;
+ const void *dd_hw_if;
int (*dd_set_format)(void *, uint32_t, uint32_t, uint32_t);
int (*dd_set_sysclk)(void *, uint32_t);
-/* $OpenBSD: auacer.c,v 1.24 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: auacer.c,v 1.25 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */
/*-
static void auacer_reset(struct auacer_softc *sc);
-struct audio_hw_if auacer_hw_if = {
+const struct audio_hw_if auacer_hw_if = {
auacer_open,
auacer_close,
auacer_set_params,
-/* $OpenBSD: auglx.c,v 1.19 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: auglx.c,v 1.20 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
int auglx_allocmem(struct auglx_softc *, size_t, size_t, struct auglx_dma *);
void auglx_freemem(struct auglx_softc *, struct auglx_dma *);
-struct audio_hw_if auglx_hw_if = {
+const struct audio_hw_if auglx_hw_if = {
auglx_open,
auglx_close,
auglx_set_params,
-/* $OpenBSD: auich.c,v 1.115 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: auich.c,v 1.116 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
void auich_resume(struct auich_softc *);
-struct audio_hw_if auich_hw_if = {
+const struct audio_hw_if auich_hw_if = {
auich_open,
auich_close,
auich_set_params,
-/* $OpenBSD: auixp.c,v 1.47 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: auixp.c,v 1.48 2022/03/21 19:22:40 miod Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
#define DPRINTF(x)
#endif
-struct audio_hw_if auixp_hw_if = {
+const struct audio_hw_if auixp_hw_if = {
auixp_open,
auixp_close,
auixp_set_params,
-/* $OpenBSD: autri.c,v 1.46 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: autri.c,v 1.47 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
int autri_get_portnum_by_name(struct autri_softc *, char *, char *, char *);
-struct audio_hw_if autri_hw_if = {
+const struct audio_hw_if autri_hw_if = {
autri_open,
autri_close,
autri_set_params,
void (*)(void *), void *);
int autri_midi_output(void *, int);
-struct midi_hw_if autri_midi_hw_if = {
+const struct midi_hw_if autri_midi_hw_if = {
autri_midi_open,
autri_midi_close,
autri_midi_output,
-/* $OpenBSD: auvia.c,v 1.62 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: auvia.c,v 1.63 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */
/*-
#define TIMEOUT 50
-struct audio_hw_if auvia_hw_if = {
+const struct audio_hw_if auvia_hw_if = {
auvia_open,
auvia_close,
auvia_set_params,
-/* $OpenBSD: azalia.c,v 1.270 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: azalia.c,v 1.271 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
NULL, "azalia", DV_DULL, CD_SKIPHIBERNATE
};
-struct audio_hw_if azalia_hw_if = {
+const struct audio_hw_if azalia_hw_if = {
azalia_open,
azalia_close,
azalia_set_params,
-/* $OpenBSD: bktr_os.c,v 1.35 2022/03/11 18:00:53 mpi Exp $ */
+/* $OpenBSD: bktr_os.c,v 1.36 2022/03/21 19:22:41 miod Exp $ */
/* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */
/*
int bktr_get_info(void *, struct radio_info *);
int bktr_set_info(void *, struct radio_info *);
-struct radio_hw_if bktr_hw_if = {
+const struct radio_hw_if bktr_hw_if = {
NULL, /* open */
NULL, /* close */
bktr_get_info,
-/* $OpenBSD: cmpci.c,v 1.48 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: cmpci.c,v 1.49 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */
/*
void (*)(void *), void *,
struct audio_params *);
-struct audio_hw_if cmpci_hw_if = {
+const struct audio_hw_if cmpci_hw_if = {
cmpci_open, /* open */
cmpci_close, /* close */
cmpci_set_params, /* set_params */
-/* $OpenBSD: cs4280.c,v 1.56 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: cs4280.c,v 1.57 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
int cs4280_midi_output(void *, int);
#endif
-struct audio_hw_if cs4280_hw_if = {
+const struct audio_hw_if cs4280_hw_if = {
cs4280_open,
cs4280_close,
cs4280_set_params,
};
#if NMIDI > 0
-struct midi_hw_if cs4280_midi_hw_if = {
+const struct midi_hw_if cs4280_midi_hw_if = {
cs4280_midi_open,
cs4280_midi_close,
cs4280_midi_output,
-/* $OpenBSD: cs4281.c,v 1.41 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: cs4281.c,v 1.42 2022/03/21 19:22:41 miod Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
#define DPRINTFN(n,x)
#endif
-struct audio_hw_if cs4281_hw_if = {
+const struct audio_hw_if cs4281_hw_if = {
cs4281_open,
cs4281_close,
cs4281_set_params,
void (*)(void *), void *);
int cs4281_midi_output(void *, int);
-struct midi_hw_if cs4281_midi_hw_if = {
+const struct midi_hw_if cs4281_midi_hw_if = {
cs4281_midi_open,
cs4281_midi_close,
cs4281_midi_output,
-/* $OpenBSD: eap.c,v 1.60 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: eap.c,v 1.61 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
int eap_midi_output(void *, int);
#endif
-struct audio_hw_if eap1370_hw_if = {
+const struct audio_hw_if eap1370_hw_if = {
eap_open,
eap_close,
eap_set_params,
eap_trigger_input
};
-struct audio_hw_if eap1371_hw_if = {
+const struct audio_hw_if eap1371_hw_if = {
eap_open,
eap_close,
eap_set_params,
};
#if NMIDI > 0
-struct midi_hw_if eap_midi_hw_if = {
+const struct midi_hw_if eap_midi_hw_if = {
eap_midi_open,
eap_midi_close,
eap_midi_output,
struct eap_softc *sc = (struct eap_softc *)self;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
pci_chipset_tag_t pc = pa->pa_pc;
- struct audio_hw_if *eap_hw_if;
+ const struct audio_hw_if *eap_hw_if;
char const *intrstr;
pci_intr_handle_t ih;
mixer_ctrl_t ctl;
-/* $OpenBSD: emuxki.c,v 1.57 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: emuxki.c,v 1.58 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
emuxki_activate
};
-struct audio_hw_if emuxki_hw_if = {
+const struct audio_hw_if emuxki_hw_if = {
emuxki_open,
emuxki_close,
emuxki_set_params,
-/* $OpenBSD: envy.c,v 1.83 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: envy.c,v 1.84 2022/03/21 19:22:41 miod Exp $ */
/*
* Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org>
*
NULL, "envy", DV_DULL
};
-struct audio_hw_if envy_hw_if = {
+const struct audio_hw_if envy_hw_if = {
envy_open, /* open */
envy_close, /* close */
envy_set_params, /* set_params */
};
#if NMIDI > 0
-struct midi_hw_if envy_midi_hw_if = {
+const struct midi_hw_if envy_midi_hw_if = {
envy_midi_open,
envy_midi_close,
envy_midi_output,
-/* $OpenBSD: esa.c,v 1.37 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: esa.c,v 1.38 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
void esa_suspend(struct esa_softc *);
void esa_resume(struct esa_softc *);
-struct audio_hw_if esa_hw_if = {
+const struct audio_hw_if esa_hw_if = {
esa_open,
esa_close,
esa_set_params,
-/* $OpenBSD: eso.c,v 1.49 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: eso.c,v 1.50 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */
/*
void (*)(void *), void *, struct audio_params *);
void eso_setup(struct eso_softc *, int, int);
-struct audio_hw_if eso_hw_if = {
+const struct audio_hw_if eso_hw_if = {
eso_open,
eso_close,
eso_set_params,
-/* $OpenBSD: fms.c,v 1.32 2022/03/11 18:00:45 mpi Exp $ */
+/* $OpenBSD: fms.c,v 1.33 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
sizeof (struct fms_softc), fms_match, fms_attach
};
-struct audio_hw_if fms_hw_if = {
+const struct audio_hw_if fms_hw_if = {
fms_open,
fms_close,
fms_set_params,
-/* $OpenBSD: fmsradio.c,v 1.7 2021/11/23 00:17:59 jsg Exp $ */
+/* $OpenBSD: fmsradio.c,v 1.8 2022/03/21 19:22:41 miod Exp $ */
/*
* Copyright (c) 2002 Vladimir Popov <jumbo@narod.ru>
int fmsradio_set_info(void *, struct radio_info *);
int fmsradio_search(void *, int);
-struct radio_hw_if fmsradio_hw_if = {
+const struct radio_hw_if fmsradio_hw_if = {
NULL, /* open */
NULL, /* close */
fmsradio_get_info,
-/* $OpenBSD: maestro.c,v 1.45 2022/03/11 18:00:50 mpi Exp $ */
+/* $OpenBSD: maestro.c,v 1.46 2022/03/21 19:22:41 miod 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
NULL, maestro_activate
};
-struct audio_hw_if maestro_hw_if = {
+const struct audio_hw_if maestro_hw_if = {
maestro_open,
maestro_close,
maestro_set_params,
-/* $OpenBSD: neo.c,v 1.36 2022/03/11 18:00:51 mpi Exp $ */
+/* $OpenBSD: neo.c,v 1.37 2022/03/21 19:22:41 miod Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
/* -------------------------------------------------------------------- */
-struct audio_hw_if neo_hw_if = {
+const struct audio_hw_if neo_hw_if = {
neo_open,
neo_close,
neo_set_params,
-/* $OpenBSD: sv.c,v 1.39 2022/03/11 18:00:51 mpi Exp $ */
+/* $OpenBSD: sv.c,v 1.40 2022/03/21 19:22:41 miod Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
void sv_dumpregs(struct sv_softc *sc);
-struct audio_hw_if sv_hw_if = {
+const struct audio_hw_if sv_hw_if = {
sv_open,
sv_close,
sv_set_params,
-/* $OpenBSD: yds.c,v 1.58 2022/03/11 18:00:52 mpi Exp $ */
+/* $OpenBSD: yds.c,v 1.59 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
#define YDS_DUMP_PLAY_SLOT(n,sc,bank)
#endif /* AUDIO_DEBUG */
-static struct audio_hw_if yds_hw_if = {
+const static struct audio_hw_if yds_hw_if = {
yds_open,
yds_close,
yds_set_params,
-/* $OpenBSD: radio.c,v 1.11 2016/09/22 00:47:19 jsg Exp $ */
+/* $OpenBSD: radio.c,v 1.12 2022/03/21 19:22:40 miod Exp $ */
/* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */
/*
*/
struct device *
-radio_attach_mi(struct radio_hw_if *rhwp, void *hdlp, struct device *dev)
+radio_attach_mi(const struct radio_hw_if *rhwp, void *hdlp, struct device *dev)
{
struct audio_attach_args arg;
-/* $OpenBSD: radio_if.h,v 1.3 2002/05/30 15:22:26 mickey Exp $ */
+/* $OpenBSD: radio_if.h,v 1.4 2022/03/21 19:22:40 miod Exp $ */
/* $RuOBSD: radio_if.h,v 1.6 2001/10/18 16:51:36 pva Exp $ */
/*
int (*search)(void *, int);
};
-struct device *radio_attach_mi(struct radio_hw_if *, void *, struct device *);
+struct device *radio_attach_mi(const struct radio_hw_if *, void *,
+ struct device *);
#endif /* _SYS_DEV_RADIO_IF_H */
-/* $OpenBSD: radiovar.h,v 1.3 2002/01/05 02:23:03 mickey Exp $ */
+/* $OpenBSD: radiovar.h,v 1.4 2022/03/21 19:22:40 miod Exp $ */
/* $RuOBSD: radiovar.h,v 1.3 2001/09/29 17:10:16 pva Exp $ */
/*
struct device dev;
void *hw_hdl; /* hardware driver handle */
struct device *sc_dev; /* hardware device struct */
- struct radio_hw_if *hw_if; /* hardware interface */
+ const struct radio_hw_if *hw_if; /* hardware interface */
char sc_dying; /* device detached */
};
-/* $OpenBSD: cs4231.c,v 1.40 2022/03/13 13:34:54 mpi Exp $ */
+/* $OpenBSD: cs4231.c,v 1.41 2022/03/21 19:22:41 miod Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
int cs4231_trigger_input(void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *);
-struct audio_hw_if cs4231_sa_hw_if = {
+const struct audio_hw_if cs4231_sa_hw_if = {
cs4231_open,
cs4231_close,
cs4231_set_params,
-/* $OpenBSD: bba.c,v 1.8 2022/02/16 06:21:19 anton Exp $ */
+/* $OpenBSD: bba.c,v 1.9 2022/03/21 19:22:41 miod Exp $ */
/* $NetBSD: bba.c,v 1.38 2011/06/04 01:27:57 tsutsui Exp $ */
/*
* Copyright (c) 2011 Miodrag Vallat.
int bba_trigger_input(void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *);
-struct audio_hw_if bba_hw_if = {
+const struct audio_hw_if bba_hw_if = {
am7930_open,
am7930_close,
am7930_set_params,
-/* $OpenBSD: uaudio.c,v 1.168 2022/02/21 14:21:58 jsg Exp $ */
+/* $OpenBSD: uaudio.c,v 1.169 2022/03/21 19:22:42 miod Exp $ */
/*
* Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org>
*
sizeof(struct uaudio_softc), uaudio_match, uaudio_attach, uaudio_detach
};
-struct audio_hw_if uaudio_hw_if = {
+const struct audio_hw_if uaudio_hw_if = {
uaudio_open, /* open */
uaudio_close, /* close */
uaudio_set_params, /* set_params */
-/* $OpenBSD: udsbr.c,v 1.27 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: udsbr.c,v 1.28 2022/03/21 19:22:42 miod Exp $ */
/* $NetBSD: udsbr.c,v 1.7 2002/07/11 21:14:27 augustss Exp $ */
/*
int udsbr_get_info(void *, struct radio_info *);
int udsbr_set_info(void *, struct radio_info *);
-struct radio_hw_if udsbr_hw_if = {
+const struct radio_hw_if udsbr_hw_if = {
NULL, /* open */
NULL, /* close */
udsbr_get_info,
-/* $OpenBSD: umidi.c,v 1.54 2020/07/31 10:49:33 mglocker Exp $ */
+/* $OpenBSD: umidi.c,v 1.55 2022/03/21 19:22:42 miod Exp $ */
/* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
static int out_build_packet(int, struct umidi_packet *, uByte, u_char *);
-struct midi_hw_if umidi_hw_if = {
+const struct midi_hw_if umidi_hw_if = {
umidi_open,
umidi_close,
umidi_output,
-/* $OpenBSD: utvfu.c,v 1.16 2022/02/16 06:21:19 anton Exp $ */
+/* $OpenBSD: utvfu.c,v 1.17 2022/03/21 19:22:42 miod Exp $ */
/*
* Copyright (c) 2013 Lubomir Rintel
* Copyright (c) 2013 Federico Simoncelli
NULL
};
-struct video_hw_if utvfu_vid_hw_if = {
+const struct video_hw_if utvfu_vid_hw_if = {
utvfu_open, /* open */
utvfu_close, /* close */
utvfu_querycap, /* VIDIOC_QUERYCAP */
utvfu_start_read /* start stream for read */
};
-struct audio_hw_if utvfu_au_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,
-/* $OpenBSD: uvideo.c,v 1.215 2022/01/09 05:43:02 jsg Exp $ */
+/* $OpenBSD: uvideo.c,v 1.216 2022/03/21 19:22:42 miod Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
sizeof(struct uvideo_softc), uvideo_match, uvideo_attach, uvideo_detach
};
-struct video_hw_if uvideo_hw_if = {
+const struct video_hw_if uvideo_hw_if = {
uvideo_open, /* open */
uvideo_close, /* close */
uvideo_querycap, /* VIDIOC_QUERYCAP */
-/* $OpenBSD: video.c,v 1.54 2021/02/17 17:21:58 mglocker Exp $ */
+/* $OpenBSD: video.c,v 1.55 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
struct device dev;
void *hw_hdl; /* hardware driver handle */
struct device *sc_dev; /* hardware device struct */
- struct video_hw_if *hw_if; /* hardware interface */
+ const struct video_hw_if *hw_if; /* hardware interface */
char sc_dying; /* device detached */
struct process *sc_owner; /* owner process */
uint8_t sc_open; /* device opened */
* probed/attached to the hardware driver
*/
struct device *
-video_attach_mi(struct video_hw_if *rhwp, void *hdlp, struct device *dev)
+video_attach_mi(const struct video_hw_if *rhwp, void *hdlp, struct device *dev)
{
struct video_attach_args arg;
-/* $OpenBSD: video_if.h,v 1.18 2014/10/18 08:01:34 armani Exp $ */
+/* $OpenBSD: video_if.h,v 1.19 2022/03/21 19:22:40 miod Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
* Copyright (c) 2008 Marcus Glocker <mglocker@openbsd.org>
};
struct video_attach_args {
- void *hwif;
+ const void *hwif;
void *hdl;
};
-struct device *video_attach_mi(struct video_hw_if *, void *, struct device *);
+struct device *video_attach_mi(const struct video_hw_if *, void *,
+ struct device *);
#endif /* _SYS_DEV_VIDEO_IF_H */