Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2024 21:45:35 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c874fcc4ca62 - stable/14 - sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments
Message-ID:  <202411052145.4A5LjZ4R095545@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by christos:

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

commit c874fcc4ca629548ded7ad7bdb71d92856759969
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-11-03 19:02:43 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-11-05 21:44:41 +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
    
    (cherry picked from commit 3a7d40c692622cc614a3839491c345d945f474fe)
---
 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?202411052145.4A5LjZ4R095545>