From nobody Tue Mar 10 10:54:48 2026 X-Original-To: dev-commits-src-all@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 4fVW3y2v73z6VRkH for ; Tue, 10 Mar 2026 10:54:54 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fVW3y1f5Kz4348 for ; Tue, 10 Mar 2026 10:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773140094; 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=OLWmiM7sPGluVmC3u0+6ZSjQ+R+yJkg3wDJ4e46MIK4=; b=AyczJbZvwpIJzYpZH14U7jHhxuMjIhrTRpCj6iVbo05+Fat+5EAq62GwCX230WCmnsB9tY oVHBmAy1B3LtseiNyK0xKqVz8DtH6Uup79tQFkNn1jbLD0c2VvdlNEgC7CmBreUS51jFo4 NVJ71l5Lkcgn28xNDHM3B0xduN6WUy6pNImjNsb3+OpnSSprcMuZodWZ8paVnQcWDqQxV5 DwgqjtCdxpKmmUVdPM6HPRLUH20HIpZ4IGFYJNbPruoK04OqQaxPMRtIv/NDm3tMTRyp2s wSFIIX3YJDCpIH2gmd+IyNjDaCM+mC3+jBGuf0QD2h28x3AB5vPgTo9xG6yuKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773140094; a=rsa-sha256; cv=none; b=Ytu55Z9xF9NGXCnp5fLFlbNGKhNHW/hibXvQCs/v7oQ4FGYK4QzJQdRxPNJTv522CpI5kd dm86Zza0Q/AI+Xfa6Yinr3Iylxdd1jHzPovYjE/el/GC16GsOc71wZwPcm2HeZNUdsKc6B HocXAyiK0yGdqt3oOneLdMoSuBr8EXYPDL7cH8AwtqwysJZnZUtMeZV8Xt2bdvy7i31/OT 0iuN+uXXMTSJdLkFAeDVejG1aSoDvyyAZhneJb9KnEgj+xE3NvTbkC1EXUEkpujdnuWd0i cSjcISMomZonGgJmWaRZMNr0B5WQhVig9eemqjF3HaJ17G9y7x7/kAcoLYAkxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773140094; 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=OLWmiM7sPGluVmC3u0+6ZSjQ+R+yJkg3wDJ4e46MIK4=; b=dzDgdqSPMmLHW/W2lXBgrXFUyXgm39xJUMZSkyy9zuEpXUWVXmeZKOGQfIU2oo+PktFSml 8j3nxyBmQ2dU914/PkjWsHB88w94o5/sI8oA1ZcA13j+l9vu7OVsGEMax/I7MU8yPFxSdW w19Qw/DCR5X00Mzp1or8BsVjPXl3tRo6B0As+bUn6L9sIlzwBlLx3U2KXLUYEeE0aPm1Z0 zqpV4el6IdrOk5J8lqd6GS6tqj/Dpo01eSeiJiLCJqHQ+puRrv+7fd2tkEo6EdIynF4RDR d1GS52hNz7Ff1xCromC6NgbW2xE99tgOQObQpf0VLPC3P/i3rZjrkKhQIjVkQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fVW3y15pGz17pM for ; Tue, 10 Mar 2026 10:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 454e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Mar 2026 10:54:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 716773278a03 - stable/15 - sound: Notify devd on hw.snd.default_unit change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 716773278a0349dcb468d13d22a957ed91602d1c Auto-Submitted: auto-generated Date: Tue, 10 Mar 2026 10:54:48 +0000 Message-Id: <69aff878.454e3.73552e57@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=716773278a0349dcb468d13d22a957ed91602d1c commit 716773278a0349dcb468d13d22a957ed91602d1c Author: Christos Margiolis AuthorDate: 2026-03-03 11:32:32 +0000 Commit: Christos Margiolis CommitDate: 2026-03-10 10:54:42 +0000 sound: Notify devd on hw.snd.default_unit change If we have virtual_oss running, this devd notification will make sure to automatically transfer sound to the new default unit, while also making sure that we switch to it only for the supported directions (recording and/or playback). For more information, please refer to 2ffaca551eaf ("snd_hda: Implement automatic redirection between associations"). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55530 (cherry picked from commit d40189f8259e3565c69a40194f7b603d0ca648de) --- sys/dev/sound/pcm/sound.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 8ce369bfce5e..abd92d93e02d 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -81,6 +81,7 @@ static int sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS) { struct snddev_info *d; + char buf[32]; int error, unit; unit = snd_unit; @@ -95,6 +96,12 @@ sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS) snd_unit = unit; snd_unit_auto = 0; bus_topo_unlock(); + + snprintf(buf, sizeof(buf), "cdev=dsp%d", snd_unit); + if (d->reccount > 0) + devctl_notify("SND", "CONN", "IN", buf); + if (d->playcount > 0) + devctl_notify("SND", "CONN", "OUT", buf); } return (error); }