From nobody Sat Jul 27 11:56:15 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 4WWNPW6wVLz5S6d1; Sat, 27 Jul 2024 11:56:15 +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 4WWNPW2zLXz42mj; Sat, 27 Jul 2024 11:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722081375; 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=SHROlTw/aR+7ztDGQWRY98jI/BQIpaT02tyMxPWhrt4=; b=p1ky0Rg5y86WHbcYH5+gy51aCgOzzAUrIP3L3emGXLulNfuHHIEN+7j4C316ZKML3qbo6t q+S/C0YIFpumeadRqRkVXKxAhEAxC2jWquhA9nJFn8/aJXCgZ7OCKXDyq6daC/tyeg1tPe lUBx12yBpdLXhPfuZX0eMTrEYV++NFVKrvjEypmw1KZAFrNrlSQrKofI0PEkpbs9UWbqxC w+DBNP2cUt3U+0IKWKzyFCurcmXwsE4eCMkO8QouuUDkvKlk96YaGGv6/GlTKBfa/L7o7f 1bR7Zo+J6U1IrtkWwSxQJbRbkjPdkIfm6PZspoB/on83YRvOMmD26t6rvT5Elg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722081375; a=rsa-sha256; cv=none; b=HGUs+6G619hnoMed6PpfdZWTNCEicVVYr0gUpyRK2dG3Zoa+7OTqPc0kfgfCVtTTZorS0U kqqCITKGzgUYWSe2Kaf0NU4ynbwxQfuHjXUYhCvKO0NZa2xUpAJzdbc9dcNJ3P9qm6WnJy C9L1mtfRdB2J8GPHX3cPZnUglxWKHKPatXkMps0IFo9zuCMID4xPR+2KO7XqktrebjsTJR CY0n20O+Qoj1pCnNwNKoXeQFmC11BYxTf0nEDemrw4GhoAab8PMp8y/m9NsSU7t7DRUDF8 QL4LObyL/XBwG3gk7rvcuO+23Ggxpht+lOTCJx1Ayj11I5Cf1CnJsN1+pDvmYw== 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=1722081375; 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=SHROlTw/aR+7ztDGQWRY98jI/BQIpaT02tyMxPWhrt4=; b=MdKsy1pgXT6MlL9D1RKaYjZtiQTccgTcnhGFu/sTFCaWrH9L8NVlhm54x0I4DcX9FjIgrP VPbMw/qZ6nJaGzOtUw2+yaLVSR66dTzSzzBQjob6ArVm6YnSekJTfmLClX2FRZktFk3/xv vqB2FqMCdcqI0pkFJnHRZXvUnnAwqPUzzaEpVsT6hKsUXzElDJ17WxqrG5AdNz+HXO5NtR WDmyu4F/jNOw6LKnd/sqNqmGkNZcH+21Ku/pnYq49PjpUg6gS9T0GUIFQ2OslstiqcvDHt p0XmITEesfC1Vm6uck3T71hjqYl4977eFlmR40QkSQnTDCosAFX1vxw/kREkxw== 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 4WWNPW2YrFz15sP; Sat, 27 Jul 2024 11:56:15 +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 46RBuFwK039513; Sat, 27 Jul 2024 11:56:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46RBuF9S039510; Sat, 27 Jul 2024 11:56:15 GMT (envelope-from git) Date: Sat, 27 Jul 2024 11:56:15 GMT Message-Id: <202407271156.46RBuF9S039510@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: a62837175770 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a6283717577066b0ff6c62053145470ff4134051 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a6283717577066b0ff6c62053145470ff4134051 commit a6283717577066b0ff6c62053145470ff4134051 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:21 +0000 Commit: Christos Margiolis CommitDate: 2024-07-27 11:54:21 +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 --- 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 eca1e391f130..2f745f418b79 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"