From nobody Sat May 25 19:32:35 2024 X-Original-To: multimedia@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 4VmsW85KnFz5LTNn for ; Sat, 25 May 2024 19:32:36 +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 4VmsW81bt0z4lcl for ; Sat, 25 May 2024 19:32:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665556; a=rsa-sha256; cv=none; b=fTcTPSEe4g1upbh+gY1ZIILBJIrETqBh42PsGoob8OSYkheOyhvwSKd7/RQJJgC0nxzXP4 0DSebner9dwDj3rMewaGXDx4BAW5j8t0wZgyampsIkkONG9tb1p3XpkNI/AjV1atDjKVai nwGkUv9fv6IHL1uv3TYlPCLLMQtBTxR5Wg4n4kcOnrJaF2w4/I1Rp8wAQnUs245+xo+HTi Liu/T00Kt8YJ+b+e8q4IlpfcAa1a3BXusVdDHykYXn0wIoH+Bp9OTik66L8NImdMKnairH sSei/E2dKnLACad2UUTgPpRev96x+2IbX99UQttQcGDaHeoeZ+Jm64ien6w3Iw== 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=1716665556; 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=yIUEMJ2khpXDoxFljCWe/qggvOmlh8DunStHjs7d5gw=; b=v/De/RQMbMtFGYvg6gcxaAYDE4OPJNdpwZ+3Uc317FmKkrymSs0FC+EjCuiXigc0pGEiP4 Bt8sAPJ45bZKndYGgX4wlvxaXSzuog7dqjegYM8ma/E/6q77spsaXqfLhOpBNT6mSoW/qs 0kfP8s6nboBNZR8kNL+XLusArQZ+xwhoYC+YP3HqYttIZPf3a7KRhGMe1pXpmwvnANyXWR WYpX4oKgcQrzBCOAl4WlkdGr7U4kMgN9bYiwUeufwu7+j+BeyM8jvlX1kshZboxNMyJ3eY dN4TiVpWJgSsGmCiVsxs0LpJ0V1z69jtvtDjbVmAtke/DTWcF7whlEvMOE0D+g== 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 4VmsW76GzQzTQJ for ; Sat, 25 May 2024 19:32:35 +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 44PJWZi3003299 for ; Sat, 25 May 2024 19:32:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44PJWZqG003298 for multimedia@FreeBSD.org; Sat, 25 May 2024 19:32:35 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: multimedia@FreeBSD.org Subject: [Bug 246231] dev/sound: SNDCTL_AUDIOINFO is actually SNDCTL_ENGINEINFO Date: Sat, 25 May 2024 19:32:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE 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: multimedia@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: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246231 --- Comment #4 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.=