From nobody Mon Jul 29 15:35:12 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 4WXj9F1YWQz5RScn; Mon, 29 Jul 2024 15:35:13 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXj9F0wBtz41q1; Mon, 29 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267313; 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=Ff+NYUF3s2YZEzK5hpluM70ntq/WxTAJuftthxmkAR0=; b=luGl9WtVYGUwGEvTU2QbGsQaLvsN5Sp9Gx6wOnA+Hij2ldCITvfF1Rq7t4y1gF3MjyVPo7 TWbbcOBAHuHWXUWix1M45hM8fiRj6vQfmuxdvJyBXyI65xal7Hcar68xvhydVh3xXZI5Pw pwHs4etHqcEXtWkABV1INK0tbX8O5KFpuvZacmGBhJ+JB57A0S/v8JT56iNbfosc8EvWuk b+lFty4+6uOvhhZZ7mcQs6US2mEx0wzVnz/stEMjtx+ylPdFLqXZ84u4cHGBzePsTG4WCj FlR8E1528mcfL8P8FnC3BfrNr/CPU7yIcRcB+eAXOaqxz2LyJ8YfvC0NQi++Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267313; a=rsa-sha256; cv=none; b=jjbmSYG8k1P3BhvHnfAdawB7FnrMrfs8EmY8LhCr1UcAIZ96NilWxuflfYzhOTky/sm6vz HAhYasGHKnqH76fSec/cJ2MKuumSL2+DJPhwyXU6urKvVsDyi3PlL8ly+uKJhNIOroyr4Q n1HNf/jroE6uQX7AXraz1xol9erQyc47mxc07Djl6yO/FxdQuQYHOHtjFEm4eMQkvPdZDy UOsbT/qHdKe1aTi97tN+6ZcMUayArJ7j8o2rj3lROwA5k+0kf9pq/a1AcvKu1PRI23E/7/ IdEDs54RsXTABcvsUOtDGu9QS/mhLlYBDuEmgpclAT55gwAGIA2955hI40kpqQ== 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=1722267313; 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=Ff+NYUF3s2YZEzK5hpluM70ntq/WxTAJuftthxmkAR0=; b=V4AUckIzRd47qRs94nW1oBqTgzLulCWzDD6A9ZxHPWWieL2FoKLjpKEe2roG1bYXPv7WQc YVOZTV2sbxy1Y7ImAZw1G+OqcBEKKpvPNS4Iej+9xAc9HMJoz8hW/8RQy0LscHJNo5E9Q6 EhOZ7lN98CtfqtgL5CD1sN1QVZYQ3PJaCNDDZzc96FiAkaVbpRwMgLOQw6Qi8huii8Rjjh 9I9is7qCzbAktXgSeuNj6h1Yhpunwb58vlVJwQMuCHPnobqhqNcsAh2iMLsupweV1pYd3h dOmqwNFU/cpRAgHh9aa6LzlBWmkm5l96zvTfmISAr9cEfDv4VGUoTDfaW2hQiA== 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 4WXj9F0WXnzgDF; Mon, 29 Jul 2024 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TFZCWN002108; Mon, 29 Jul 2024 15:35:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZCip002105; Mon, 29 Jul 2024 15:35:12 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:12 GMT Message-Id: <202407291535.46TFZCip002105@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: 08c1cf0b5221 - stable/14 - sound: Add *vchanrate and *vchanformat to sndstat nvlist 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: 08c1cf0b5221a4d7581f7c3e0319c5e36300b49b Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=08c1cf0b5221a4d7581f7c3e0319c5e36300b49b commit 08c1cf0b5221a4d7581f7c3e0319c5e36300b49b Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:21 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:54 +0000 sound: Add *vchanrate and *vchanformat to sndstat nvlist Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46164 (cherry picked from commit a6283717577066b0ff6c62053145470ff4134051) --- share/man/man4/sndstat.4 | 12 ++++++++++++ sys/dev/sound/pcm/sndstat.c | 8 ++++++++ sys/sys/sndstat.h | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index 66c1b6e8402d..7c2813356dae 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -77,7 +77,11 @@ dsps (NVLIST ARRAY): 1 status (STRING): on hdaa0 bitperfect (BOOL): FALSE pvchan (NUMBER): 1 + pvchanrate (NUMBER): 48000 + pvchanformat (NUMBER): 0x00000010 rvchan (NUMBER): 0 + rvchanrate (NUMBER): 48000 + rvchanformat (NUMBER): 0x00000010 channel_info (NVLIST_ARRAY): 1 name (STRING): pcm0:virtual_play:dsp0.vp0 parentchan (STRING): pcm0:play:dsp0.p0 @@ -177,8 +181,16 @@ Usually reports the driver the device is attached on. Whether the sound card has bit-perfect mode enabled. .It Dv pvchan Number of playback virtual channels. +.It Dv pvchanrate +Playback virtual channel sample rate. +.It Dv pvchanformat +Playback virtual channel format. .It Dv rvchan Number of recording virtual channels. +.It Dv rvchanrate +Recording virtual channel sample rate. +.It Dv rvchanformat +Recording virtual channel format. .It Dv channel_info Channel information. There are a number of name/value pairs inside this field: diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index fda7a2ad6d48..b0d2c5b6ca21 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -444,7 +444,15 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_bool( sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANRATE, + d->pvchanrate); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANFORMAT, + d->pvchanformat); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHAN, d->rvchancount); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANRATE, + d->rvchanrate); + nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANFORMAT, + d->rvchanformat); nchan = 0; CHN_FOREACH(c, d, channels.pcm) { diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 2f2965bb3d05..f7d0b2f29bd5 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -73,7 +73,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_STATUS "status" #define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" +#define SNDST_DSPS_SOUND4_PVCHANRATE "pvchanrate" +#define SNDST_DSPS_SOUND4_PVCHANFORMAT "pvchanformat" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +#define SNDST_DSPS_SOUND4_RVCHANRATE "rvchanrate" +#define SNDST_DSPS_SOUND4_RVCHANFORMAT "rvchanformat" #define SNDST_DSPS_SOUND4_CHAN_INFO "channel_info" #define SNDST_DSPS_SOUND4_CHAN_NAME "name" #define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan"