git: 3a7d40c69262 - main - sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 03 Nov 2024 19:04:10 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=3a7d40c692622cc614a3839491c345d945f474fe
commit 3a7d40c692622cc614a3839491c345d945f474fe
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-11-03 19:02:43 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-11-03 19:02:43 +0000
sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments
These flags are properly set in pcm_setstatus(), once the primary
channels have been created. The existing comment already states that
this is wrong.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D47324
---
sys/dev/sound/pcm/sound.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 3c4fb38fa4f5..e03bcab6d8fc 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -465,7 +465,8 @@ pcm_sysinit(device_t dev)
}
int
-pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
+pcm_register(device_t dev, void *devinfo, int numplay __unused,
+ int numrec __unused)
{
struct snddev_info *d;
int i;
@@ -503,13 +504,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
CHN_INIT(d, channels.pcm.busy);
CHN_INIT(d, channels.pcm.opened);
- /* XXX This is incorrect, but lets play along for now. */
- if ((numplay == 0 || numrec == 0) && numplay != numrec)
- d->flags |= SD_F_SIMPLEX;
-
- if (numplay > 0 || numrec > 0)
- d->flags |= SD_F_AUTOVCHAN;
-
return (0);
}