git: 901d6fd8787d - stable/15 - sound: Retire CHN_GETMUTE() and use chn_getmute_matrix()

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Tue, 31 Mar 2026 09:55:12 UTC
The branch stable/15 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=901d6fd8787de5dda492519238f2ce8f01d4919a

commit 901d6fd8787de5dda492519238f2ce8f01d4919a
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:32:08 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:17 +0000

    sound: Retire CHN_GETMUTE() and use chn_getmute_matrix()
    
    chn_getmute_matrix() does what CHN_GETMUTE() does, but with a few
    additional checks.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D55993
    
    (cherry picked from commit d171d5b8b5acb145efb41a57a2a8f3cded59a484)
---
 sys/dev/sound/pcm/channel.h | 2 --
 sys/dev/sound/pcm/dsp.c     | 5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 0375bbfb006d..dbacbdd894f9 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -306,8 +306,6 @@ int chn_notify(struct pcm_channel *c, u_int32_t flags);
 int chn_getrates(struct pcm_channel *c, int **rates);
 int chn_syncdestroy(struct pcm_channel *c);
 
-#define CHN_GETMUTE(x, y, z)		((x)->muted[y][z])
-
 #ifdef OSSV4_EXPERIMENT
 int chn_getpeaks(struct pcm_channel *c, int *lpeak, int *rpeak);
 #endif
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 4af0430feca9..797bfba81023 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -607,8 +607,9 @@ dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *ch,
 	case MIXER_READ(0):
 		switch (j) {
 		case SOUND_MIXER_MUTE:
-			mute = CHN_GETMUTE(ch, SND_VOL_C_PCM, SND_CHN_T_FL) ||
-			    CHN_GETMUTE(ch, SND_VOL_C_PCM, SND_CHN_T_FR);
+			mute = chn_getmute_matrix(ch,
+			    SND_VOL_C_PCM, SND_CHN_T_FL) ||
+			    chn_getmute_matrix(ch, SND_VOL_C_PCM, SND_CHN_T_FR);
 			if (ch->direction == PCMDIR_REC) {
 				*(int *)arg = mute << SOUND_MIXER_RECLEV;
 			} else {