pkg: ship usr/lib/security/amd64/*.so links
[unleashed.git] / include / sys / audio.h
blobe3da75a0502480c7e9a3b8037f0425d86e8887bd
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_AUDIO_H
28 #define _SYS_AUDIO_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #include <sys/types.h>
37 #include <sys/audioio.h>
39 #define AUDIO_NAME "audio support" /* STREAMS module name */
40 #define AUDIO_VERSION "Rev 1" /* 1st version of audio arch. */
41 #define AUDIO_CONFIGURATION "Config A" /* 1st configuration */
42 #define AUDIO_MOD_NAME "Audio Device Support"
43 /* STREAMS modldrv name */
45 #define AUDIO_PLAY 0x0001 /* output */
46 #define AUDIO_RECORD 0x0002 /* input */
47 #define AUDIO_BOTH (AUDIO_PLAY|AUDIO_RECORD)
48 #define AUDIO_NO_SLEEP 0x0004
49 #define AUDIO_SLEEP 0x0008
52 #define AUDIO_INIT(I, S) { \
53 uint8_t *__x__; \
54 for (__x__ = (uint8_t *)(I); \
55 __x__ < (((uint8_t *)(I)) + (S)); \
56 *__x__++ = (uint8_t)~0); \
60 * Audio support ioctls.
62 #define AIOC ('A'<<8)
63 #define AUDIO_GET_CH_NUMBER (AIOC|10)
64 #define AUDIO_GET_CH_TYPE (AIOC|11)
65 #define AUDIO_GET_NUM_CHS (AIOC|12)
66 #define AUDIO_GET_AD_DEV (AIOC|13)
67 #define AUDIO_GET_APM_DEV (AIOC|14)
68 #define AUDIO_GET_AS_DEV (AIOC|15)
71 * audio_device_type_e - type of audio device the channel is associated with.
73 enum audio_device_type {
74 UNDEFINED = 0, AUDIO = 1, AUDIOCTL = 2, WTABLE = 3, MIDI = 4,
75 ATIME = 5, USER1 = 9, USER2 = 10, USER3 = 11
77 typedef enum audio_device_type audio_device_type_e;
80 * audio_channel_t - structure holds info on individual channels
82 struct audio_channel {
84 * Process ID of the process that has this channel open. If this is
85 * set to 0 then the channel isn't owned by any process and is free.
87 pid_t pid;
90 * When a channel is opened it is a given a new minor number, we always
91 * clone the device. The ch_number is directly related to that new
92 * minor number. Each open gets a unique channel number.
94 uint_t ch_number;
97 * Type of audio device opened. This cloned channel retains that
98 * type, which determines which Audio Personality Module to use.
100 audio_device_type_e dev_type;
103 * Each device type has a state structure which describes the hardware.
104 * Because each state structure is different we need to know the size
105 * for apps to allocate the correct space.
107 size_t info_size;
110 * The device type's state structure.
112 void *info;
114 typedef struct audio_channel audio_channel_t;
116 #ifdef __cplusplus
118 #endif
120 #endif /* _SYS_AUDIO_H */