git: 8163944f2739 - stable/15 - sound: Retire unused SD_F_EQ_PC

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Thu, 02 Jul 2026 12:57:06 UTC
The branch stable/15 has been updated by christos:

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

commit 8163944f2739733a0bb9265416a3687ec33691ff
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-06-24 13:47:05 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-07-02 12:56:53 +0000

    sound: Retire unused SD_F_EQ_PC
    
    This flag is neither set anywhere, nor is there a way to set it from
    userland, so it is effectively useless, and currently the effect is that
    EQ can only be enabled for primary playback channels.
    
    Retire the flag and keep this behavior, and think later whether we want
    to allow virtual channels to get their own EQ feeder as well.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    
    (cherry picked from commit ede0236d3b34a89bae7795f0f45696d4d94ce138)
---
 sys/dev/sound/pcm/feeder_chain.c | 6 ++----
 sys/dev/sound/pcm/sound.h        | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c
index 1dbdf2fcc0e4..dc0788ffb53c 100644
--- a/sys/dev/sound/pcm/feeder_chain.c
+++ b/sys/dev/sound/pcm/feeder_chain.c
@@ -725,10 +725,8 @@ feeder_chain(struct pcm_channel *c)
 
 		/* Soft EQ only applicable for PLAY. */
 		if (cdesc.dummy == 0 &&
-		    c->direction == PCMDIR_PLAY && (d->flags & SD_F_EQ_ENABLED) &&
-		    (((d->flags & SD_F_EQ_PC) &&
-		    !(c->flags & CHN_F_HAS_VCHAN)) ||
-		    (!(d->flags & SD_F_EQ_PC) && !(c->flags & CHN_F_VIRTUAL))))
+		    c->direction == PCMDIR_PLAY &&
+		    (d->flags & SD_F_EQ_ENABLED) && !(c->flags & CHN_F_VIRTUAL))
 			cdesc.use_eq = 1;
 
 		if (FEEDFORMAT_NE_REQUIRED(&cdesc)) {
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index becd787a456a..fea27921e7db 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -105,7 +105,7 @@ struct snd_mixer;
 /* unused			0x00000100 */
 #define SD_F_EQ_ENABLED		0x00000200	/* EQ enabled */
 /* unused			0x00000400 */
-#define SD_F_EQ_PC		0x00000800	/* EQ per-channel */
+/* unused			0x00000800 */
 #define SD_F_PVCHANS		0x00001000	/* Playback vchans enabled */
 #define SD_F_RVCHANS		0x00002000	/* Recording vchans enabled */
 
@@ -121,7 +121,7 @@ struct snd_mixer;
 				/* "\011 */				\
 				"\012EQ_ENABLED"			\
 				/* "\013 */				\
-				"\014EQ_PC"				\
+				/* "\014 */				\
 				"\015PVCHANS"				\
 				"\016RVCHANS"