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
This commit is contained in:
Christos Margiolis
2026-03-24 11:31:34 +01:00
parent 12633057f5
commit 9318336f2a
7 changed files with 9 additions and 58 deletions
-8
View File
@@ -2160,12 +2160,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.
@@ -2176,8 +2170,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
-2
View File
@@ -916,8 +916,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
-18
View File
@@ -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
+1 -11
View File
@@ -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;
-3
View File
@@ -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;
+4 -8
View File
@@ -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 \
+4 -8
View File
@@ -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) \