git: b55adf9b261b - main - sound: Retire unused mixer functions

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Thu, 13 Nov 2025 12:53:25 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=b55adf9b261b91ddd3c7293720bbbbfb4ffe7066

commit b55adf9b261b91ddd3c7293720bbbbfb4ffe7066
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-11-13 12:53:18 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-11-13 12:53:18 +0000

    sound: Retire unused mixer functions
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/sound/pcm/mixer.c | 43 -------------------------------------------
 sys/dev/sound/pcm/mixer.h |  4 ----
 2 files changed, 47 deletions(-)

diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index f281dff36248..5fa3ff5cc83c 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -608,14 +608,6 @@ mix_getparent(struct snd_mixer *m, u_int32_t dev)
 	return m->parent[dev];
 }
 
-u_int32_t
-mix_getchild(struct snd_mixer *m, u_int32_t dev)
-{
-	if (m == NULL || dev >= SOUND_MIXER_NRDEVICES)
-		return 0;
-	return m->child[dev];
-}
-
 u_int32_t
 mix_getdevs(struct snd_mixer *m)
 {
@@ -1024,14 +1016,6 @@ mix_getrecsrc(struct snd_mixer *m)
 	return (ret);
 }
 
-int
-mix_get_type(struct snd_mixer *m)
-{
-	KASSERT(m != NULL, ("NULL snd_mixer"));
-
-	return (m->type);
-}
-
 device_t
 mix_get_dev(struct snd_mixer *m)
 {
@@ -1573,30 +1557,3 @@ mixer_get_lock(struct snd_mixer *m)
 	}
 	return (m->lock);
 }
-
-int
-mix_get_locked(struct snd_mixer *m, u_int dev, int *pleft, int *pright)
-{
-	int level;
-
-	level = mixer_get(m, dev);
-	if (level < 0) {
-		*pright = *pleft = -1;
-		return (-1);
-	}
-
-	*pleft = level & 0xFF;
-	*pright = (level >> 8) & 0xFF;
-
-	return (0);
-}
-
-int
-mix_set_locked(struct snd_mixer *m, u_int dev, int left, int right)
-{
-	int level;
-
-	level = (left & 0xFF) | ((right & 0xFF) << 8);
-
-	return (mixer_set(m, dev, m->mutedevs, level));
-}
diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h
index 7139a766b392..c47247ab570d 100644
--- a/sys/dev/sound/pcm/mixer.h
+++ b/sys/dev/sound/pcm/mixer.h
@@ -47,13 +47,10 @@ void mixer_hwvol_step(device_t dev, int left_step, int right_step);
 
 int mixer_busy(struct snd_mixer *m);
 
-int mix_get_locked(struct snd_mixer *m, u_int dev, int *pleft, int *pright);
-int mix_set_locked(struct snd_mixer *m, u_int dev, int left, int right);
 int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right);
 int mix_get(struct snd_mixer *m, u_int dev);
 int mix_setrecsrc(struct snd_mixer *m, u_int32_t src);
 u_int32_t mix_getrecsrc(struct snd_mixer *m);
-int mix_get_type(struct snd_mixer *m);
 device_t mix_get_dev(struct snd_mixer *m);
 
 void mix_setdevs(struct snd_mixer *m, u_int32_t v);
@@ -65,7 +62,6 @@ u_int32_t mix_getmutedevs(struct snd_mixer *m);
 void mix_setparentchild(struct snd_mixer *m, u_int32_t parent, u_int32_t childs);
 void mix_setrealdev(struct snd_mixer *m, u_int32_t dev, u_int32_t realdev);
 u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev);
-u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev);
 void *mix_getdevinfo(struct snd_mixer *m);
 struct mtx *mixer_get_lock(struct snd_mixer *m);