aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-03-24 10:31:43 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-03-24 10:38:40 +0000
commitb9f9fc473eb56273978df4d4c889acba2862b21c (patch)
tree7bd897bf441dd77b71b32f0632511f64cade4533
parent6755f558c1d7d22cac5b123082fdb2ac080c228d (diff)
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
-rw-r--r--sys/dev/sound/pcm/channel.c12
1 files changed, 0 insertions, 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) {