Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2024 19:04:10 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3a7d40c69262 - main - sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments
Message-ID:  <202411031904.4A3J4AO0052862@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411031904.4A3J4AO0052862>