From nobody Tue Jun 18 13:19:31 2024 X-Original-To: dev-commits-src-all@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 4W3S5c0dKjz5NnZW; Tue, 18 Jun 2024 13:19:32 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W3S5c022Gz4KX8; Tue, 18 Jun 2024 13:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718716772; 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=4GH3kPshKVxTrne2ksshSguxkGctAy/ugWJOc7IP0ZU=; b=g4IUx2IcYfRpSQpVLajTzmvtY818CrkeYce2qkZYXp0mO2l+QKsB0oh08EEViJ+0GOP1xP ARaDLibTwwcOZ1evT+1IWUcd66boteXXdcoAse4clEi/syKaJkm4bpiNPW4CWm8EZEQQaU WJEDbZyirf8o3am3I9VgZKB//YksWO1LCE8mlFiSU16SAREuh1AE3yfz/Klq+q5UMVQgnG BOd5Bwdn8VmOtl1HJgvJVNZz10jnxKqzWP5LAn+wELVOMr1TTm8jhAYlMeIrYy2QJFlWDJ MHDEonnCshvy3lwGzy4nRxofI1eCSjipeA2KuPqG24RpDFniAYw1SlokY4nWZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718716772; a=rsa-sha256; cv=none; b=qnTNotaoacgWd9X1B08OaqyYgzeXOFgV7vHl6mEJ0hg96NaPNZQ7C0OdnnajAPdiM0Mozi lJ9ZCa4tCAXz6Zz+N8zNgy24NeYqJ1pn2PzcIQNq1bUH/V11FkaDgFqC943e/nYSogUFKn xdmEARr/PiTRRBEjyGmm7vDxyyrsx5BBS4fYFd0qth5dbINWYbRx7PAOv0lehj/uS0dyO7 yXWvKpMefCVuzDDf42YTimGn/2ONMHwb9MT1ypkhuYKFBHMNGKIEz1FhgCV0mVWoT9eEXP 2bIDYfIRcb+eBPgFeJWQJuh+AB/rIyh0/fvks/Ex1ouPWylcm9DNQ5hJfR+ItA== 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=1718716772; 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=4GH3kPshKVxTrne2ksshSguxkGctAy/ugWJOc7IP0ZU=; b=ULkWwra/ASkl0ZpaPKP4VOhldPCtOZKnG3i5K5OxOl75+ZfgA5dcl6/qjRrn2R83UPN8SJ GDIql3hkhAe/1UOMI3RP6viQAYnTXEYEg9/d9ld87txnoszSff+28Mux7Zv9blvuSXiRrU jkEZihkcLMyj7F8Z5ERQ2lvvyr4mGUHGJVjjX9MI95sHLiTUv6cldK/gL2LO5UrXZZr1vt Vii2WZerj2fda0EWnBwvc9A1IlAfv5qfYc+9AfMVF0yTZFvDE1eE9i6j2zUgSLzRc/A2yN 5HpI+zfV9qa9Rv0TIax0aUJJhramdd233KonFEaq55NhU0kIUH29wUtfkEXX2w== 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 4W3S5b6jggz10b6; Tue, 18 Jun 2024 13:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45IDJVde016059; Tue, 18 Jun 2024 13:19:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45IDJVpR016056; Tue, 18 Jun 2024 13:19:31 GMT (envelope-from git) Date: Tue, 18 Jun 2024 13:19:31 GMT Message-Id: <202406181319.45IDJVpR016056@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: 0f878cdfc5a4 - main - sound: Fix oss_audioinfo's card_number, port_number and legacy_device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0f878cdfc5a46cc0dc198e12758f12558dfb1bf6 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0f878cdfc5a46cc0dc198e12758f12558dfb1bf6 commit 0f878cdfc5a46cc0dc198e12758f12558dfb1bf6 Author: Christos Margiolis AuthorDate: 2024-06-18 13:19:07 +0000 Commit: Christos Margiolis CommitDate: 2024-06-18 13:19:07 +0000 sound: Fix oss_audioinfo's card_number, port_number and legacy_device Although the docs advise against using them, it doesn't hurt to fill them out correctly. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45604 --- sys/dev/sound/pcm/dsp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 0f6d7e6b7f49..f94e5c05a743 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2134,8 +2134,8 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name)); ai->pid = -1; strlcpy(ai->cmd, CHN_COMM_UNKNOWN, sizeof(ai->cmd)); - ai->card_number = -1; - ai->port_number = -1; + ai->card_number = unit; + ai->port_number = unit; ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; ai->legacy_device = unit; snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit); @@ -2371,20 +2371,20 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) * should normally not use this field for any * purpose." */ - ai->card_number = -1; + ai->card_number = unit; /** * @todo @c song_name - depends first on * SNDCTL_[GS]ETSONG @todo @c label - depends * on SNDCTL_[GS]ETLABEL * @todo @c port_number - routing information? */ - ai->port_number = -1; + ai->port_number = unit; ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; /** * @note * @c legacy_device - OSSv4 docs: "Obsolete." */ - ai->legacy_device = -1; + ai->legacy_device = unit; snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit); ai->enabled = device_is_attached(d->dev) ? 1 : 0; /**