From nobody Sat May 25 19:32:37 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 4VmsWB3znBz5LT7x for ; Sat, 25 May 2024 19:32:38 +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 4VmsW96NNkz4llL for ; Sat, 25 May 2024 19:32:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665557; a=rsa-sha256; cv=none; b=iUnqC5sT5iGryRmh6U2M3cIeHUfAUl3xd6SxLntdNVkQaJS0X8nK5aDzzBfKgut15efT+N E/Cx9Xe3a6WmFYJpjr8uFRxbQKnM4ouCb6TLRm7dONS653brxakwI7d6kjRbw7xprpZPtv S9bxTId2StrJNVDyrqVQTEM1iTacWYp/HiMmx8SCZkSQ7mLf82o+nd3mNi5CEJNemqhlWp 8aTLp7LkdIYG5F9fQZ5VNmQJe21yLktZb0yOc4idB9yM/YwelqBCfWDcCoIefb6n7ndPkY RPHDWKCn+BtEDz+8aFBI2VHkPPhqWAD9F5lr1nAOxvr6WyZkUiI3xar8hm447g== 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=1716665557; 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=KHddKEIs0pVfPhW+RlnqVo7vZ9Q3zrdpm+oozpDKX5M=; b=o4Lbb4ENEU9luTvJQnXVTzKjTQJo1IGoEUYPLji/IczbX/rWZxauBUehHRD4TE516cK88B zuSsz2ZJpVnGhI6S/u0nWe8uqNjGrGk+2rCQ1c3llFKM9bAVzv/F1HbuQsWLTUxHIJIh5Y dkx2vuQOTUXIJYeHIJLETM4KxHJKneW0vlyOVCU908FiBq5fi3YnUS+kj6quODMEp7KnDE nuxVA8qpkGouFUnxtJhWIacGDr68gi4QGeo4dQ4mlrvCOiF0MfbvIRWoeeNW406Pe5EnuG hQl8pcniMz23Q2PgICHYGAQWxBahXXf8NuQPpMzkQpX2hOe5qh43uQ4XDGZ7Ug== 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 4VmsW94qGszVfg for ; Sat, 25 May 2024 19:32:37 +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 44PJWbrQ003420 for ; Sat, 25 May 2024 19:32:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44PJWbU0003419 for usb@FreeBSD.org; Sat, 25 May 2024 19:32:37 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: Sat, 25 May 2024 19:32:37 +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: Closed X-Bugzilla-Resolution: FIXED 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 #11 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3De8a80b4e50e8d992fe46a95509b37fc45= 7288f93 commit e8a80b4e50e8d992fe46a95509b37fc457288f93 Author: Christos Margiolis AuthorDate: 2024-05-23 00:57:04 +0000 Commit: Christos Margiolis CommitDate: 2024-05-25 19:30:26 +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 (cherry picked from commit e07f9178502b7cbc0769fc10e99ad0d013f437fd) 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.=