Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2026 10:39:00 +0000
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: b9f9fc473eb5 - main - sound: Do not create root feeder in chn_init()
Message-ID:  <69c269c4.32aab.3c8290a3@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by christos:

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

commit b9f9fc473eb56273978df4d4c889acba2862b21c
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:43 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-24 10:38:40 +0000

    sound: Do not create root feeder in chn_init()
    
    The feeder chain gets destroyed when feeder_chain() is called, which is
    after the chn_reset() call in chn_init() further down for primary chans,
    or vchan_create() for vchans. This makes the root feeder creation in
    chn_init() essentially a no-op. Remove it altogether and let
    feeder_chain() after chn_reset() take care of creating the feeder
    properly. It creates the root one as well.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D55941
---
 sys/dev/sound/pcm/channel.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index b74f76fd21ca..5e7c5772af01 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -1144,7 +1144,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls,
     int dir, void *devinfo)
 {
 	struct pcm_channel *c;
-	struct feeder_class *fc;
 	struct snd_dbuf *b, *bs;
 	char buf[CHN_NAMELEN];
 	int err, i, direction, *vchanrate, *vchanformat;
@@ -1217,17 +1216,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls,
 	chn_vpc_reset(c, SND_VOL_C_PCM, 1);
 	CHN_UNLOCK(c);
 
-	fc = feeder_getclass(FEEDER_ROOT);
-	if (fc == NULL) {
-		device_printf(d->dev, "%s(): failed to get feeder class\n",
-		    __func__);
-		goto fail;
-	}
-	if (feeder_add(c, fc, NULL)) {
-		device_printf(d->dev, "%s(): failed to add feeder\n", __func__);
-		goto fail;
-	}
-
 	b = sndbuf_create(c, "primary");
 	bs = sndbuf_create(c, "secondary");
 	if (b == NULL || bs == NULL) {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c269c4.32aab.3c8290a3>