Deleted Added
sdiff udiff text old ( 170161 ) new ( 170815 )
full compact
1/*-
2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org>
3 * Copyright by Hannu Savolainen 1995
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/sound/pcm/sound.h 170161 2007-05-31 18:43:33Z ariff $
28 */
29
30/*
31 * first, include kernel header files.
32 */
33
34#ifndef _OS_H_
35#define _OS_H_

--- 97 unchanged lines hidden (view full) ---

133
134#define SD_F_SIMPLEX 0x00000001
135#define SD_F_AUTOVCHAN 0x00000002
136#define SD_F_SOFTPCMVOL 0x00000004
137#define SD_F_PSWAPLR 0x00000008
138#define SD_F_RSWAPLR 0x00000010
139#define SD_F_DYING 0x00000020
140#define SD_F_SUICIDE 0x00000040
141#define SD_F_PRIO_RD 0x10000000
142#define SD_F_PRIO_WR 0x20000000
143#define SD_F_PRIO_SET (SD_F_PRIO_RD | SD_F_PRIO_WR)
144#define SD_F_DIR_SET 0x40000000
145#define SD_F_TRANSIENT 0xf0000000
146
147/* many variables should be reduced to a range. Here define a macro */
148#define RANGE(var, low, high) (var) = \
149 (((var)<(low))? (low) : ((var)>(high))? (high) : (var))
150#define DSP_BUFFSIZE (8192)
151
152/*
153 * Macros for reading/writing PCM sample / int values from bytes array.
154 * Since every process is done using signed integer (and to make our life

--- 304 unchanged lines hidden (view full) ---

459#define SND_DEV_PSS SND_DEV_SNDPROC /* ? */
460#define SND_DEV_NORESET 10
461
462#define SND_DEV_DSPHW_PLAY 11 /* specific playback channel */
463#define SND_DEV_DSPHW_VPLAY 12 /* specific virtual playback channel */
464#define SND_DEV_DSPHW_REC 13 /* specific record channel */
465#define SND_DEV_DSPHW_VREC 14 /* specific virtual record channel */
466
467#define DSP_DEFAULT_SPEED 8000
468
469#define ON 1
470#define OFF 0
471
472extern int pcm_veto_load;
473extern int snd_unit;
474extern int snd_maxautovchans;

--- 85 unchanged lines hidden (view full) ---

560 struct {
561 struct {
562 SLIST_HEAD(, pcm_channel) head;
563 struct {
564 SLIST_HEAD(, pcm_channel) head;
565 } busy;
566 } pcm;
567 } channels;
568 struct snd_clone *clones;
569 struct pcm_channel *fakechan;
570 unsigned devcount, playcount, reccount, pvchancount, rvchancount ;
571 unsigned flags;
572 int inprog;
573 unsigned int bufsz;
574 void *devinfo;
575 device_t dev;
576 char status[SND_STATUSLEN];
577 struct mtx *lock;
578 struct cdev *mixer_dev;
579 uint32_t pvchanrate, pvchanformat;
580 uint32_t rvchanrate, rvchanformat;
581 struct sysctl_ctx_list play_sysctl_ctx, rec_sysctl_ctx;
582 struct sysctl_oid *play_sysctl_tree, *rec_sysctl_tree;
583};
584
585void sound_oss_sysinfo(oss_sysinfo *);
586
587#ifdef PCM_DEBUG_MTX
588#define pcm_lock(d) mtx_lock(((struct snddev_info *)(d))->lock)
589#define pcm_unlock(d) mtx_unlock(((struct snddev_info *)(d))->lock)
590#else
591void pcm_lock(struct snddev_info *d);
592void pcm_unlock(struct snddev_info *d);
593#endif
594
595#ifdef KLD_MODULE
596#define PCM_KLDSTRING(a) ("kld " # a)
597#else
598#define PCM_KLDSTRING(a) ""
599#endif
600
601#endif /* _KERNEL */
602
603#endif /* _OS_H_ */