Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2026 10:38:59 +0000
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6755f558c1d7 - main - sound: Remove endianness checks for format table declarations
Message-ID:  <69c269c3.336ab.30892ea7@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by christos:

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

commit 6755f558c1d7d22cac5b123082fdb2ac080c228d
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:39 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-24 10:38:40 +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
---
 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),


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c269c3.336ab.30892ea7>