git: 26524f063fca - stable/14 - sound: Change PCMDIR_* numbering

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Sun, 27 Oct 2024 16:33:11 UTC
The branch stable/14 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=26524f063fca6d6ab981e08911078f6e59f00f14

commit 26524f063fca6d6ab981e08911078f6e59f00f14
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-24 11:37:17 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-27 16:32:17 +0000

    sound: Change PCMDIR_* numbering
    
    Needed by a follow-up patch, so that channels can be sorted properly.
    This change does not affect the behavior of any subsystem.
    
    While here, change to an enum.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 days
    Reviewed by:    dev_submerge.ch, markj
    Differential Revision:  https://reviews.freebsd.org/D47198
    
    (cherry picked from commit a4111e9dc7225618fa8d2af64d866cf0b0aebd56)
---
 sys/dev/sound/pcm/channel.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index d146f51120d8..13efbef15d8b 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -335,10 +335,12 @@ extern int chn_latency_profile;
 extern int report_soft_formats;
 extern int report_soft_matrix;
 
-#define PCMDIR_PLAY		1
-#define PCMDIR_PLAY_VIRTUAL	2
-#define PCMDIR_REC		-1
-#define PCMDIR_REC_VIRTUAL	-2
+enum {
+	PCMDIR_PLAY = 1,
+	PCMDIR_PLAY_VIRTUAL,
+	PCMDIR_REC,
+	PCMDIR_REC_VIRTUAL,
+};
 
 #define PCMTRIG_START 1
 #define PCMTRIG_EMLDMAWR 2