git: 5289aa5bd63e - stable/15 - sound: Retire SND_FEEDER_MULTIFORMAT and SND_FEEDER_FULL_MULTIFORMAT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 09:55:04 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=5289aa5bd63e5f63a35896eb74f6f50203488563
commit 5289aa5bd63e5f63a35896eb74f6f50203488563
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:34 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +0000
sound: Retire SND_FEEDER_MULTIFORMAT and SND_FEEDER_FULL_MULTIFORMAT
There is no reason to have these legacy controls anymore, all these
formats can be handled just fine nowadays.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55937
(cherry picked from commit 9318336f2af134b26adcb217f78f70bfdcf5f222)
---
sys/conf/NOTES | 8 --------
sys/conf/options | 2 --
sys/dev/sound/pcm/feeder.h | 18 ------------------
sys/dev/sound/pcm/feeder_chain.c | 12 +-----------
sys/dev/sound/pcm/feeder_mixer.c | 3 ---
sys/dev/sound/pcm/feeder_rate.c | 12 ++++--------
sys/dev/sound/pcm/feeder_volume.c | 12 ++++--------
7 files changed, 9 insertions(+), 58 deletions(-)
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index e27ee07ff7c1..08a3b33224c1 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2159,12 +2159,6 @@ envvar hint.gusc.0.flags="0x13"
# SND_DIAGNOSTIC Similar in a spirit of INVARIANTS/DIAGNOSTIC,
# zero tolerance against inconsistencies.
#
-# SND_FEEDER_MULTIFORMAT By default, only 16/32 bit feeders are compiled
-# in. This options enable most feeder converters
-# except for 8bit. WARNING: May bloat the kernel.
-#
-# SND_FEEDER_FULL_MULTIFORMAT Ditto, but includes 8bit feeders as well.
-#
# SND_FEEDER_RATE_HP (feeder_rate) High precision 64bit arithmetic
# as much as possible (the default trying to
# avoid it). Possible slowdown.
@@ -2175,8 +2169,6 @@ envvar hint.gusc.0.flags="0x13"
# range at a cost of possible slowdown.
#
options SND_DIAGNOSTIC
-options SND_FEEDER_MULTIFORMAT
-options SND_FEEDER_FULL_MULTIFORMAT
options SND_FEEDER_RATE_HP
options SND_PCM_64
diff --git a/sys/conf/options b/sys/conf/options
index 8f5465cac832..c09727c8b6af 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -920,8 +920,6 @@ CFI_HARDWAREBYTESWAP opt_cfi.h
# Sound options
SND_DIAGNOSTIC opt_snd.h
-SND_FEEDER_MULTIFORMAT opt_snd.h
-SND_FEEDER_FULL_MULTIFORMAT opt_snd.h
SND_FEEDER_RATE_HP opt_snd.h
SND_PCM_64 opt_snd.h
diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h
index 1f106787ee83..834df463295d 100644
--- a/sys/dev/sound/pcm/feeder.h
+++ b/sys/dev/sound/pcm/feeder.h
@@ -163,21 +163,3 @@ int feeder_matrix_oss_get_channel_order(struct pcmchan_matrix *,
unsigned long long *);
int feeder_matrix_oss_set_channel_order(struct pcmchan_matrix *,
unsigned long long *);
-
-/*
- * By default, various feeders only deal with sign 16/32 bit native-endian
- * since it should provide the fastest processing path. Processing 8bit samples
- * is too noisy due to limited dynamic range, while 24bit is quite slow due to
- * unnatural per-byte read/write. However, for debugging purposes, ensuring
- * implementation correctness and torture test, the following can be defined:
- *
- * SND_FEEDER_MULTIFORMAT - Compile all type of converters, but force
- * 8bit samples to be converted to 16bit
- * native-endian for better dynamic range.
- * Process 24bit samples natively.
- * SND_FEEDER_FULL_MULTIFORMAT - Ditto, but process 8bit samples natively.
- */
-#ifdef SND_FEEDER_FULL_MULTIFORMAT
-#undef SND_FEEDER_MULTIFORMAT
-#define SND_FEEDER_MULTIFORMAT 1
-#endif
diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c
index 8129d7e90bfd..4fc846f77496 100644
--- a/sys/dev/sound/pcm/feeder_chain.c
+++ b/sys/dev/sound/pcm/feeder_chain.c
@@ -66,13 +66,7 @@ struct feeder_chain_desc {
#define FEEDER_CHAIN_FULLMULTI 4
#define FEEDER_CHAIN_LAST 5
-#if defined(SND_FEEDER_FULL_MULTIFORMAT)
#define FEEDER_CHAIN_DEFAULT FEEDER_CHAIN_FULLMULTI
-#elif defined(SND_FEEDER_MULTIFORMAT)
-#define FEEDER_CHAIN_DEFAULT FEEDER_CHAIN_MULTI
-#else
-#define FEEDER_CHAIN_DEFAULT FEEDER_CHAIN_LEAN
-#endif
/*
* List of preferred formats that might be required during
@@ -126,7 +120,7 @@ static uint32_t *feeder_chain_formats[FEEDER_CHAIN_LAST] = {
static int feeder_chain_mode = FEEDER_CHAIN_DEFAULT;
-#if defined(_KERNEL) && defined(SND_FEEDER_FULL_MULTIFORMAT)
+#if defined(_KERNEL)
SYSCTL_INT(_hw_snd, OID_AUTO, feeder_chain_mode, CTLFLAG_RWTUN,
&feeder_chain_mode, 0,
"feeder chain mode "
@@ -589,12 +583,8 @@ feeder_chain(struct pcm_channel *c)
case FEEDER_CHAIN_LEAN:
case FEEDER_CHAIN_16:
case FEEDER_CHAIN_32:
-#if defined(SND_FEEDER_MULTIFORMAT) || defined(SND_FEEDER_FULL_MULTIFORMAT)
case FEEDER_CHAIN_MULTI:
-#endif
-#if defined(SND_FEEDER_FULL_MULTIFORMAT)
case FEEDER_CHAIN_FULLMULTI:
-#endif
break;
default:
feeder_chain_mode = FEEDER_CHAIN_DEFAULT;
diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c
index 13342094966b..be78b0cffb64 100644
--- a/sys/dev/sound/pcm/feeder_mixer.c
+++ b/sys/dev/sound/pcm/feeder_mixer.c
@@ -43,9 +43,6 @@
#include "snd_fxdiv_gen.h"
#endif
-#undef SND_FEEDER_MULTIFORMAT
-#define SND_FEEDER_MULTIFORMAT 1
-
struct feed_mixer_info {
uint32_t format;
uint32_t channels;
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
index 66b846e5c6df..4431d9bfe6ed 100644
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -620,15 +620,14 @@ z_feed_sinc_polyphase_##SIGN##BIT##ENDIAN(struct z_info *info, uint8_t *dst) \
Z_DECLARE_SINC(SIGN, BIT, ENDIAN) \
Z_DECLARE_SINC_POLYPHASE(SIGN, BIT, ENDIAN)
-#if BYTE_ORDER == LITTLE_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == LITTLE_ENDIAN
Z_DECLARE(S, 16, LE)
Z_DECLARE(S, 32, LE)
#endif
-#if BYTE_ORDER == BIG_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == BIG_ENDIAN
Z_DECLARE(S, 16, BE)
Z_DECLARE(S, 32, BE)
#endif
-#ifdef SND_FEEDER_MULTIFORMAT
Z_DECLARE(S, 8, NE)
Z_DECLARE(S, 24, LE)
Z_DECLARE(S, 24, BE)
@@ -641,7 +640,6 @@ Z_DECLARE(U, 24, BE)
Z_DECLARE(U, 32, BE)
Z_DECLARE(F, 32, LE)
Z_DECLARE(F, 32, BE)
-#endif
enum {
Z_RESAMPLER_ZOH,
@@ -670,15 +668,14 @@ static const struct {
uint32_t format;
z_resampler_t resampler[Z_RESAMPLER_LAST];
} z_resampler_tab[] = {
-#if BYTE_ORDER == LITTLE_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == LITTLE_ENDIAN
Z_RESAMPLER_ENTRY(S, 16, LE),
Z_RESAMPLER_ENTRY(S, 32, LE),
#endif
-#if BYTE_ORDER == BIG_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == BIG_ENDIAN
Z_RESAMPLER_ENTRY(S, 16, BE),
Z_RESAMPLER_ENTRY(S, 32, BE),
#endif
-#ifdef SND_FEEDER_MULTIFORMAT
Z_RESAMPLER_ENTRY(S, 8, NE),
Z_RESAMPLER_ENTRY(S, 24, LE),
Z_RESAMPLER_ENTRY(S, 24, BE),
@@ -691,7 +688,6 @@ static const struct {
Z_RESAMPLER_ENTRY(U, 32, BE),
Z_RESAMPLER_ENTRY(F, 32, LE),
Z_RESAMPLER_ENTRY(F, 32, BE),
-#endif
};
#define Z_RESAMPLER_TAB_SIZE \
diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c
index e43b2594c7e0..ba3c14f4769e 100644
--- a/sys/dev/sound/pcm/feeder_volume.c
+++ b/sys/dev/sound/pcm/feeder_volume.c
@@ -74,15 +74,14 @@ feed_volume_##SIGN##BIT##ENDIAN(int *vol, int *matrix, \
} while (--count != 0); \
}
-#if BYTE_ORDER == LITTLE_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == LITTLE_ENDIAN
FEEDVOLUME_DECLARE(S, 16, LE)
FEEDVOLUME_DECLARE(S, 32, LE)
#endif
-#if BYTE_ORDER == BIG_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == BIG_ENDIAN
FEEDVOLUME_DECLARE(S, 16, BE)
FEEDVOLUME_DECLARE(S, 32, BE)
#endif
-#ifdef SND_FEEDER_MULTIFORMAT
FEEDVOLUME_DECLARE(S, 8, NE)
FEEDVOLUME_DECLARE(S, 24, LE)
FEEDVOLUME_DECLARE(S, 24, BE)
@@ -95,7 +94,6 @@ FEEDVOLUME_DECLARE(U, 24, BE)
FEEDVOLUME_DECLARE(U, 32, BE)
FEEDVOLUME_DECLARE(F, 32, LE)
FEEDVOLUME_DECLARE(F, 32, BE)
-#endif
struct feed_volume_info {
uint32_t bps, channels;
@@ -115,15 +113,14 @@ static const struct {
uint32_t format;
feed_volume_t apply;
} feed_volume_info_tab[] = {
-#if BYTE_ORDER == LITTLE_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == LITTLE_ENDIAN
FEEDVOLUME_ENTRY(S, 16, LE),
FEEDVOLUME_ENTRY(S, 32, LE),
#endif
-#if BYTE_ORDER == BIG_ENDIAN || defined(SND_FEEDER_MULTIFORMAT)
+#if BYTE_ORDER == BIG_ENDIAN
FEEDVOLUME_ENTRY(S, 16, BE),
FEEDVOLUME_ENTRY(S, 32, BE),
#endif
-#ifdef SND_FEEDER_MULTIFORMAT
FEEDVOLUME_ENTRY(S, 8, NE),
FEEDVOLUME_ENTRY(S, 24, LE),
FEEDVOLUME_ENTRY(S, 24, BE),
@@ -136,7 +133,6 @@ static const struct {
FEEDVOLUME_ENTRY(U, 32, BE),
FEEDVOLUME_ENTRY(F, 32, LE),
FEEDVOLUME_ENTRY(F, 32, BE),
-#endif
};
#define FEEDVOLUME_TAB_SIZE ((int32_t) \