diff options
| author | Christos Margiolis <christos@FreeBSD.org> | 2026-01-02 16:56:41 +0000 |
|---|---|---|
| committer | Christos Margiolis <christos@FreeBSD.org> | 2026-01-02 16:58:06 +0000 |
| commit | bafa8c951d8cfaec75e774af03d7ab6fadb448b9 (patch) | |
| tree | 177e61d29b6277f051019fa42d8f12536833b88b | |
| parent | b9db6c21287311b9e861893c065289d987a75804 (diff) | |
sound: Move sndstat out of pcm/
Needed by follow-up patches that will add sndstat support for midi/
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54140
| -rw-r--r-- | sys/dev/sound/pcm/sound.c | 1 | ||||
| -rw-r--r-- | sys/dev/sound/pcm/sound.h | 4 | ||||
| -rw-r--r-- | sys/dev/sound/sndstat.c (renamed from sys/dev/sound/pcm/sndstat.c) | 4 | ||||
| -rw-r--r-- | sys/dev/sound/sndstat.h | 37 | ||||
| -rw-r--r-- | sys/modules/sound/sound/Makefile | 3 |
5 files changed, 43 insertions, 6 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 29dac6b576ae..1e4b2eebdcaa 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -41,6 +41,7 @@ #include <dev/sound/pcm/ac97.h> #include <dev/sound/pcm/vchan.h> #include <dev/sound/pcm/dsp.h> +#include <dev/sound/sndstat.h> #include <sys/limits.h> #include <sys/sysctl.h> diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 3ba6eb3692ee..de9af6bd5324 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -66,7 +66,6 @@ #include <sys/poll.h> #include <sys/sbuf.h> #include <sys/soundcard.h> -#include <sys/sndstat.h> #include <sys/sysctl.h> #include <sys/kobj.h> #include <vm/vm.h> @@ -167,9 +166,6 @@ void *pcm_getdevinfo(device_t dev); int snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand, void *param, void **cookiep); -int sndstat_register(device_t dev, char *str); -int sndstat_unregister(device_t dev); - /* These are the function codes assigned to the children of sound cards. */ enum { SCF_PCM, diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/sndstat.c index 8f414e07757d..eee9e0b18108 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/sndstat.c @@ -40,13 +40,15 @@ #endif #include <sys/param.h> +#include <sys/dnv.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/nv.h> -#include <sys/dnv.h> +#include <sys/sndstat.h> #include <sys/sx.h> #include <dev/sound/pcm/sound.h> +#include <dev/sound/sndstat.h> #include "feeder_if.h" diff --git a/sys/dev/sound/sndstat.h b/sys/dev/sound/sndstat.h new file mode 100644 index 000000000000..d6735f74af31 --- /dev/null +++ b/sys/dev/sound/sndstat.h @@ -0,0 +1,37 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _SNDSTAT_H_ +#define _SNDSTAT_H_ + +int sndstat_register(device_t dev, char *str); +int sndstat_unregister(device_t dev); + +#endif /* _SNDSTAT_H_ */ diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile index 169b1a2730ec..4b38e614f689 100644 --- a/sys/modules/sound/sound/Makefile +++ b/sys/modules/sound/sound/Makefile @@ -15,8 +15,9 @@ SRCS+= feeder_eq_gen.h feeder_rate_gen.h snd_fxdiv_gen.h SRCS+= mpu_if.h mpufoi_if.h SRCS+= mpu_if.c mpufoi_if.c SRCS+= ac97.c buffer.c channel.c dsp.c -SRCS+= mixer.c sndstat.c sound.c vchan.c +SRCS+= mixer.c sound.c vchan.c SRCS+= midi.c mpu401.c +SRCS+= sndstat.c feeder_eq_gen.h: ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk ${AWK} -f ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > ${.TARGET} |
