git: 3ba480f41801 - main - sound: Retire SND_DEV_*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Jul 2025 13:09:10 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=3ba480f4180149da9ec7dc8869df2a51335b66d0
commit 3ba480f4180149da9ec7dc8869df2a51335b66d0
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-07-06 13:08:50 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-07-06 13:08:50 +0000
sound: Retire SND_DEV_*
Specifying unit numbers is not needed anymore, and half of those weren't
used anymore in the first place.
Sponsored by: The FreeBSD Foundation
Reviewed by: adrian, markj, emaste
Differential Revision: https://reviews.freebsd.org/D50690
---
sys/dev/sound/pcm/mixer.c | 4 ++--
sys/dev/sound/pcm/sndstat.c | 4 ++--
sys/dev/sound/pcm/sound.h | 7 -------
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 092af3298f0e..f281dff36248 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -750,8 +750,8 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
mixer_setrecsrc(m, 0); /* Set default input. */
- pdev = make_dev(&mixer_cdevsw, SND_DEV_CTL, UID_ROOT, GID_WHEEL, 0666,
- "mixer%d", unit);
+ pdev = make_dev(&mixer_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "mixer%d",
+ unit);
pdev->si_drv1 = m;
snddev->mixer_dev = pdev;
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index a11c6f53f58b..51d0fb3bb686 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -1438,8 +1438,8 @@ static void
sndstat_sysinit(void *p)
{
sx_init(&sndstat_lock, "sndstat lock");
- sndstat_dev = make_dev(&sndstat_cdevsw, SND_DEV_STATUS,
- UID_ROOT, GID_WHEEL, 0644, "sndstat");
+ sndstat_dev = make_dev(&sndstat_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644,
+ "sndstat");
}
SYSINIT(sndstat_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST, sndstat_sysinit, NULL);
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index 5256916aaab3..6bd435d0ea25 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -148,13 +148,6 @@ struct snd_mixer;
#define RANGE(var, low, high) (var) = \
(((var)<(low))? (low) : ((var)>(high))? (high) : (var))
-enum {
- SND_DEV_CTL = 0, /* Control port /dev/mixer */
- SND_DEV_MIDIN, /* Raw midi access */
- SND_DEV_DSP, /* Digitized voice /dev/dsp */
- SND_DEV_STATUS, /* /dev/sndstat */
-};
-
#define DSP_DEFAULT_SPEED 8000
extern int snd_unit;