FreeBSD kernel sound device code
channel.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2005-2009 Ariff Abdullah <ariff@FreeBSD.org>
5 * Portions Copyright (c) Ryan Beasley <ryan.beasley@gmail.com> - GSoC 2006
6 * Copyright (c) 1999 Cameron Grant <cg@FreeBSD.org>
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
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.
17 *
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
28 * SUCH DAMAGE.
29 *
30 * $FreeBSD$
31 */
32
34 u_int32_t minspeed, maxspeed;
35 u_int32_t *fmtlist;
36 u_int32_t caps;
37};
38
40 int id;
41 uint8_t channels, ext;
42 struct {
43 int type;
44 uint32_t members;
46 uint32_t mask;
48};
49
50/* Forward declarations */
51struct pcm_channel;
54
55extern struct mtx snd_pcm_syncgroups_mtx;
57
58#define PCM_SG_LOCK() mtx_lock(&snd_pcm_syncgroups_mtx)
59#define PCM_SG_TRYLOCK() mtx_trylock(&snd_pcm_syncgroups_mtx)
60#define PCM_SG_UNLOCK() mtx_unlock(&snd_pcm_syncgroups_mtx)
61#define PCM_SG_LOCKASSERT(arg) mtx_assert(&snd_pcm_syncgroups_mtx, arg)
62
69 int id;
70};
71
78 struct pcm_channel *ch;
79};
80
81#define CHN_NAMELEN 32
82#define CHN_COMM_UNUSED "<UNUSED>"
83#define CHN_COMM_UNKNOWN "<UNKNOWN>"
84
86 kobj_t methods;
87
88 pid_t pid;
91 u_int32_t align;
92
94 u_int32_t speed;
95 u_int32_t format;
96 u_int32_t flags;
97 u_int32_t feederflags;
98 u_int64_t blocks;
99
101 unsigned int interrupts, xruns, feedcount;
102 unsigned int timeout;
106 void *devinfo;
107 device_t dev;
108 int unit;
110 char comm[MAXCOMLEN + 1];
111 struct mtx *lock;
116 struct cv intr_cv;
121 unsigned int inprog;
127 struct cv cv;
135 unsigned int lw;
141#ifdef OSSV4_EXPERIMENT
142 u_int16_t lpeak, rpeak;
143#endif
144
145 struct {
146 SLIST_HEAD(, pcm_channel) head;
147 SLIST_ENTRY(pcm_channel) link;
148 struct {
149 SLIST_HEAD(, pcm_channel) head;
150 SLIST_ENTRY(pcm_channel) link;
153
154 struct {
155 struct {
156 SLIST_ENTRY(pcm_channel) link;
157 struct {
158 SLIST_ENTRY(pcm_channel) link;
160 struct {
161 SLIST_ENTRY(pcm_channel) link;
165
168
171
172 void *data1, *data2;
173};
174
175#define CHN_HEAD(x, y) &(x)->y.head
176#define CHN_INIT(x, y) SLIST_INIT(CHN_HEAD(x, y))
177#define CHN_LINK(y) y.link
178#define CHN_EMPTY(x, y) SLIST_EMPTY(CHN_HEAD(x, y))
179#define CHN_FIRST(x, y) SLIST_FIRST(CHN_HEAD(x, y))
180
181#define CHN_FOREACH(x, y, z) \
182 SLIST_FOREACH(x, CHN_HEAD(y, z), CHN_LINK(z))
183
184#define CHN_FOREACH_SAFE(w, x, y, z) \
185 SLIST_FOREACH_SAFE(w, CHN_HEAD(x, z), CHN_LINK(z), y)
186
187#define CHN_INSERT_HEAD(x, y, z) \
188 SLIST_INSERT_HEAD(CHN_HEAD(x, z), y, CHN_LINK(z))
189
190#define CHN_INSERT_AFTER(x, y, z) \
191 SLIST_INSERT_AFTER(x, y, CHN_LINK(z))
192
193#define CHN_REMOVE(x, y, z) \
194 SLIST_REMOVE(CHN_HEAD(x, z), y, pcm_channel, CHN_LINK(z))
195
196#define CHN_INSERT_HEAD_SAFE(x, y, z) do { \
197 struct pcm_channel *t = NULL; \
198 CHN_FOREACH(t, x, z) { \
199 if (t == y) \
200 break; \
201 } \
202 if (t != y) \
203 CHN_INSERT_HEAD(x, y, z); \
204} while (0)
205
206#define CHN_INSERT_AFTER_SAFE(w, x, y, z) do { \
207 struct pcm_channel *t = NULL; \
208 CHN_FOREACH(t, w, z) { \
209 if (t == y) \
210 break; \
211 } \
212 if (t != y) \
213 CHN_INSERT_AFTER(x, y, z); \
214} while (0)
215
216#define CHN_REMOVE_SAFE(x, y, z) do { \
217 struct pcm_channel *t = NULL; \
218 CHN_FOREACH(t, x, z) { \
219 if (t == y) \
220 break; \
221 } \
222 if (t == y) \
223 CHN_REMOVE(x, y, z); \
224} while (0)
225
226#define CHN_INSERT_SORT(w, x, y, z) do { \
227 struct pcm_channel *t, *a = NULL; \
228 CHN_FOREACH(t, x, z) { \
229 if ((y)->unit w t->unit) \
230 a = t; \
231 else \
232 break; \
233 } \
234 if (a != NULL) \
235 CHN_INSERT_AFTER(a, y, z); \
236 else \
237 CHN_INSERT_HEAD(x, y, z); \
238} while (0)
239
240#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>, x, y, z)
241#define CHN_INSERT_SORT_DESCEND(x, y, z) CHN_INSERT_SORT(<, x, y, z)
242
243#define CHN_UNIT(x) (snd_unit2u((x)->unit))
244#define CHN_DEV(x) (snd_unit2d((x)->unit))
245#define CHN_CHAN(x) (snd_unit2c((x)->unit))
246
247#define CHN_BUF_PARENT(x, y) \
248 (((x) != NULL && (x)->parentchannel != NULL && \
249 (x)->parentchannel->bufhard != NULL) ? \
250 (x)->parentchannel->bufhard : (y))
251
252#define CHN_BROADCAST(x) do { \
253 if ((x)->cv_waiters != 0) \
254 cv_broadcastpri(x, PRIBIO); \
255} while (0)
256
257#include "channel_if.h"
258
260int chn_write(struct pcm_channel *c, struct uio *buf);
261int chn_read(struct pcm_channel *c, struct uio *buf);
262u_int32_t chn_start(struct pcm_channel *c, int force);
263int chn_sync(struct pcm_channel *c, int threshold);
264int chn_flush(struct pcm_channel *c);
265int chn_poll(struct pcm_channel *c, int ev, struct thread *td);
266
267int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction);
268int chn_kill(struct pcm_channel *c);
269int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd);
270int chn_setvolume(struct pcm_channel *c, int left, int right);
271int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right,
272 int center);
273int chn_setvolume_matrix(struct pcm_channel *c, int vc, int vt, int val);
274int chn_getvolume_matrix(struct pcm_channel *c, int vc, int vt);
275int chn_setmute_multi(struct pcm_channel *c, int vc, int mute);
276int chn_setmute_matrix(struct pcm_channel *c, int vc, int vt, int mute);
277int chn_getmute_matrix(struct pcm_channel *c, int vc, int vt);
278void chn_vpc_reset(struct pcm_channel *c, int vc, int force);
279int chn_setparam(struct pcm_channel *c, uint32_t format, uint32_t speed);
280int chn_setspeed(struct pcm_channel *c, uint32_t speed);
281int chn_setformat(struct pcm_channel *c, uint32_t format);
282int chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz);
283int chn_setlatency(struct pcm_channel *c, int latency);
284void chn_syncstate(struct pcm_channel *c);
285int chn_trigger(struct pcm_channel *c, int go);
286int chn_getptr(struct pcm_channel *c);
287struct pcmchan_caps *chn_getcaps(struct pcm_channel *c);
288u_int32_t chn_getformats(struct pcm_channel *c);
289
291int chn_setmatrix(struct pcm_channel *, struct pcmchan_matrix *);
292
293int chn_oss_getorder(struct pcm_channel *, unsigned long long *);
294int chn_oss_setorder(struct pcm_channel *, unsigned long long *);
295int chn_oss_getmask(struct pcm_channel *, uint32_t *);
296
297void chn_resetbuf(struct pcm_channel *c);
298void chn_intr_locked(struct pcm_channel *c);
299void chn_intr(struct pcm_channel *c);
300int chn_abort(struct pcm_channel *c);
301
302int chn_notify(struct pcm_channel *c, u_int32_t flags);
303
304int chn_getrates(struct pcm_channel *c, int **rates);
305int chn_syncdestroy(struct pcm_channel *c);
306
307#define CHN_SETVOLUME(...) chn_setvolume_matrix(__VA_ARGS__)
308#if defined(SND_DIAGNOSTIC) || defined(INVARIANTS)
309#define CHN_GETVOLUME(...) chn_getvolume_matrix(__VA_ARGS__)
310#else
311#define CHN_GETVOLUME(x, y, z) ((x)->volume[y][z])
312#endif
313
314#define CHN_GETMUTE(x, y, z) ((x)->muted[y][z])
315
316#ifdef OSSV4_EXPERIMENT
317int chn_getpeaks(struct pcm_channel *c, int *lpeak, int *rpeak);
318#endif
319
320#define CHN_LOCKOWNED(c) mtx_owned((c)->lock)
321#define CHN_LOCK(c) mtx_lock((c)->lock)
322#define CHN_UNLOCK(c) mtx_unlock((c)->lock)
323#define CHN_TRYLOCK(c) mtx_trylock((c)->lock)
324#define CHN_LOCKASSERT(c) mtx_assert((c)->lock, MA_OWNED)
325#define CHN_UNLOCKASSERT(c) mtx_assert((c)->lock, MA_NOTOWNED)
326
327int snd_fmtvalid(uint32_t fmt, uint32_t *fmtlist);
328
329uint32_t snd_str2afmt(const char *);
330uint32_t snd_afmt2str(uint32_t, char *, size_t);
331
332#define AFMTSTR_LEN 16
333
334extern int chn_latency;
335extern int chn_latency_profile;
336extern int report_soft_formats;
337extern int report_soft_matrix;
338
339#define PCMDIR_PLAY 1
340#define PCMDIR_PLAY_VIRTUAL 2
341#define PCMDIR_REC -1
342#define PCMDIR_REC_VIRTUAL -2
343
344#define PCMTRIG_START 1
345#define PCMTRIG_EMLDMAWR 2
346#define PCMTRIG_EMLDMARD 3
347#define PCMTRIG_STOP 0
348#define PCMTRIG_ABORT -1
349
350#define PCMTRIG_COMMON(x) ((x) == PCMTRIG_START || \
351 (x) == PCMTRIG_STOP || \
352 (x) == PCMTRIG_ABORT)
353
354#define CHN_F_CLOSING 0x00000001 /* a pending close */
355#define CHN_F_ABORTING 0x00000002 /* a pending abort */
356#define CHN_F_RUNNING 0x00000004 /* dma is running */
357#define CHN_F_TRIGGERED 0x00000008
358#define CHN_F_NOTRIGGER 0x00000010
359#define CHN_F_SLEEPING 0x00000020
360
361#define CHN_F_NBIO 0x00000040 /* do non-blocking i/o */
362#define CHN_F_MMAP 0x00000080 /* has been mmap()ed */
363
364#define CHN_F_BUSY 0x00000100 /* has been opened */
365#define CHN_F_DIRTY 0x00000200 /* need re-config */
366#define CHN_F_DEAD 0x00000400 /* too many errors, dead, mdk */
367#define CHN_F_SILENCE 0x00000800 /* silence, nil, null, yada */
368
369#define CHN_F_HAS_SIZE 0x00001000 /* user set block size */
370#define CHN_F_HAS_VCHAN 0x00002000 /* vchan master */
371
372#define CHN_F_VCHAN_PASSTHROUGH 0x00004000 /* digital ac3/dts passthrough */
373#define CHN_F_VCHAN_ADAPTIVE 0x00008000 /* adaptive format/rate selection */
374#define CHN_F_VCHAN_DYNAMIC (CHN_F_VCHAN_PASSTHROUGH | CHN_F_VCHAN_ADAPTIVE)
375
376#define CHN_F_VIRTUAL 0x10000000 /* not backed by hardware */
377#define CHN_F_BITPERFECT 0x20000000 /* un-cooked, Heh.. */
378#define CHN_F_PASSTHROUGH 0x40000000 /* passthrough re-config */
379#define CHN_F_EXCLUSIVE 0x80000000 /* exclusive access */
380
381#define CHN_F_BITS "\020" \
382 "\001CLOSING" \
383 "\002ABORTING" \
384 "\003RUNNING" \
385 "\004TRIGGERED" \
386 "\005NOTRIGGER" \
387 "\006SLEEPING" \
388 "\007NBIO" \
389 "\010MMAP" \
390 "\011BUSY" \
391 "\012DIRTY" \
392 "\013DEAD" \
393 "\014SILENCE" \
394 "\015HAS_SIZE" \
395 "\016HAS_VCHAN" \
396 "\017VCHAN_PASSTHROUGH" \
397 "\020VCHAN_ADAPTIVE" \
398 "\035VIRTUAL" \
399 "\036BITPERFECT" \
400 "\037PASSTHROUGH" \
401 "\040EXCLUSIVE"
402
403#define CHN_F_RESET (CHN_F_BUSY | CHN_F_DEAD | \
404 CHN_F_VIRTUAL | CHN_F_HAS_VCHAN | \
405 CHN_F_VCHAN_DYNAMIC | \
406 CHN_F_PASSTHROUGH | CHN_F_EXCLUSIVE)
407
408#define CHN_F_MMAP_INVALID (CHN_F_DEAD | CHN_F_RUNNING)
409
410
411
412#define CHN_N_RATE 0x00000001
413#define CHN_N_FORMAT 0x00000002
414#define CHN_N_VOLUME 0x00000004
415#define CHN_N_BLOCKSIZE 0x00000008
416#define CHN_N_TRIGGER 0x00000010
417
418#define CHN_LATENCY_MIN 0
419#define CHN_LATENCY_MAX 10
420#define CHN_LATENCY_DEFAULT 2 /* 21.3ms total buffering */
421#define CHN_POLICY_MIN CHN_LATENCY_MIN
422#define CHN_POLICY_MAX CHN_LATENCY_MAX
423#define CHN_POLICY_DEFAULT CHN_LATENCY_DEFAULT
424
425#define CHN_LATENCY_PROFILE_MIN 0
426#define CHN_LATENCY_PROFILE_MAX 1
427#define CHN_LATENCY_PROFILE_DEFAULT CHN_LATENCY_PROFILE_MAX
428
429#define CHN_STARTED(c) ((c)->flags & CHN_F_TRIGGERED)
430#define CHN_STOPPED(c) (!CHN_STARTED(c))
431#define CHN_DIRSTR(c) (((c)->direction == PCMDIR_PLAY) ? \
432 "PCMDIR_PLAY" : "PCMDIR_REC")
433#define CHN_BITPERFECT(c) ((c)->flags & CHN_F_BITPERFECT)
434#define CHN_PASSTHROUGH(c) ((c)->flags & CHN_F_PASSTHROUGH)
435
436#define CHN_TIMEOUT 5
437#define CHN_TIMEOUT_MIN 1
438#define CHN_TIMEOUT_MAX 10
439
440/*
441 * This should be large enough to hold all pcm data between
442 * tsleeps in chn_{read,write} at the highest sample rate.
443 * (which is usually 48kHz * 16bit * stereo = 192000 bytes/sec)
444 */
445#define CHN_2NDBUFBLKSIZE (2 * 1024)
446/* The total number of blocks per secondary bufhard. */
447#define CHN_2NDBUFBLKNUM (32)
448/* The size of a whole secondary bufhard. */
449#define CHN_2NDBUFMAXSIZE (131072)
450
451#define CHANNEL_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj))
void * devinfo
Definition: ac97_if.m:47
uint32_t format
Definition: audio_dai_if.m:39
uint32_t speed
Definition: audio_dai_if.m:86
int go
Definition: audio_dai_if.m:64
unsigned int fmt
Definition: audio_soc.c:91
struct pcm_synclist snd_pcm_syncgroups
syncgroups' master list
Definition: channel.c:222
void chn_vpc_reset(struct pcm_channel *c, int vc, int force)
Definition: channel.c:1584
int chn_setvolume(struct pcm_channel *c, int left, int right)
Definition: channel.c:1310
int chn_syncdestroy(struct pcm_channel *c)
Remove channel from a sync group, if there is one.
Definition: channel.c:2554
int chn_flush(struct pcm_channel *c)
Definition: channel.c:962
int chn_kill(struct pcm_channel *c)
Definition: channel.c:1285
#define CHN_NAMELEN
Definition: channel.h:81
int report_soft_formats
Definition: channel.c:45
int chn_trigger(struct pcm_channel *c, int go)
Definition: channel.c:2192
int chn_read(struct pcm_channel *c, struct uio *buf)
Definition: channel.c:589
int chn_setmute_matrix(struct pcm_channel *c, int vc, int vt, int mute)
Definition: channel.c:1418
int chn_setspeed(struct pcm_channel *c, uint32_t speed)
Definition: channel.c:2032
uint32_t snd_str2afmt(const char *)
Definition: channel.c:1031
int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd)
int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right, int center)
Definition: channel.c:1322
int chn_poll(struct pcm_channel *c, int ev, struct thread *td)
Definition: channel.c:897
int chn_setlatency(struct pcm_channel *c, int latency)
Definition: channel.c:1975
struct pcmchan_caps * chn_getcaps(struct pcm_channel *c)
Definition: channel.c:2277
int chn_notify(struct pcm_channel *c, u_int32_t flags)
Definition: channel.c:2302
int chn_abort(struct pcm_channel *c)
Definition: channel.c:927
int chn_oss_getorder(struct pcm_channel *, unsigned long long *)
Definition: channel.c:1502
void chn_intr_locked(struct pcm_channel *c)
Definition: channel.c:646
int chn_setformat(struct pcm_channel *c, uint32_t format)
Definition: channel.c:2061
int chn_getvolume_matrix(struct pcm_channel *c, int vc, int vt)
Definition: channel.c:1387
int chn_oss_getmask(struct pcm_channel *, uint32_t *)
Definition: channel.c:1542
int chn_reinit(struct pcm_channel *c)
int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction)
Definition: channel.c:1163
int chn_setmatrix(struct pcm_channel *, struct pcmchan_matrix *)
Definition: channel.c:1482
int snd_fmtvalid(uint32_t fmt, uint32_t *fmtlist)
Definition: channel.c:982
int chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz)
Definition: channel.c:1983
int chn_getrates(struct pcm_channel *c, int **rates)
Fetch array of supported discrete sample rates.
Definition: channel.c:2529
void chn_resetbuf(struct pcm_channel *c)
Definition: channel.c:750
int chn_sync(struct pcm_channel *c, int threshold)
Definition: channel.c:766
SLIST_HEAD(pcm_synclist, pcmchan_syncgroup) snd_pcm_syncgroups
int chn_getmute_matrix(struct pcm_channel *c, int vc, int vt)
Definition: channel.c:1456
struct pcmchan_matrix * chn_getmatrix(struct pcm_channel *)
Definition: channel.c:1469
int chn_latency_profile
Definition: channel.c:76
int report_soft_matrix
Definition: channel.c:49
void chn_intr(struct pcm_channel *c)
Definition: channel.c:660
int chn_write(struct pcm_channel *c, struct uio *buf)
Definition: channel.c:459
u_int32_t chn_getformats(struct pcm_channel *c)
Definition: channel.c:2284
int chn_setparam(struct pcm_channel *c, uint32_t format, uint32_t speed)
Definition: channel.c:1991
int chn_setvolume_matrix(struct pcm_channel *c, int vc, int vt, int val)
Definition: channel.c:1342
void chn_syncstate(struct pcm_channel *c)
Definition: channel.c:2090
u_int32_t chn_start(struct pcm_channel *c, int force)
Definition: channel.c:674
int chn_getptr(struct pcm_channel *c)
Queries sound driver for sample-aligned hardware buffer pointer index.
Definition: channel.c:2267
uint32_t snd_afmt2str(uint32_t, char *, size_t)
Definition: channel.c:1099
int chn_latency
Definition: channel.c:53
struct mtx snd_pcm_syncgroups_mtx
Channel sync group lock.
Definition: channel.c:212
int chn_oss_setorder(struct pcm_channel *, unsigned long long *)
Definition: channel.c:1516
int chn_setmute_multi(struct pcm_channel *c, int vc, int mute)
Definition: channel.c:1400
struct pcm_channel * c
Definition: channel_if.m:106
int ** rates
Definition: channel_if.m:220
int * lpeak
Definition: channel_if.m:195
int * rpeak
Definition: channel_if.m:196
uint32_t spd
Definition: dsp.c:394
unsigned right
Definition: es137x.c:261
unsigned left
Definition: es137x.c:260
int blksz
Definition: hdac_if.m:64
int dir
Definition: hdac_if.m:45
bus_addr_t buf
Definition: hdac_if.m:63
int blkcnt
Definition: hdac_if.m:65
#define SND_CHN_T_MAX
Definition: matrix.h:60
#define SND_VOL_C_MAX
Definition: matrix.h:197
#define SND_CHN_T_VOL_MAX
Definition: matrix.h:175
Definition: hdaa.c:240
u_int32_t align
Definition: channel.h:91
struct pcmchan_syncmember * sm
Definition: channel.h:140
char name[CHN_NAMELEN]
Definition: channel.h:109
u_int32_t flags
Definition: channel.h:96
kobj_t methods
Definition: channel.h:86
int trigger
Definition: channel.h:112
struct pcm_channel::@28 channels
u_int64_t blocks
Definition: channel.h:98
struct pcm_channel::@27 children
u_int32_t feederflags
Definition: channel.h:97
struct pcm_channel::@27::@29 busy
u_int32_t speed
Definition: channel.h:94
void * data2
Definition: channel.h:172
unsigned int lw
Definition: channel.h:135
void * devinfo
Definition: channel.h:106
pid_t pid
Definition: channel.h:88
struct snd_dbuf * bufhard
Definition: channel.h:103
int direction
Definition: channel.h:100
int refcount
Definition: channel.h:89
unsigned int xruns
Definition: channel.h:101
u_int32_t format
Definition: channel.h:95
struct mtx * lock
Definition: channel.h:111
unsigned int inprog
Definition: channel.h:121
struct snd_dbuf * bufsoft
Definition: channel.h:103
struct pcm_channel * parentchannel
Definition: channel.h:105
struct pcm_feeder * feeder
Definition: channel.h:90
int unit
Definition: channel.h:108
int8_t muted[SND_VOL_C_MAX][SND_CHN_T_VOL_MAX]
Definition: channel.h:170
int16_t volume[SND_VOL_C_MAX][SND_CHN_T_VOL_MAX]
Definition: channel.h:169
struct pcm_channel::@28::@30::@32 opened
struct pcmchan_matrix matrix_scratch
Definition: channel.h:167
struct cv cv
Definition: channel.h:127
void * data1
Definition: channel.h:172
struct cv intr_cv
Definition: channel.h:116
struct pcm_channel::@28::@30 pcm
unsigned int interrupts
Definition: channel.h:101
char comm[MAXCOMLEN+1]
Definition: channel.h:110
struct snddev_info * parentsnddev
Definition: channel.h:104
unsigned int feedcount
Definition: channel.h:101
int latency
Definition: channel.h:93
device_t dev
Definition: channel.h:107
unsigned int timeout
Definition: channel.h:102
u_int32_t maxspeed
Definition: channel.h:34
u_int32_t * fmtlist
Definition: channel.h:35
u_int32_t caps
Definition: channel.h:36
u_int32_t minspeed
Definition: channel.h:34
struct pcmchan_matrix::@26 map[SND_CHN_T_MAX+1]
int8_t offset[SND_CHN_T_MAX]
Definition: channel.h:47
uint32_t mask
Definition: channel.h:46
uint8_t channels
Definition: channel.h:41
uint32_t members
Definition: channel.h:44
uint8_t ext
Definition: channel.h:41
Specifies an audio device sync group.
Definition: channel.h:66
SLIST_HEAD(, pcmchan_syncmember) members
SLIST_ENTRY(pcmchan_syncgroup) link
Specifies a container for members of a sync group.
Definition: channel.h:75
struct pcm_channel * ch
Definition: channel.h:78
SLIST_ENTRY(pcmchan_syncmember) link
struct pcmchan_syncgroup * parent
Definition: channel.h:77