git: a4111e9dc722 - main - sound: Change PCMDIR_* numbering
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Oct 2024 11:37:32 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=a4111e9dc7225618fa8d2af64d866cf0b0aebd56
commit a4111e9dc7225618fa8d2af64d866cf0b0aebd56
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-24 11:37:17 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-24 11:37: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
---
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