git: 7c483aa01363 - stable/15 - sound: Do not create root feeder in chn_init()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 09:55:06 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=7c483aa01363901498a495d95e303d605cca5e53
commit 7c483aa01363901498a495d95e303d605cca5e53
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:43 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +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
(cherry picked from commit b9f9fc473eb56273978df4d4c889acba2862b21c)
---
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) {