From nobody Wed Jun 19 10:01:52 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 4W3zg50R2wz5PKG6; Wed, 19 Jun 2024 10:01:53 +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 4W3zg46SnYz4JsV; Wed, 19 Jun 2024 10:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718791312; 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=0ie/JrYBnQZ7V8y2lzBWlBpK0dF6PlPWs05xAkr5wJk=; b=w20uDQtGRMQZRSWnAHsOJQ0wycCjIrZzh1WMzO6jc6wvqmYYoQOoERTLkOjPb2iCT1Ewid J6/8SgIoYbCoaCCpND/eV/MxFHyT3YmoSDYv7jxlfl/IwugXW/4yPVrY9tsO+qaVEfNmDB eUn8Njvs1s5wupqVKBUvt326zP7lV32baVHKeFKCxoAYOPyjKWl+6wfihSTlrIQdDw/VYE JmhWHb2GsT+dlGZBc/RMDHvjNDK04Whu/+NkClyk8trrvHFYsQg1OaIGd88VkpcCFK1LCd QxN+J3zSwLc3rBKIaEn+uuKxMvtrew/nqepg2VC2O8kPQUOPJ1nzg4ozvEVspw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718791312; a=rsa-sha256; cv=none; b=ZTeF0pBzIahaHHTANFTdKs0KcOjnxWXIwvyqSszRSJaAxriiSCvhNfvvZ35cW4zuCsm5cs f61yWE/Wiq0lw57VneW4FB+7v5Wu8SJzACf9azC+iz86cSN1XtQkR0/Q6ej7uxxcoutSm3 i9mmtxQNpLEz2mlcXoJdzUv+rYOR89Gn0IXXu5Pn9pY6p4YZtdm99euKYw8cXdfN4ACLBT 5nxHeKbApmGFnnqWAPrFNpmt8jRwwdU0Lq1Fq0rRl9BzObGW1HieAeU4uwaKpvC09NSuHl ogmIld5wROzxGOTco5cHmZZxWOW27hC2jksHY9ikFt3/3W/l3ymqNB4IFxdqnA== 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=1718791312; 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=0ie/JrYBnQZ7V8y2lzBWlBpK0dF6PlPWs05xAkr5wJk=; b=DCfTl2t3V0gufQCk5OGo9ygpzM92b5UEt+PdPk1CSkw9rSUoLge7ggDiE04sIRGVXN9F1N HpsHhUgyol5pgQk+qH9WhtWjbGKcfQAIckPf0wWzn2j9CrkHUJiNPSU81JLfNNvJ9N9fPx R0jxo6hj4D1tfeNFii0VXfkQhi8XZP1UdekMc9dsvNiAwYrg5H+A3TNFJl8LPP5rGf9GEg r4g/HF6/ZaIIAvVbjJQWG2Icy2rvR6jPBLr4it9r0y8ReIznucc9NjealR21D1jlMme3H7 kXh+jIgvlJVaucnRvzrO6ok5x1qpSY673WjNhO3eiYCov4hGXH/5l8ULEfu64g== 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 4W3zg464vzzd8D; Wed, 19 Jun 2024 10:01:52 +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 45JA1qoh031569; Wed, 19 Jun 2024 10:01:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45JA1qgQ031566; Wed, 19 Jun 2024 10:01:52 GMT (envelope-from git) Date: Wed, 19 Jun 2024 10:01:52 GMT Message-Id: <202406191001.45JA1qgQ031566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6f090333db2a - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f090333db2a9fe6d7f446145054eddd50ddc3fb Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6f090333db2a9fe6d7f446145054eddd50ddc3fb commit 6f090333db2a9fe6d7f446145054eddd50ddc3fb Author: Christos Margiolis AuthorDate: 2024-06-18 13:19:07 +0000 Commit: Christos Margiolis CommitDate: 2024-06-19 10:01:33 +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 (cherry picked from commit 0f878cdfc5a46cc0dc198e12758f12558dfb1bf6) --- 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; /**