From nobody Wed Oct 22 11:51:34 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 4cs6vV5Npsz6F92F; Wed, 22 Oct 2025 11:51:34 +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 4cs6vV4Z1vz3f0j; Wed, 22 Oct 2025 11:51:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761133894; 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=dY9qaqM0nfbiRxa9lmdLCBkbZ1GVPDpDDzUnsEi/RSA=; b=wqhjTRP65VKZnTpUVaQfnqIV0V9m003AI4glYWtY4iBeVkt9DH3c387DAEuYhT+R+dXp3r VQNuQSpGLN6GcANa20hNNNJWl82evjGrutXfuO5TkMclBeeqIFebUhd+9fogVBg6KvS4WN VYxrcjVUDEA+HfA9b4c763IgSnC31+drC/bg5Mpij+RXdasLKsz4WwXOR84MVzYedN2AJC ISPqpAKdxOfnQYS+QBzc8pwNsiydgogCCn2df0QIdjk8Fnvll7S95pVAL/g68OTeQh+Z7Q 3iF6Ql8tR5kdadMCpA5GwTjxnzIAzfjP8nfKwDUjTdddRGYP4SaRU3SmIytH7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761133894; 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=dY9qaqM0nfbiRxa9lmdLCBkbZ1GVPDpDDzUnsEi/RSA=; b=dF0pxId9DhfYHs3tuX/4oGLIu6ktZHiKwbxJT5s48oWbUwhB07PTcZSDDFkM4I+EYFI9Cx 4TF2tmbi8EbuJ2N4Cwny/cdB1K5eBuzXPSzCHTvAH2m5+rn/om9v8iLwxm4NZd3qbhWsmA iYiFiyAIOL+TK3/4znZro+4TSavHLT1nHWaT15vXyeru+roIBaDSd7lmtPsEdj9g75gfQc SHBHHpkv7StlVL7Fk9wccDIbWSPe6+5oXlrMudrJCV89Q8wE5lNV7MqZd3uEygrpPJydG8 TZHhs3baRZjteI6VMxgamlcwnTphhH7mEariEH0LfVM+ngIkfh54qADIFl2ykA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761133894; a=rsa-sha256; cv=none; b=pZbOGatFu0ub7nbXhrzgYzGOoC5PwkMrIyVpIuODBWIAZwROEq7fXqPGCa3xXGqDaIlsQF ISacIkv8nCCi6YYaBhm11u9j56lnk5fYHe4jD1/s41rmGWHlRKddFAZU2FRFhB+j4hITiT PjJr4+kQICz/OkJmzKOTFWgZpUYsLeyJxn3XKxVLslTl7MBygVUs06Ls1X6IqKY7t2m/q3 +QP6y6RPZ//8kQS/K6lGvLwGEuVf2CKCU8UFCKEn0AbS7RxqHO5SCULCrvaU59e15bgCGX uHmXUqf/2B15Psqg265C/9uJpISEO+U2TUZKSWM99DZxOPVif3BiKoazG9R9ig== 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 4cs6vV41BxzBqs; Wed, 22 Oct 2025 11:51:34 +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 59MBpYtp075924; Wed, 22 Oct 2025 11:51:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59MBpYkF075921; Wed, 22 Oct 2025 11:51:34 GMT (envelope-from git) Date: Wed, 22 Oct 2025 11:51:34 GMT Message-Id: <202510221151.59MBpYkF075921@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: 2693d6c7c9ca - main - snd_dummy: Create device alias 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: 2693d6c7c9cab28967de13233342fcf9281e5636 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2693d6c7c9cab28967de13233342fcf9281e5636 commit 2693d6c7c9cab28967de13233342fcf9281e5636 Author: Christos Margiolis AuthorDate: 2025-10-22 11:51:01 +0000 Commit: Christos Margiolis CommitDate: 2025-10-22 11:51:01 +0000 snd_dummy: Create device alias Sponsored by: The FreeBSD Foundation MFC after: 4 days Reviewed by: emaste, ziaee Differential Revision: https://reviews.freebsd.org/D53237 --- share/man/man4/snd_dummy.4 | 12 +++++++++++- sys/dev/sound/dummy.c | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/share/man/man4/snd_dummy.4 b/share/man/man4/snd_dummy.4 index 2b9d26d318ef..4ede8a806b6a 100644 --- a/share/man/man4/snd_dummy.4 +++ b/share/man/man4/snd_dummy.4 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2024 +.Dd October 22, 2025 .Dt SND_DUMMY 4 .Os .Sh NAME @@ -52,6 +52,16 @@ and one recording), as well as a mixer. .Pp Playback works by discarding all input, and recording by returning silence (zeros). +.Sh FILES +.Bl -tag -width "/dev/dsp.dummy" -compact +.It Pa /dev/dsp.dummy +Alias to the device's +.Pa /dev/dsp%d +file created by +.Xr sound 4 . +This makes it easy for tests to open the dummy devic when there are more +devices present in the system. +.El .Sh SEE ALSO .Xr sound 4 , .Xr loader.conf 5 , diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 4df5b112d3f4..1f2d69708eec 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -346,6 +346,12 @@ dummy_attach(device_t dev) return (ENXIO); mixer_init(dev, &dummy_mixer_class, sc); + /* + * Create an alias so that tests do not need to guess which one is the + * dummy device if there are more devices present in the system. + */ + make_dev_alias(sc->info.dsp_dev, "dsp.dummy"); + return (0); }