From nobody Sat Jul 27 11:56:14 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 4WWNPV2lHVz5S6FC; Sat, 27 Jul 2024 11:56:14 +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 4WWNPV25M8z42kP; Sat, 27 Jul 2024 11:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722081374; 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=GDIzzkrTPDlZxsA+7fybgnSk856rsRq15hwWaPMoYxw=; b=RVENF3BRZgrdjutsNhRUMRT3p9N0ZIfz8EtdhO7qlVffraSUemS65FNr4W/QojqUyezZMn CzBkvT0tl1be6l+ECmzKP/FnEGXIaWOjtEqNOHfcv33QLbrjkkq24+MGbjvOqA7FfTzqrH 5WCgPSit3qLuIcJpF6X3ddCmEXettH/nBbstsrM+2kBhSTuBN+Y0/NZ5PcOKYxkNNwPuub HYzvTFRdXUfvAOMFTRzCAtzLrvvmOjLfrjxFLCiNCJNdANonbcWlNwDzbSJh46JXpokugo BHEqYw+MpNA+5MmXDoOx8P2+J1Jeyy5CZ5OcrUhPxqTLpyP+qko1QRyMDTzHrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722081374; a=rsa-sha256; cv=none; b=O4XKlUvEkoVYhNlQvboSF0WibXG8ZcWC2ZSOgvzpa5dnQQUiBMrfdJj6CVQ5+3Hf5QtkY4 GfDF5YmzfBAAwYEAJ+HNEs0tRab3pLg49uRSBvEfik/7Z6vmuY+1D6WsCKbNA+j/XhBTgO +9N1qPndqRrAtEhgKx2cT82gsON9Z0XwXtR5ljscVMkbJ0j77ErnO9Ld0RFjWnaq96IMaM K5E6UPRmsFmDfXoUPbuDbZ+mtYerYbu5TP0P1MDNclQYtzYLpl2FbRjJegHc/a0mJiIDjk EhVu7zk367c/078Q5KhQ3cVXtPcQCFLMIWqa9LodTxIJDkl1KamDDP5SmtJlug== 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=1722081374; 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=GDIzzkrTPDlZxsA+7fybgnSk856rsRq15hwWaPMoYxw=; b=EvkOjG6czBtMRkotmWd0E9j1nQrq6GKn7SSeft1pX4brn4IkuEOwkAGXGVK4QiJwUAxS9A owU0M3OCXIkGzX60VrYocTEVcwstu6+dEsXipVQr96K14TqlT6v7hPg7/f3ykRMKDuapUq pRTb+ghc6jrRmEAzLcxGIa5IVjlFHkA8GCyHEVW1mHEosvNTab7P6mhsFeU2vDgnQLzJZy GVjXWcdMI4nwd1GjMhx1hP0yC0zYMUDXiMmEljc7wTACJZMrM6yokwLJAbsVVCDCaBronP QCin8N/gpt+4SHZrJJG7qYjSg8sGYerXT7ZfATcxjAKsgYAQA6ccR9o9L9JDkg== 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 4WWNPV17s7z15Zj; Sat, 27 Jul 2024 11:56:14 +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 46RBuEaY039462; Sat, 27 Jul 2024 11:56:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46RBuES8039459; Sat, 27 Jul 2024 11:56:14 GMT (envelope-from git) Date: Sat, 27 Jul 2024 11:56:14 GMT Message-Id: <202407271156.46RBuES8039459@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: 810530aa2648 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 810530aa2648812860e84d951d9cf96dfd24e595 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=810530aa2648812860e84d951d9cf96dfd24e595 commit 810530aa2648812860e84d951d9cf96dfd24e595 Author: Christos Margiolis AuthorDate: 2024-07-27 11:54:14 +0000 Commit: Christos Margiolis CommitDate: 2024-07-27 11:54:14 +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 --- 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 2af0619961d8..eca1e391f130 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"