git: a7c0ee909528 - stable/15 - sound: Always use chn_getvolume_matrix()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 09:55:08 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=a7c0ee90952868a5148b9cc05339b1a2d20c00eb
commit a7c0ee90952868a5148b9cc05339b1a2d20c00eb
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:53 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +0000
sound: Always use chn_getvolume_matrix()
There is no reason not to use it. We do it already with CHN_SETVOLUME().
chn_getvolume_matrix() is the same as the non-INVARIANTS
CHN_GETVOLUME(), just without the additional KASSERT
chn_getvolume_matrix() provides.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55990
(cherry picked from commit 0b7f9597024a0061b1e6c544d78bc2ed9392bd89)
---
sys/dev/sound/pcm/channel.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 6415f5c88984..0ccce2971c3a 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -307,11 +307,7 @@ int chn_getrates(struct pcm_channel *c, int **rates);
int chn_syncdestroy(struct pcm_channel *c);
#define CHN_SETVOLUME(...) chn_setvolume_matrix(__VA_ARGS__)
-#if defined(SND_DIAGNOSTIC) || defined(INVARIANTS)
#define CHN_GETVOLUME(...) chn_getvolume_matrix(__VA_ARGS__)
-#else
-#define CHN_GETVOLUME(x, y, z) ((x)->volume[y][z])
-#endif
#define CHN_GETMUTE(x, y, z) ((x)->muted[y][z])