From nobody Sat Oct 24 01:18:21 2026 X-Original-To: dev-commits-src-branches@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 4jBMTT70qmz6wqVx for ; Sat, 24 Oct 2026 01:18:21 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jBMTT5Mplz4LT6 for ; Sat, 24 Oct 2026 01:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792804701; 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=G2tmuX5qkoYpCPL6oubfIf+gUAsT+BTAPlBudVBv994=; b=uUpAL1bXk3OmpgcsAHbuxtyxpTgCKnEMgUdD1tj3OZ58hDDl0gHRIMgngrDmSaGkfyphY/ u5tO/GJJ/DlxDTACWqP5bnE7HjOElutN4Cjeir3bG4V+dOoXaGKg8R2xK0b3S1iA62cgSm ve4axnm8czKGshm0yS1oH0lpiYc/ppyCCY/I3pJHL9hylwmkmH+g1ow1WsYu6AwOm3qfXd rJ1ksbuB5ypNgKYmXyujk5w5vjSNFOdG2Fhidc4Ds1WqXutRcMnzqpSouaYTGct8+8BQhg LYbt7RyYJV+OV9mBcu9z2sgDsel9uq0DTOKXCyKsRQZ1u+G2qNSbhMo0ch3xqw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792804701; b=LKS3JgFD1Xz2b0QnBnHc98Y0qolypvISTVUfl+7+4oN+EyLqrpctgseJN5VTysqz6IywdZ lvmdd2lsvk7g4mm3ehMgdkgqggthrZVrZjexB3LUGJHqV/N6SfSiR1b6/Xg2+w5mb7ZKNx Mni+u78WteZX7UVFHbVMFELjYys6TvfLJcu/YL2Z2Xl6otf8kLhYD6ODQ3VMu6G8u79tac efTAFm3N89kVH1Ev5h5UIkuie/1SxTJpAiecvhb8xYzlBG3u0N8dHStbAuo5liwZN2q/G7 ZiSE0hMTZzE9LDIbWigbBFD7KMH6tPPQLXZCRnt/gNB1w4wH8AQwr5QxdQgeSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792804701; 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=G2tmuX5qkoYpCPL6oubfIf+gUAsT+BTAPlBudVBv994=; b=K80INaxwhWXH/44b+tdv2rbL9Q44/9kOCF9CG6vtiG8tk6A5coVuz8ZQzSFUUgTr4x0axZ 6j0UBhEHfh9bSzRZ0+ezkF+ZMelqcrzWxxwNtlGnHg73SQ89uiVaWq91mqAQJ4b3ssJBg3 jMeWsrsv3Biw+gXXAIg8HYqN/PeaF4r2/Gqmsy9gxggjZ+sA+8huD8gqNPTVGktGeYWmSa 2eUPMeNyeuRnWub4zPV57ZbBgEQ8HxCu+To+3MuSLrBugrzvMkK1AjVnGupeKvzJdkXmFk waJwvCgR16Ja2qUIxvU4s4k+F2CbxWj+JWWmrmRurElAFOYRg5R//lmqpwA3mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jBMTT50cfzv96 for ; Sat, 24 Oct 2026 01:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24302 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 24 Oct 2026 01:18:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 82c94818047a - stable/14 - snd_uaudio: recognize hardware sidetone as a monitor List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82c94818047a7855643f78f431f75feb486492ed Auto-Submitted: auto-generated Date: Sat, 24 Oct 2026 01:18:21 +0000 Message-Id: <6adc075d.24302.3fc3deaa@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=82c94818047a7855643f78f431f75feb486492ed commit 82c94818047a7855643f78f431f75feb486492ed Author: Kyle Evans AuthorDate: 2026-08-26 14:31:57 +0000 Commit: Kyle Evans CommitDate: 2026-10-23 02:52:51 +0000 snd_uaudio: recognize hardware sidetone as a monitor The Logitech H390, for instance, has the following interface layout: ~~ 7 INPUT 34 INPUT 10 INPUT Mic (0x201) Mic (0x201) USB Stream (0x101) | | | v v | 19 FEATURE 35 FEATURE | | | | v v | 25 EXTENSION +------> 36 MIXER <---+ | | v v 13 OUTPUT 22 FEATURE USB Stream (0x101) | v 16 OUTPUT Speaker (0x301) ~~ The 7->13 path on the left is a typical microphone-in configuration, while the right side is a little more complicated. The 34 -> 35 -> 36 leg is describing a hardware sidetone control, while the other is a standard audio-out configuration. During feature unit evaluation, we need to pick up the scenario of node 35 above, which is directly wiring the microphone to the speaker. Right now we'll likely tie it to the pcm/vol levels and this unit will emit a very prompt feedback screech, but it's really shaped more like a MONITOR control. This avoids mishandling feature unit 22 because that's evaluated in one of the other cases: one of the inputs is the USB stream, so it's wired up as a PCM. One note on this headset: the presence of mixer 36 currently breaks the `vol` control, leaving only `pcm` to control the volume. Given that it has both Mic and USB input, I suspect we get a 1:1 cluster configuration for the Mic input but something more complicated for the USB input that we end up ignoring. Thus, "vol" might technically control the monitor volume but isn't wired up to the USB input cluster. I have not had a chance to confirm this, yet. PR: 291424 Reviewed by: christos (cherry picked from commit f01b594b7fa5cac4328f7137fb9cb0eef7ffd040) --- sys/dev/sound/usb/uaudio.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index baa963db2155..453f7d20c698 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -4620,7 +4620,16 @@ uaudio_mixer_determine_class(const struct uaudio_terminal_node *iot) switch (match) { case 0: /* not connected to USB */ - if (terminal_type_output != 0) { + /* + * Some devices have a hardware sidetone that will show up here + * as connecting the microphone to the speaker. If we look at + * the output first, then we are more likely to get a PCM type + * and accidentally tie it to playback when we really should + * treat it as a monitor control. + */ + if (terminal_type_input != 0 && terminal_type_output != 0) { + return (SOUND_MIXER_MONITOR); + } else if (terminal_type_output != 0) { return (uaudio_mixer_get_feature_by_tt( terminal_type_output, SOUND_MIXER_MONITOR)); } else { @@ -4679,7 +4688,16 @@ uaudio20_mixer_determine_class(const struct uaudio_terminal_node *iot) switch (match) { case 0: /* not connected to USB */ - if (terminal_type_output != 0) { + /* + * Some devices have a hardware sidetone that will show up here + * as connecting the microphone to the speaker. If we look at + * the output first, then we are more likely to get a PCM type + * and accidentally tie it to playback when we really should + * treat it as a monitor control. + */ + if (terminal_type_input != 0 && terminal_type_output != 0) { + return (SOUND_MIXER_MONITOR); + } else if (terminal_type_output != 0) { return (uaudio_mixer_get_feature_by_tt( terminal_type_output, SOUND_MIXER_MONITOR)); } else {