Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2026 18:47:04 +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: 5e9f2a6aefab - main - sound: Retire unused snddev_info->bufsz
Message-ID:  <69f3a3a8.372d5.925f854@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=5e9f2a6aefabec01c587a169fd5efe3a2720a8e5

commit 5e9f2a6aefabec01c587a169fd5efe3a2720a8e5
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-04-30 18:45:20 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-04-30 18:46:13 +0000

    sound: Retire unused snddev_info->bufsz
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/sound/pcm/sound.c | 9 ---------
 sys/dev/sound/pcm/sound.h | 1 -
 2 files changed, 10 deletions(-)

diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 305d663cd6ad..9eb2dffeb908 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -242,7 +242,6 @@ pcm_getdevinfo(device_t dev)
 unsigned int
 pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsigned int maxbufsz)
 {
-	struct snddev_info *d = device_get_softc(dev);
 	int sz, x;
 
 	sz = 0;
@@ -264,8 +263,6 @@ pcm_getbuffersize(device_t dev, unsigned int minbufsz, unsigned int deflt, unsig
 		sz = deflt;
 	}
 
-	d->bufsz = sz;
-
 	return sz;
 }
 
@@ -406,12 +403,6 @@ pcm_register(device_t dev, char *str)
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rec",
 	    CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "recording channels node");
 
-	/* XXX: a user should be able to set this with a control tool, the
-	   sysadmin then needs min+max sysctls for this */
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
-	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-            OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0,
-	    "allocated buffer size");
 	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 	    "bitperfect", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, d,
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index de9af6bd5324..4795eb7585c5 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -204,7 +204,6 @@ struct snddev_info {
 	} channels;
 	unsigned playcount, reccount, pvchancount, rvchancount;
 	unsigned flags;
-	unsigned int bufsz;
 	void *devinfo;
 	device_t dev;
 	char status[SND_STATUSLEN];


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f3a3a8.372d5.925f854>