From b9f9fc473eb56273978df4d4c889acba2862b21c Mon Sep 17 00:00:00 2001 From: Christos Margiolis Date: Tue, 24 Mar 2026 11:31:43 +0100 Subject: [PATCH] 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 b74f76fd21c..5e7c5772af0 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) {