From nobody Thu May 23 00:59:02 2024 X-Original-To: usb@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 4Vl8vC0kLZz5LNyH for ; Thu, 23 May 2024 00:59:03 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8vB3Zw1z4p23 for ; Thu, 23 May 2024 00:59:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425942; a=rsa-sha256; cv=none; b=JewWZu1NMds0+sUdUynVStPcsLO5Wtv5IrxI2rG9DJJBk9j36o246LXGtqjFD1+BKQb8Z/ XP9bsRHr4nQkOlEvfxDl7jbA6ehqifmtOOEMjFbIN5+x+lw/2onYgPimFPjcYFRe4mrD8p H2DbEzIkruMS6PVxuU4qiAI3klpd+jesHxfjY3EvQpW+psIC2Bc0o9UHOsXXly9dxslYqa IQfyXyUoQJ3qGvWfmX6QKavB13zMfpVs6EEVNnTdQiVb8KY34jKTSpRXbHKOhinDEfqB6C VER6KQ4SvAYEMCI8SVpg4q7rdOILjNA1dsGoRtMdkuSMyUGjUnFVbAn84vIDqg== 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=1716425942; 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: in-reply-to:in-reply-to:references:references; bh=2CN0G+PlvmddPKHaNZSS/K/ATgNyQT2EmBu+Gi3ny/w=; b=U41dfMgCRtYeVaY7qZAaoB/F+8pOo3Z/9cJY8Lb6N5D98GOzGiGVVE3LwIVxmO1IXkP38Y LCEj+QG1PpPhY1B4adHcM4YnKK/KeAtrTJy6cfomMw8lRxtVvGsqMJcIafGJ0HdvEK4T28 QPWeTTlEv0sxXEN6oPeSBKbNtbcbGuwE8agosBOxnUH/P8dWh0kV1iJEBifv3bXf5YOQZK Ks5X9v+7EGXbKTSjbz0yIpEeumJHpYrOW0Y4nIB4furtGNlQ2pwtJCKdcXKiXi/EogPnuO Cyi+sw5nBOzAmaijiZ1I/ixq9fPXcILZRythegnwUWBfZ4DkihqdfBtLEXrW/w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Vl8vB39j8zShV for ; Thu, 23 May 2024 00:59:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 44N0x20Q008540 for ; Thu, 23 May 2024 00:59:02 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44N0x2kn008539 for usb@FreeBSD.org; Thu, 23 May 2024 00:59:02 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 252761] multichannel USB audio device reports only 2 channels via SNDCTL_AUDIOINFO Date: Thu, 23 May 2024 00:59:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-usb@freebsd.org Sender: owner-freebsd-usb@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252761 --- Comment #10 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3De07f9178502b7cbc0769fc10e99ad0d01= 3f437fd commit e07f9178502b7cbc0769fc10e99ad0d013f437fd Author: Christos Margiolis AuthorDate: 2024-05-23 00:57:04 +0000 Commit: Christos Margiolis CommitDate: 2024-05-23 00:57:04 +0000 sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO FreeBSD's implementation of SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO does not exactly work as intended. The problem is essentially that both IOCTLs return the same information, while in fact the information returned currently by dsp_oss_audioinfo() is what _only_ SNDCTL_ENGINEINFO is meant to return. This behavior is also noted in the OSS manual [1] (see bold paragraph in "Audio engines and device files" section), but since e8c0d15a64fa ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)") we can actually fix this, because we now expose only a single device for each soundcard, and create the engines (channels) internally. SNDCTL_ENGINEINFO will now report info about all channels in a given device, and SNDCTL_AUDIOINFO[_EX] will only report information about /dev/dspX. To make this work, we also have to modify the SNDCTL_SYSINFO IOCTL to report the number of audio devices and audio engines correctly. While here, modernize the minimum and maximum channel counting in both SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO. Currently these IOCTLs will report only up to 2 channels, which is no longer the case. [1] http://manuals.opensound.com/developer/SNDCTL_AUDIOINFO.html PR: 246231, 252761 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45164 sys/dev/sound/pcm/dsp.c | 179 +++++++++++++++++++++++++++++++++++++++++-= ---- sys/dev/sound/pcm/dsp.h | 3 +- sys/dev/sound/pcm/mixer.c | 8 ++- sys/dev/sound/pcm/sound.c | 8 +-- 4 files changed, 173 insertions(+), 25 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=