git: db18e522a028 - stable/15 - sound: Remove endianness checks for format table declarations
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 09:55:05 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=db18e522a028864f4638707ff9dac1ac32200ce4
commit db18e522a028864f4638707ff9dac1ac32200ce4
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:39 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +0000
sound: Remove endianness checks for format table declarations
This a legacy thing that is not needed anymore. We can support all of
them just fine.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55939
(cherry picked from commit 6755f558c1d7d22cac5b123082fdb2ac080c228d)
---
sys/dev/sound/pcm/feeder_rate.c | 8 --------
sys/dev/sound/pcm/feeder_volume.c | 8 --------
2 files changed, 16 deletions(-)
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
index 4431d9bfe6ed..03bdbbc789bd 100644
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -620,14 +620,10 @@ 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
Z_DECLARE(S, 16, LE)
Z_DECLARE(S, 32, LE)
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
Z_DECLARE(S, 16, BE)
Z_DECLARE(S, 32, BE)
-#endif
Z_DECLARE(S, 8, NE)
Z_DECLARE(S, 24, LE)
Z_DECLARE(S, 24, BE)
@@ -668,14 +664,10 @@ static const struct {
uint32_t format;
z_resampler_t resampler[Z_RESAMPLER_LAST];
} z_resampler_tab[] = {
-#if BYTE_ORDER == LITTLE_ENDIAN
Z_RESAMPLER_ENTRY(S, 16, LE),
Z_RESAMPLER_ENTRY(S, 32, LE),
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
Z_RESAMPLER_ENTRY(S, 16, BE),
Z_RESAMPLER_ENTRY(S, 32, BE),
-#endif
Z_RESAMPLER_ENTRY(S, 8, NE),
Z_RESAMPLER_ENTRY(S, 24, LE),
Z_RESAMPLER_ENTRY(S, 24, BE),
diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c
index ba3c14f4769e..5f40816b4065 100644
--- a/sys/dev/sound/pcm/feeder_volume.c
+++ b/sys/dev/sound/pcm/feeder_volume.c
@@ -74,14 +74,10 @@ feed_volume_##SIGN##BIT##ENDIAN(int *vol, int *matrix, \
} while (--count != 0); \
}
-#if BYTE_ORDER == LITTLE_ENDIAN
FEEDVOLUME_DECLARE(S, 16, LE)
FEEDVOLUME_DECLARE(S, 32, LE)
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
FEEDVOLUME_DECLARE(S, 16, BE)
FEEDVOLUME_DECLARE(S, 32, BE)
-#endif
FEEDVOLUME_DECLARE(S, 8, NE)
FEEDVOLUME_DECLARE(S, 24, LE)
FEEDVOLUME_DECLARE(S, 24, BE)
@@ -113,14 +109,10 @@ static const struct {
uint32_t format;
feed_volume_t apply;
} feed_volume_info_tab[] = {
-#if BYTE_ORDER == LITTLE_ENDIAN
FEEDVOLUME_ENTRY(S, 16, LE),
FEEDVOLUME_ENTRY(S, 32, LE),
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
FEEDVOLUME_ENTRY(S, 16, BE),
FEEDVOLUME_ENTRY(S, 32, BE),
-#endif
FEEDVOLUME_ENTRY(S, 8, NE),
FEEDVOLUME_ENTRY(S, 24, LE),
FEEDVOLUME_ENTRY(S, 24, BE),