From nobody Sun Sep 29 10:09:24 2024 X-Original-To: freebsd-stable@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 4XGg0y0G40z5XS9r for ; Sun, 29 Sep 2024 10:09:38 +0000 (UTC) (envelope-from haramrae@gmail.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XGg0x0ndNz4G7X for ; Sun, 29 Sep 2024 10:09:37 +0000 (UTC) (envelope-from haramrae@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=MAaEapVz; spf=pass (mx1.freebsd.org: domain of haramrae@gmail.com designates 2a00:1450:4864:20::629 as permitted sender) smtp.mailfrom=haramrae@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a90deec0f8bso45110366b.1 for ; Sun, 29 Sep 2024 03:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727604576; x=1728209376; darn=freebsd.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=Bb1D/keq2nLkOPR2dn0Lj+8O+F7AAkoMgfhiXW9xFYI=; b=MAaEapVzRlFP0zo6HSHWtlRc6HemBpvkh3V5bYs0UtmvtVMX00AjWakhoeVo01dd8s wRzuarz2r/XLMz2opVtiSrRvnglpGR6lxunuTYarM//6d3nFhgo8tXmkqndfGSC3Yr4U +j7di73GhoDNz5sByB902KJo4Q8mROPF7tYuV01tl4BWbELzU/E03Tl0CfOd7kRbeEw6 OC/pANyecTlX4e0xOL+BVwFquUJVMaTlBlqPmzFpYnykqdXoGGTES9021uhjv6Ydsw+3 3JQcCgyzP4Fv923Eu/tUqzGsoOn6IxaxQq5udzqcw3KK3Mbtz9FRzHepoWaWk7xiOvkB TvRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727604576; x=1728209376; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Bb1D/keq2nLkOPR2dn0Lj+8O+F7AAkoMgfhiXW9xFYI=; b=JRdQ1adlz5GF/ZK8c5Re+5hEF5IwiNMZbmDSkCorSQ0KQ8XkDfTe/f1qkdLt4VXeFl Mu/VxvI58IwB4EioovlrmzGYZv4FfTckFUid4Z77/gmeIClhyoul+HzSQdaDkkTgd6oR y5KAev2FjT/5q+BBk5jNtvEbQ61I9dUumHZOhyNk6SXyoOQjX//sPCHEfbwqXc8OltaL yLujdaGhdgKGP62ATDPrOifU9bqKhe/7D0BrDTnSTEK79rqrhCK02Ivi5m/YcVE4tI8D Be5UeNtCDiRNZCVJYhUKtGDuUSfIn8Z4zj8G3TUUIRZWqFQx66MY5qJa8EK31Aqt+CVB whpA== X-Gm-Message-State: AOJu0YyPrxoXHjR2nUGCg/cvUFDMXuYxgOCCA6krU8GZnz79LmvzBM2a GbyNvx6Qckgn1XhCJIAM0LPX1clAzJSBkm5VoOGoHcKqj9ryp5rUDM/r6w== X-Google-Smtp-Source: AGHT+IGWPrU7ZIdPBX6BtU5I1YXKufB6xkJKuNTdh1vw8VC0EwEHYYsm2x9qWpOIbGEiEs9BIxBGlQ== X-Received: by 2002:a17:907:6e86:b0:a8d:2623:dd16 with SMTP id a640c23a62f3a-a93d8b5bfbemr258217166b.11.1727604575469; Sun, 29 Sep 2024 03:09:35 -0700 (PDT) Received: from smtpclient.apple ([188.212.112.125]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2777220sm358533166b.39.2024.09.29.03.09.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Sep 2024 03:09:34 -0700 (PDT) From: Alban Hertroys Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl Message-Id: Date: Sun, 29 Sep 2024 12:09:24 +0200 To: freebsd-stable@freebsd.org X-Mailer: Apple Mail (2.3818.100.11.1.3) X-Spamd-Result: default: False [-2.47 / 15.00]; SUBJECT_HAS_CURRENCY(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_LONG(-0.98)[-0.976]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::629:from] X-Rspamd-Queue-Id: 4XGg0x0ndNz4G7X X-Spamd-Bar: -- Hello, I am generally rather happy with this change in 14.1-RELEASE: "Audio now supports asynchronous device detach. This greatly simplifies = hot plugging and unplugging of things such as USB headsets, and eases = use of PulseAudio in cases that require operating system sleep and wake = (suspend and resume). d692c314d29a (Sponsored by The FreeBSD = Foundation)" It allows me to play music over my USB DAC through musicpd, without = needing virtual-oss anymore, resulting in lower CPU load and potentially = higher bit-rates (voss doesn=E2=80=99t go beyond 192kHz). Much = appreciated. It=E2=80=99s almost perfect now, BUT=E2=80=A6 I have a number of sysctl=E2=80=99s in /etc/sysctl.conf to tune my audio = output: hw.snd.default_unit=3D2 hw.snd.maxautovchans=3D0 dev.pcm.2.play.vchans=3D0 dev.pcm.2.bitperfect=3D1 These do get set properly after booting the machine, but after I turn = off my audio equipment (the DAC among them) and turn them back on the = next day, I see: #> sysctl -i dev.pcm.2.%desc dev.pcm.2.play.vchans dev.pcm.2.bitperfect=20= dev.pcm.2.%desc: Topping D90SE dev.pcm.2.play.vchans: 0 dev.pcm.2.bitperfect: 0 <--- Supposed to be 1! Is there a way to persist those settings when re-attaching the device? Frankly, I am a bit confused about why this apparently wasn=E2=80=99t a = problem before (14.0-RELEASE with virtual-oss), perhaps I just never = noticed and this isn=E2=80=99t a new problem with 14.1. I only started = monitoring this setting relatively recently. The periodic security run output reports the detach/attach sequence = quite correctly (as far as I can tell) as: +ugen0.6: at usbus0 (disconnected) +uaudio0: at uhub4, port 4, addr 8 (disconnected) +pcm2: detached +uaudio0: detached +uhid3: at uhub4, port 4, addr 8 (disconnected) +uhid3: detached +ugen0.6: at usbus0 +uaudio0 on uhub4 +uaudio0: on usbus0 +uaudio0: Play[0]: 384000 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms = buffer. (selected) +uaudio0: Play[0]: 352800 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms = buffer. +uaudio0: Play[0]: 192000 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms = buffer. +uaudio0: Play[0]: 176400 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms = buffer. +uaudio0: Play[0]: 96000 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms buffer. +uaudio0: Play[0]: 88200 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms buffer. +uaudio0: Play[0]: 48000 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms buffer. +uaudio0: Play[0]: 44100 Hz, 2 ch, 32-bit S-LE PCM format, 2x4ms buffer. +uaudio0: No recording. +uaudio0: No MIDI sequencer. +pcm2 on uaudio0 +uaudio0: No HID volume keys found. +uhid3 on uhub4 +uhid3: on usbus0 Regards, Alban Hertroys -- There is always an exception to always.