From nobody Tue Nov 11 12:08:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5QKj1DZNz6GLFg; Tue, 11 Nov 2025 12:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5QKh4vm5z3cD7; Tue, 11 Nov 2025 12:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws5596UlrBcktNZX023pFEK0aqfPbHkONU/rrMyAsYA=; b=BxnTTUG12S0adFnQlT/sIjl+NZ7EGyihs6u2ZJvWTLpOElEpW7FV9Kvv0Tb3WWM6A+GyYO jLig4MiJvNgHPxp00ztxEVh2JUORrnWqmKJbf+kAN/i1c+YmXk0I1wShL1A108l7zZn0Pi rQcfhKM55vUFQYTj2Drkyp5+era5wl5dpb5csMZmUo2pez/IvbArblouq9D2JfukVztEDE e/jAWr1RkXqzY+ivBnegnyw00JGn+x0OSbZIYxcAjoN2sHQwR6WwJtWynQrwtOkTZbwjGQ 6Iiim5UOrOHFwEimVkGFyCOGdt6L46vHLaBxTlhfWP+2CjT9Ww1Xf3mkIAkm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762862904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ws5596UlrBcktNZX023pFEK0aqfPbHkONU/rrMyAsYA=; b=HaZ64w4KY9x5uuJ+Tr+kdryt90NQhABcCpw2zNz0MVrVLHLhKkW9ioBA1f/a2YmynSiL9e 0vKmn7pAp/30FZfJ2LMbG1g01gKBTrJvfkELAgJ+xNHyPubh+ISQpxHSnWza2GA+MtWWoq bFXVuDa3UI3PTfNiVq8isTi39iktgyVZZoRZuu4+R32WJUFixO7/9zjRDw9vUCjQiqj++S 9XVBVGKJ4EP7H9vCdgvrS2DBR/2xSeIhN97IVKPuwXhxoIwxHHIR7Nh89kDq5whJDHt0xo PuI2AsQ31dtOcWLjhQpthG9Wog/4cpWZDUIK3IRwPR0BjZD3jykA8cjD143XWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762862904; a=rsa-sha256; cv=none; b=ctgFtMBKWxhnMNLaP0ECeqP0W6Px0uIkq3IM+v0ATrIXUVilwEuOWCCSKxqicSZ2kXr6fu XOvSka6Gn0a+j4TMeW4XWvCl/uRaPbRNBtm0zhzR2qvMEdxLDnGMxNsVi2XmOT59ZJodSX HcK1DgHolgV9Dk6zf9o9CydmOCEsWf+YeG9Usbcg3c3Z+CfKHjbEiZQDxiahmpb49DRREw TormcOeSyZNwE896EX8QB9Pc/L/xMWbq8+sUgq3hbTupHKfKgywMJPC4mHDPneKnP/9KsI PccbUm3K2BPH75yjOhOBVtw5sGy+aUrEKA5gNtiK5GTjADv3ZDoHaJtV4L5RDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d5QKh4SC0z13Ww; Tue, 11 Nov 2025 12:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5ABC8O2f035550; Tue, 11 Nov 2025 12:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5ABC8ObC035547; Tue, 11 Nov 2025 12:08:24 GMT (envelope-from git) Date: Tue, 11 Nov 2025 12:08:24 GMT Message-Id: <202511111208.5ABC8ObC035547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 16ae4c2398c8 - main - sound: Retire DSP_DEFAULT_SPEED List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 commit 16ae4c2398c89dcc5c03f1aac72a2fce2a60e724 Author: Christos Margiolis AuthorDate: 2025-11-11 12:06:47 +0000 Commit: Christos Margiolis CommitDate: 2025-11-11 12:06:47 +0000 sound: Retire DSP_DEFAULT_SPEED Only a few drivers use this, but this is not really our "default" speed. And even those drivers most likely override that value at some point once CHANNEL_SETSPEED() has been called. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53562 --- sys/dev/sound/pci/als4000.c | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/es137x.c | 2 +- sys/dev/sound/pci/maestro3.c | 4 ++-- sys/dev/sound/pci/vibes.c | 2 +- sys/dev/sound/pcm/sound.h | 2 -- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index 75fbefe27633..a8c3303af74f 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -221,7 +221,7 @@ alschan_init(kobj_t obj, void *devinfo, ch->channel = c; ch->bps = 1; ch->format = SND_FORMAT(AFMT_U8, 1, 0); - ch->speed = DSP_DEFAULT_SPEED; + ch->speed = 8000; ch->buffer = b; snd_mtxunlock(sc->lock); diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index a1356f58b567..28427d449c8d 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -352,7 +352,7 @@ cmichan_init(kobj_t obj, void *devinfo, ch->channel = c; ch->bps = 1; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->buffer = b; ch->dma_active = 0; if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index af2b4da76aba..5b0b229a021b 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -326,7 +326,7 @@ cs4281chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channe ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->bps = 1; ch->blksz = ch->buffer->bufsize; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index eb546de81f65..6b2093e16246 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -987,7 +987,7 @@ es1370_init(struct es_info *es) es->escfg = ES_SET_FIXED_RATE(es->escfg, fixed_rate); else { es->escfg = ES_SET_FIXED_RATE(es->escfg, 0); - fixed_rate = DSP_DEFAULT_SPEED; + fixed_rate = 8000; } if (single_pcm) es->escfg = ES_SET_SINGLE_PCM_MIX(es->escfg, 1); diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index ee39f5f3c90d..bad2b4eee1cd 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -437,7 +437,7 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel ch->parent = sc; ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; M3_UNLOCK(sc); /* XXX */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { device_printf(sc->dev, "m3_pchan_init chn_allocbuf failed\n"); @@ -816,7 +816,7 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel ch->parent = sc; ch->channel = c; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; M3_UNLOCK(sc); /* XXX */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, 0, sc->bufsz) != 0) { device_printf(sc->dev, "m3_rchan_init chn_allocbuf failed\n"); diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 6df76306b28f..1b7353464503 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -204,7 +204,7 @@ svchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c } ch->buffer = b; ch->fmt = SND_FORMAT(AFMT_U8, 1, 0); - ch->spd = DSP_DEFAULT_SPEED; + ch->spd = 8000; ch->dma_active = ch->dma_was_active = 0; return ch; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 6bd435d0ea25..19da1a22871a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -148,8 +148,6 @@ struct snd_mixer; #define RANGE(var, low, high) (var) = \ (((var)<(low))? (low) : ((var)>(high))? (high) : (var)) -#define DSP_DEFAULT_SPEED 8000 - extern int snd_unit; extern int snd_verbose; extern devclass_t pcm_devclass;