From nobody Mon Jul 29 15:35:11 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 4WXj9D0Q2Wz5RSgP; Mon, 29 Jul 2024 15:35:12 +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 4WXj9C71RVz41q0; Mon, 29 Jul 2024 15:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722267312; 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=NiuSmhtM32+5ximDjCoK9x3CKoUHPbpM+tzfedIMNgg=; b=BV4SaV1J57Xlz9k48H60Kn6/6/S+nRq3vb2+U5gKkcySupRt6sx5aSt4yRo3MD3sZ/9c3n PCl0n2QDed0Ia4vyZVTakvxepwdS9QGixBbcln74+dX6QBqSHb5wrsxYm8IftPQDmfCH/G bfjnnMEJH9u80ELrk2x0eclvrOpXAUDOeL6qsDY+O/+extYZJeRH53IGLzenUV3OhoLBFn vwGpnnOehXmYfDUD5C5S6b6V+XhEHM+AI5+cmEulMSrfGc1X2xEfB3KAHiNPr/bdyQeVX1 kMSm2mzJArrZkEnws0egHoPFAfTaY6QB8R6x2sf0nMJ6NLinFdIRBLSUegpJAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722267312; a=rsa-sha256; cv=none; b=xwH99zB38sEFP5f0J6dmMwx7WpOn9PPNjF+NLZhUn2GTj2ULrEcg4v8ON4OfxioST/rZ3O zUe/Q1ExZrVT33ibdk28hnm9Dq7GjHj3wzj9oycJ3iKcc6h4IO93yXKaAjP8NAbW7YBDsa qWh7qYH/+ubbtBryJpxmf6kabGgrm/N6i/cD/qt1FsRXnwdlo/DU5AMGmfvbj2rRVc041O 7Xj3PACjRXEs5R++9qZjUBIWQ2GsqCSAKXYXNTtPcEc41SK/IqgQGBvXEsbaftff32vTfb wV3sBh1DqmtnrHLn3NUNowq6urnnEASTrXtweOJy+SR72Pdr4R70vClaUMNmpA== 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=1722267312; 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=NiuSmhtM32+5ximDjCoK9x3CKoUHPbpM+tzfedIMNgg=; b=H7sEUw7s0JqIQkCsJIadCN1MdBDz6TptbsNGMS86VmTYecEPZNDkVPXJv7XQU4yoP1c/F1 a30P51PbCBjSfeaEhOAX79xqQgnI0ax7EDXiRoFKE5Njoug2ckTTtIBhMwCN3cnNie4Wbl 8YN4Fup+ic1nprrCbxFlBTt6A/Z3SPyhn9QY6Ud5KaG145yvMGoDNmfESnh/RZJpHMAsGk 8iLSpK4d01ptx3k61M6ix/WqqH8IJcWfYl6pZB5DBB9RqDM0g1+GjKE+kBy+44XO1IGRrC FtJqlLIfW20QJ19N4aDw6DmmIk1yC59HWaNEDjYiIFbFY+7aG5bwchXIvm3fLQ== 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 4WXj9C6cmTzgSt; Mon, 29 Jul 2024 15:35:11 +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 46TFZBR2002051; Mon, 29 Jul 2024 15:35:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TFZBVC002048; Mon, 29 Jul 2024 15:35:11 GMT (envelope-from git) Date: Mon, 29 Jul 2024 15:35:11 GMT Message-Id: <202407291535.46TFZBVC002048@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: 894edb7cb133 - stable/14 - sound: Add device status string 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: 894edb7cb133e07c45639b5d478a7d4803748385 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=894edb7cb133e07c45639b5d478a7d4803748385 commit 894edb7cb133e07c45639b5d478a7d4803748385 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:14 +0000 Commit: Christos Margiolis CommitDate: 2024-07-29 15:34:53 +0000 sound: Add device status string to sndstat nvlist Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46163 (cherry picked from commit 810530aa2648812860e84d951d9cf96dfd24e595) --- share/man/man4/sndstat.4 | 6 +++++- sys/dev/sound/pcm/sndstat.c | 1 + sys/sys/sndstat.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index f638fc6834fe..66c1b6e8402d 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -29,7 +29,7 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd June 5, 2024 +.Dd July 26, 2024 .Dt SNDSTAT 4 .Os .Sh NAME @@ -74,6 +74,7 @@ dsps (NVLIST ARRAY): 1 max_chn (NUMBER): 2 provider_info (NVLIST): unit (NUMBER): 0 + status (STRING): on hdaa0 bitperfect (BOOL): FALSE pvchan (NUMBER): 1 rvchan (NUMBER): 0 @@ -169,6 +170,9 @@ provider, there are a number of name/value pairs inside this field: .Bl -tag -width ".Dv channel_info" .It Dv unit Sound card unit. +.It Dv status +Status string. +Usually reports the driver the device is attached on. .It Dv bitperfect Whether the sound card has bit-perfect mode enabled. .It Dv pvchan diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 753531f3694e..fda7a2ad6d48 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -440,6 +440,7 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_UNIT, device_get_unit(d->dev)); // XXX: I want signed integer here + nvlist_add_string(sound4di, SNDST_DSPS_SOUND4_STATUS, d->status); nvlist_add_bool( sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT); nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount); diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 6fef6502ec89..2f2965bb3d05 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -70,6 +70,7 @@ struct sndstioc_nv_arg { */ #define SNDST_DSPS_SOUND4_PROVIDER "sound(4)" #define SNDST_DSPS_SOUND4_UNIT "unit" +#define SNDST_DSPS_SOUND4_STATUS "status" #define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect" #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan"