2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2020 The FreeBSD Foundation
6 * This software was developed by Ka Ho Ng
7 * under sponsorship from the FreeBSD Foundation.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 #ifndef _SYS_SNDSTAT_H_
34 #define _SYS_SNDSTAT_H_
36 #include <sys/types.h>
38 #include <sys/ioccom.h>
41 struct sndstioc_nv_arg {
42 size_t nbytes; /* [IN/OUT] buffer size/number of bytes filled */
43 void *buf; /* [OUT] buffer holding a packed nvlist */
47 * Common name/value pair names
49 #define SNDST_DSPS "dsps"
50 #define SNDST_DSPS_FROM_USER "from_user"
51 #define SNDST_DSPS_PCHAN "pchan"
52 #define SNDST_DSPS_RCHAN "rchan"
53 #define SNDST_DSPS_NAMEUNIT "nameunit"
54 #define SNDST_DSPS_DEVNODE "devnode"
55 #define SNDST_DSPS_DESC "desc"
56 #define SNDST_DSPS_PROVIDER "provider"
57 #define SNDST_DSPS_PROVIDER_INFO "provider_info"
60 * Common name/value pair names for play/rec info
62 #define SNDST_DSPS_INFO_PLAY "info_play"
63 #define SNDST_DSPS_INFO_REC "info_rec"
64 #define SNDST_DSPS_INFO_MIN_RATE "min_rate"
65 #define SNDST_DSPS_INFO_MAX_RATE "max_rate"
66 #define SNDST_DSPS_INFO_FORMATS "formats"
67 #define SNDST_DSPS_INFO_MIN_CHN "min_chn"
68 #define SNDST_DSPS_INFO_MAX_CHN "max_chn"
71 * sound(4)-specific name/value pair names
73 #define SNDST_DSPS_SOUND4_PROVIDER "sound(4)"
74 #define SNDST_DSPS_SOUND4_UNIT "unit"
75 #define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect"
76 #define SNDST_DSPS_SOUND4_PVCHAN "pvchan"
77 #define SNDST_DSPS_SOUND4_RVCHAN "rvchan"
79 #define SNDSTIOC_REFRESH_DEVS \
81 #define SNDSTIOC_GET_DEVS \
82 _IOWR('D', 101, struct sndstioc_nv_arg)
83 #define SNDSTIOC_ADD_USER_DEVS \
84 _IOWR('D', 102, struct sndstioc_nv_arg)
85 #define SNDSTIOC_FLUSH_USER_DEVS \
89 #ifdef COMPAT_FREEBSD32
91 struct sndstioc_nv_arg32 {
96 #define SNDSTIOC_GET_DEVS32 \
97 _IOC_NEWTYPE(SNDSTIOC_GET_DEVS, struct sndstioc_nv_arg32)
98 #define SNDSTIOC_ADD_USER_DEVS32 \
99 _IOC_NEWTYPE(SNDSTIOC_ADD_USER_DEVS, struct sndstioc_nv_arg32)
104 #endif /* !_SYS_SNDSTAT_H_ */