Date: Tue, 18 Nov 2025 00:52:14 GMT From: Christos Margiolis <christos@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8517a76e34b6 - stable/15 - sound: Retire DSP_DEFAULT_SPEED Message-ID: <202511180052.5AI0qEA5046908@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8517a76e34b642cc11f4f16892e429b9c780bb53 commit 8517a76e34b642cc11f4f16892e429b9c780bb53 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2025-11-11 12:06:47 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2025-11-18 00:51:24 +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 (cherry picked from commit 16ae4c2398c89dcc5c03f1aac72a2fce2a60e724) --- 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;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202511180052.5AI0qEA5046908>
