From nobody Tue Sep 30 13:27:04 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 4cbf3r4TLMz695vR; Tue, 30 Sep 2025 13:27:04 +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 4cbf3r3r5rz45GJ; Tue, 30 Sep 2025 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238824; 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=S6tgiw7L7iwUuQYW+932naAfcVrNR4HJoKzadZ3Dhoc=; b=ZrSUgshGpm44vtZx84nzBEm9ldZ2Ee5wB4OQ847VjfCAcvEBjFWhPxdirfUoh+DoeMlJtk FLDQqQrj8+XmMzHexZeuEJScfaveLMm0F+rNEtDDQU7S5cCCCU9V/dcGT29zt0RejGMW3z z7rNKA/2OL+Wx/Njf6BgaeN/NSt/Plr1l3HpvnwCAU7Bti8ytWiIdctnNxH1Lh89xiIgI7 5Ui1CZKcgNMFyW7iRfkBW48ToWZ7n+waS0Y259idrS66zptBz/TmYf+PG2wHcNeANort+t qOLNXLdi4q+dcztEGExJtCgMj1U6jig5qsI/bvyXrB+m+QiCvCkc/tiCxsd+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238824; 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=S6tgiw7L7iwUuQYW+932naAfcVrNR4HJoKzadZ3Dhoc=; b=gWJXWedOGV/v1cJgjX0H6+ntnEb7pRsukTyNAfSG8t4FdDW5KfE0rst5nSvR5iGymctxZa c50O8tQtzwKVI2/zplaBq8DlrLdZFVwkGPDjq9HK3ovMsc/9jhxhmJU6xd9VE5hM80bGDO v4T8sx8m9c8U8fopoo8F9fFwQg7CzulRq/iZJKbOTo/vxrUOSYXI5gumTAUk7E5ww5kzVA 3KtYsoTro9ohBxI/0Ckmg/HfD1ASaNEBpyycX0AnhjRkiQCVorXmOIwGQzE55BtdtOHHFV uY1lcOVlryYRJKFHHeyrx3pglJwGj3qsIoJR9Y01yCHqpdUguc0Jyj9IL5EnQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759238824; a=rsa-sha256; cv=none; b=FOACOM6/jaoeyIRyUY0pbT0CJVK6wF9sI8DPrXNwvqNmSjjRKf5GK18Mt+L1AQn4el4MlW jdMXyI3iBO2guufR1jjy6yYDfmV8dC+1+hGsysekECMqgLmIkCZQaA+L7erDPvRFBZoUem QvgnYur8ML0u6H8hXwOjvxcXdVcavPmZkI3o4Z80/lKgQU1yjKcirMTBqrKelSlaCCxPzZ OPxCijqeEhl2aYrLgfk5GG7i2uQRiqMB+HeMoSLgIsWgPKLwmc8HquPEmqpR91ONFmkZ4n SAPVl0mgCdtSmSlzXvLgiaPzlbq6H5fUJyUqNAiP5kaumaImp30CNSNbV+Satg== 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 4cbf3r3BhZzfKT; Tue, 30 Sep 2025 13:27:04 +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 58UDR4er020317; Tue, 30 Sep 2025 13:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UDR4u4020313; Tue, 30 Sep 2025 13:27:04 GMT (envelope-from git) Date: Tue, 30 Sep 2025 13:27:04 GMT Message-Id: <202509301327.58UDR4u4020313@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: 8af6aee96ed6 - main - virtual_oss(8): Remove floating point formats from preference list 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: 8af6aee96ed609456900c6dd92dafabac5e89c0a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8af6aee96ed609456900c6dd92dafabac5e89c0a commit 8af6aee96ed609456900c6dd92dafabac5e89c0a Author: Christos Margiolis AuthorDate: 2025-09-30 13:13:46 +0000 Commit: Christos Margiolis CommitDate: 2025-09-30 13:25:53 +0000 virtual_oss(8): Remove floating point formats from preference list virtual_oss(8) chooses formats based on preference lists (see VPREFERRED_*) for each sample depth (-b option). However, if we, for example, use 32 bits LE for the sample depth, what will end up happening is that the format chosen will be 0x10001000, which corresponds to AFMT_S32_LE *and* AFMT_F32_LE OR'd together. This happens because the preference lists include both AFMT_S32_* and AFMT_F32_* in the 32-bit cases. Because we essentially end up using an invalid format, sound(4) will eventually reach pcm_sample_write()'s (sys/dev/sound/pcm/pcm.h) __assert_unreachable() case. This patch is a temporary fix to address the panic, until a proper solution for using floating point formats is found. PR: 289904 Sponsored by: The FreeBSD Foundation MFC after: 2 days --- usr.sbin/virtual_oss/virtual_oss/int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/int.h b/usr.sbin/virtual_oss/virtual_oss/int.h index a48e33d7f837..b3cc573ba8a9 100644 --- a/usr.sbin/virtual_oss/virtual_oss/int.h +++ b/usr.sbin/virtual_oss/virtual_oss/int.h @@ -65,13 +65,13 @@ extern pthread_cond_t atomic_cv; #define VTYPE_WAV_DAT 2 #define VPREFERRED_SNE_AFMT \ - (AFMT_S8 | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE | AFMT_F32_NE) + (AFMT_S8 | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE) #define VPREFERRED_UNE_AFMT \ (AFMT_U8 | AFMT_U16_NE | AFMT_U24_NE | AFMT_U32_NE) #define VPREFERRED_SLE_AFMT \ - (AFMT_S8 | AFMT_S16_LE | AFMT_S24_LE | AFMT_S32_LE | AFMT_F32_LE) + (AFMT_S8 | AFMT_S16_LE | AFMT_S24_LE | AFMT_S32_LE) #define VPREFERRED_SBE_AFMT \ - (AFMT_S8 | AFMT_S16_BE | AFMT_S24_BE | AFMT_S32_BE | AFMT_F32_BE) + (AFMT_S8 | AFMT_S16_BE | AFMT_S24_BE | AFMT_S32_BE) #define VPREFERRED_ULE_AFMT \ (AFMT_U8 | AFMT_U16_LE | AFMT_U24_LE | AFMT_U32_LE) #define VPREFERRED_UBE_AFMT \