Root/
Source at commit 1164 created 13 years 12 days ago. By azimutz, Add some pauses to nvidia.c and ati.c to help user feedback collection. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | *␊ |
6 | * The contents of this file constitute Original Code as defined in and␊ |
7 | * are subject to the Apple Public Source License Version 1.1 (the␊ |
8 | * "License"). You may not use this file except in compliance with the␊ |
9 | * License. Please obtain a copy of the License at␊ |
10 | * http://www.apple.com/publicsource and read it before using this file.␊ |
11 | *␊ |
12 | * This Original Code and all software distributed under the License are␊ |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the␊ |
17 | * License for the specific language governing rights and limitations␊ |
18 | * under the License.␊ |
19 | *␊ |
20 | * @APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | ␊ |
23 | #ifndef _IOKIT_IOAUDIOTYPES_H␊ |
24 | #define _IOKIT_IOAUDIOTYPES_H␊ |
25 | ␊ |
26 | #include <libkern/OSTypes.h>␊ |
27 | #include <mach/message.h>␊ |
28 | #include <device/device_types.h>␊ |
29 | ␊ |
30 | ␊ |
31 | /*!␊ |
32 | * @enum IOAudioEngineMemory␊ |
33 | * @abstract Used to identify the type of memory requested by a client process to be mapped into its process space␊ |
34 | * @discussion This is the parameter to the type field of IOMapMemory when called on an IOAudioEngine. This is␊ |
35 | * only intended for use by the Audio Device API library.␊ |
36 | * @constant kIOAudioSampleBuffer This requests the IOAudioEngine's sample buffer␊ |
37 | * @constant kIOAudioStatusBuffer This requests the IOAudioEngine's status buffer. It's type is IOAudioEngineStatus.␊ |
38 | * @constant kIOAudioMixBuffer This requests the IOAudioEngine's mix buffer␊ |
39 | */␊ |
40 | typedef enum _IOAudioEngineMemory {␊ |
41 | kIOAudioStatusBuffer ␉␉␉= 0,␊ |
42 | kIOAudioSampleBuffer␉␉␉= 1,␊ |
43 | kIOAudioMixBuffer␉␉␉␉= 2,␊ |
44 | ␉kIOAudioBytesInInputBuffer␉␉= 3,␊ |
45 | ␉kIOAudioBytesInOutputBuffer␉␉= 4␊ |
46 | } IOAudioEngineMemory;␊ |
47 | ␊ |
48 | /*!␊ |
49 | * @enum IOAudioEngineCalls␊ |
50 | * @abstract The set of constants passed to IOAudioEngineUserClient::getExternalMethodForIndex() when making calls␊ |
51 | * from the IOAudioFamily user client code.␊ |
52 | */␊ |
53 | typedef enum _IOAudioEngineCalls {␊ |
54 | kIOAudioEngineCallRegisterClientBuffer␉␉␉= 0,␊ |
55 | kIOAudioEngineCallUnregisterClientBuffer␉␉= 1,␊ |
56 | kIOAudioEngineCallGetConnectionID␉␉␉␉= 2,␊ |
57 | kIOAudioEngineCallStart␉␉␉␉␉␉␉= 3,␊ |
58 | kIOAudioEngineCallStop␉␉␉␉␉␉␉= 4,␊ |
59 | ␉kIOAudioEngineCallGetNearestStartTime␉␉␉= 5␊ |
60 | } IOAudioEngineCalls;␊ |
61 | ␊ |
62 | /*! @defined kIOAudioEngineNumCalls The number of elements in the IOAudioEngineCalls enum. */␊ |
63 | #define kIOAudioEngineNumCalls␉␉6␊ |
64 | ␊ |
65 | typedef enum _IOAudioEngineTraps {␊ |
66 | kIOAudioEngineTrapPerformClientIO␉␉␉␉= 0␊ |
67 | } IOAudioEngineTraps;␊ |
68 | ␊ |
69 | typedef enum _IOAudioEngineNotifications {␊ |
70 | kIOAudioEngineAllNotifications ␉␉␉␉␉= 0,␊ |
71 | kIOAudioEngineStreamFormatChangeNotification␉= 1,␊ |
72 | kIOAudioEngineChangeNotification ␉␉␉␉= 2,␊ |
73 | kIOAudioEngineStartedNotification ␉␉␉␉= 3,␊ |
74 | kIOAudioEngineStoppedNotification ␉␉␉␉= 4,␊ |
75 | kIOAudioEnginePausedNotification␉␉␉␉= 5,␊ |
76 | kIOAudioEngineResumedNotification␉␉␉␉= 6␊ |
77 | } IOAudioEngineNotifications;␊ |
78 | ␊ |
79 | /*!␊ |
80 | * @enum IOAudioEngineState␊ |
81 | * @abstract Represents the state of an IOAudioEngine␊ |
82 | * @constant kIOAudioEngineRunning The IOAudioEngine is currently running - it is transferring data to or ␊ |
83 | * from the device.␊ |
84 | * @constant kIOAudioEngineStopped The IOAudioEngine is currently stopped - no activity is occurring.␊ |
85 | */␊ |
86 | ␊ |
87 | typedef enum _IOAudioEngineState {␊ |
88 | kIOAudioEngineStopped␉␉␉␉␉␉␉= 0,␊ |
89 | kIOAudioEngineRunning␉␉␉␉␉␉␉= 1,␊ |
90 | kIOAudioEnginePaused␉␉␉␉␉␉␉= 2,␊ |
91 | kIOAudioEngineResumed␉␉␉␉␉␉␉= 3␊ |
92 | } IOAudioEngineState;␊ |
93 | ␊ |
94 | ␊ |
95 | /*!␊ |
96 | * @typedef IOAudioEngineStatus␊ |
97 | * @abstract Shared-memory structure giving audio engine status␊ |
98 | * @discussion␊ |
99 | * @field fVersion Indicates version of this structure␊ |
100 | * @field fCurrentLoopCount Number of times around the ring buffer since the audio engine started␊ |
101 | * @field fLastLoopTime Timestamp of the last time the ring buffer wrapped␊ |
102 | * @field fEraseHeadSampleFrame Location of the erase head in sample frames - erased up to but not␊ |
103 | * including the given sample frame␊ |
104 | */␊ |
105 | ␊ |
106 | typedef struct _IOAudioEngineStatus {␊ |
107 | UInt32␉␉␉␉␉fVersion;␊ |
108 | volatile UInt32␉␉␉fCurrentLoopCount;␊ |
109 | volatile AbsoluteTime fLastLoopTime;␊ |
110 | volatile UInt32␉␉␉fEraseHeadSampleFrame;␊ |
111 | } IOAudioEngineStatus;␊ |
112 | ␊ |
113 | #define kIOAudioEngineCurrentStatusStructVersion␉␉2␊ |
114 | ␊ |
115 | typedef struct _IOAudioStreamFormat {␊ |
116 | UInt32␉fNumChannels;␊ |
117 | UInt32␉fSampleFormat;␊ |
118 | UInt32␉fNumericRepresentation;␊ |
119 | UInt8␉fBitDepth;␊ |
120 | UInt8␉fBitWidth;␊ |
121 | UInt8␉fAlignment;␊ |
122 | UInt8␉fByteOrder;␊ |
123 | UInt8␉fIsMixable;␊ |
124 | UInt32␉fDriverTag;␊ |
125 | } IOAudioStreamFormat;␊ |
126 | ␊ |
127 | #define kFormatExtensionInvalidVersion␉␉␉␉␉0␊ |
128 | #define kFormatExtensionCurrentVersion␉␉␉␉␉1␊ |
129 | ␊ |
130 | typedef struct _IOAudioStreamFormatExtension {␊ |
131 | UInt32␉fVersion;␊ |
132 | UInt32␉fFlags;␊ |
133 | UInt32␉fFramesPerPacket;␊ |
134 | UInt32␉fBytesPerPacket;␊ |
135 | } IOAudioStreamFormatExtension;␊ |
136 | ␊ |
137 | typedef struct _IOAudioBufferDataDescriptor {␊ |
138 | ␉UInt32␉fActualDataByteSize;␊ |
139 | ␉UInt32␉fActualNumSampleFrames;␊ |
140 | ␉UInt32␉fTotalDataByteSize;␊ |
141 | ␉UInt32␉fNominalDataByteSize;␊ |
142 | ␉UInt8␉fData[1];␊ |
143 | } IOAudioBufferDataDescriptor;␊ |
144 | ␊ |
145 | #define kStreamDataDescriptorInvalidVersion␉␉␉␉0␊ |
146 | #define kStreamDataDescriptorCurrentVersion␉␉␉␉1␊ |
147 | ␊ |
148 | typedef struct _IOAudioStreamDataDescriptor {␊ |
149 | UInt32␉fVersion;␊ |
150 | UInt32␉fNumberOfStreams;␊ |
151 | UInt32␉fStreamLength[1];␉␉␉// Array with fNumberOfStreams number of entries␊ |
152 | } IOAudioStreamDataDescriptor;␊ |
153 | ␊ |
154 | typedef struct _IOAudioSampleIntervalDescriptor {␊ |
155 | ␉UInt32␉sampleIntervalHi;␊ |
156 | ␉UInt32␉sampleIntervalLo;␊ |
157 | } IOAudioSampleIntervalDescriptor;␊ |
158 | ␊ |
159 | /*!␊ |
160 | @struct SMPTETime␊ |
161 | @abstract A structure for holding a SMPTE time.␊ |
162 | @field fSubframes␊ |
163 | The number of subframes in the full message.␊ |
164 | @field fSubframeDivisor␊ |
165 | The number of subframes per frame (typically 80).␊ |
166 | @field fCounter␊ |
167 | The total number of messages received.␊ |
168 | @field fType␊ |
169 | The kind of SMPTE time using the SMPTE time type constants.␊ |
170 | @field fFlags␊ |
171 | A set of flags that indicate the SMPTE state.␊ |
172 | @field fHours␊ |
173 | The number of hourse in the full message.␊ |
174 | @field fMinutes␊ |
175 | The number of minutes in the full message.␊ |
176 | @field fSeconds␊ |
177 | The number of seconds in the full message.␊ |
178 | @field fFrames␊ |
179 | The number of frames in the full message.␊ |
180 | */␊ |
181 | typedef struct _IOAudioSMPTETime␊ |
182 | {␊ |
183 | SInt16 fSubframes;␊ |
184 | SInt16 fSubframeDivisor;␊ |
185 | UInt32 fCounter;␊ |
186 | UInt32 fType;␊ |
187 | UInt32 fFlags;␊ |
188 | SInt16 fHours;␊ |
189 | SInt16 fMinutes;␊ |
190 | SInt16 fSeconds;␊ |
191 | SInt16 fFrames;␊ |
192 | ␊ |
193 | } IOAudioSMPTETime;␊ |
194 | ␊ |
195 | //␉constants describing SMPTE types (taken from the MTC spec)␊ |
196 | enum␊ |
197 | {␊ |
198 | ␉kIOAudioSMPTETimeType24␉␉␉= 0,␊ |
199 | ␉kIOAudioSMPTETimeType25␉␉␉= 1,␊ |
200 | ␉kIOAudioSMPTETimeType30Drop␉␉= 2,␊ |
201 | ␉kIOAudioSMPTETimeType30␉␉␉= 3,␊ |
202 | ␉kIOAudioSMPTETimeType2997␉␉= 4,␊ |
203 | ␉kIOAudioSMPTETimeType2997Drop␉= 5␊ |
204 | };␊ |
205 | ␊ |
206 | //␉flags describing a SMPTE time stamp␊ |
207 | enum␊ |
208 | {␊ |
209 | ␉kIOAudioSMPTETimeValid␉␉= (1L << 0),␉//␉the full time is valid␊ |
210 | ␉kIOAudioSMPTETimeRunning␉= (1L << 1)␉␉//␉time is running␊ |
211 | };␊ |
212 | ␊ |
213 | //␉A struct for encapsulating the parts of a time stamp. The flags␊ |
214 | //␉say which fields are valid.␊ |
215 | typedef struct _IOAudioTimeStamp␊ |
216 | {␊ |
217 | ␉UInt64␉␉␉␉fSampleTime;␉//␉the absolute sample time, was a Float64␊ |
218 | ␉UInt64␉␉␉␉fHostTime;␉␉//␉the host's root timebase's time␊ |
219 | ␉UInt64␉␉␉␉fRateScalar;␉//␉the system rate scalar, was a Float64␊ |
220 | ␉UInt64␉␉␉␉fWordClockTime;␉//␉the word clock time␊ |
221 | ␉IOAudioSMPTETime␉fSMPTETime;␉␉//␉the SMPTE time␊ |
222 | ␉UInt32␉␉␉␉fFlags;␉␉␉//␉the flags indicate which fields are valid␊ |
223 | ␉UInt32␉␉␉␉fReserved;␉␉//␉reserved, pads the structure out to force 8 byte alignment␊ |
224 | } IOAudioTimeStamp;␊ |
225 | ␊ |
226 | //␉flags for the AudioTimeStamp sturcture␊ |
227 | enum␊ |
228 | {␊ |
229 | ␉kIOAudioTimeStampSampleTimeValid␉= (1L << 0),␊ |
230 | ␉kIOAudioTimeStampHostTimeValid␉␉= (1L << 1),␊ |
231 | ␉kIOAudioTimeStampRateScalarValid␉= (1L << 2),␊ |
232 | ␉kIOAudioTimeStampWordClockTimeValid␉= (1L << 3),␊ |
233 | ␉kIOAudioTimeStampSMPTETimeValid␉␉= (1L << 4)␊ |
234 | };␊ |
235 | ␊ |
236 | //␉Some commonly used combinations of timestamp flags␊ |
237 | enum␊ |
238 | {␊ |
239 | ␉kIOAudioTimeStampSampleHostTimeValid␉= (kIOAudioTimeStampSampleTimeValid | kIOAudioTimeStampHostTimeValid)␊ |
240 | };␊ |
241 | ␊ |
242 | /*!␊ |
243 | * @enum IOAudioStreamDirection␊ |
244 | * @abstract Represents the direction of an IOAudioStream␊ |
245 | * @constant kIOAudioStreamDirectionOutput Output buffer␊ |
246 | * @constant kIOAudioStreamDirectionInput Input buffer␊ |
247 | */␊ |
248 | ␊ |
249 | typedef enum _IOAudioStreamDirection {␊ |
250 | kIOAudioStreamDirectionOutput␉= 0,␊ |
251 | kIOAudioStreamDirectionInput␉= 1␊ |
252 | } IOAudioStreamDirection;␊ |
253 | ␊ |
254 | enum {␊ |
255 | ␉kIOAudioDeviceCanBeDefaultNothing␉= 0,␊ |
256 | ␉kIOAudioDeviceCanBeDefaultInput␉␉= (1L << 0),␊ |
257 | ␉kIOAudioDeviceCanBeDefaultOutput␉= (1L << 1),␊ |
258 | ␉kIOAudioDeviceCanBeSystemOutput␉␉= (1L << 2)␊ |
259 | };␊ |
260 | ␊ |
261 | /*!␊ |
262 | * @defined kIOAudioEngineDefaultMixBufferSampleSize␊ |
263 | */␊ |
264 | ␊ |
265 | #define kIOAudioEngineDefaultMixBufferSampleSize␉␉sizeof(float)␊ |
266 | ␊ |
267 | /* The following are for use only by the IOKit.framework audio family code */␊ |
268 | ␊ |
269 | /*!␊ |
270 | * @enum IOAudioControlCalls␊ |
271 | * @abstract The set of constants passed to IOAudioControlUserClient::getExternalMethodForIndex() when making calls␊ |
272 | * from the IOAudioFamily user client code.␊ |
273 | * @constant kIOAudioControlCallSetValue Used to set the value of an IOAudioControl.␊ |
274 | * @constant kIOAudioControlCallGetValue Used to get the value of an IOAudioControl.␊ |
275 | */␊ |
276 | typedef enum _IOAudioControlCalls {␊ |
277 | kIOAudioControlCallSetValue = 0,␊ |
278 | kIOAudioControlCallGetValue = 1␊ |
279 | } IOAudioControlCalls;␊ |
280 | ␊ |
281 | /*! @defined kIOAudioControlNumCalls The number of elements in the IOAudioControlCalls enum. */␊ |
282 | #define kIOAudioControlNumCalls ␉2␊ |
283 | ␊ |
284 | /*!␊ |
285 | * @enum IOAudioControlNotifications␊ |
286 | * @abstract The set of constants passed in the type field of IOAudioControlUserClient::registerNotificaitonPort().␊ |
287 | * @constant kIOAudioControlValueChangeNotification Used to request value change notifications.␊ |
288 | * @constant kIOAudioControlRangeChangeNotification Used to request range change notifications.␊ |
289 | */␊ |
290 | typedef enum _IOAudioControlNotifications {␊ |
291 | kIOAudioControlValueChangeNotification = 0,␊ |
292 | ␉kIOAudioControlRangeChangeNotification = 1␊ |
293 | } IOAudioControlNotifications;␊ |
294 | ␊ |
295 | /*!␊ |
296 | * @struct IOAudioNotificationMessage␊ |
297 | * @abstract Used in the mach message for IOAudio notifications.␊ |
298 | * @field messageHeader Standard mach message header␊ |
299 | * @field ref The param passed to registerNotificationPort() in refCon.␊ |
300 | */␊ |
301 | typedef struct _IOAudioNotificationMessage {␊ |
302 | mach_msg_header_t␉messageHeader;␊ |
303 | UInt32␉␉type;␊ |
304 | UInt32␉␉ref;␊ |
305 | void *␉␉sender;␊ |
306 | } IOAudioNotificationMessage;␊ |
307 | ␊ |
308 | typedef struct _IOAudioSampleRate {␊ |
309 | UInt32␉whole;␊ |
310 | UInt32␉fraction;␊ |
311 | } IOAudioSampleRate;␊ |
312 | ␊ |
313 | #define kNoIdleAudioPowerDown␉␉0xffffffffffffffffULL␊ |
314 | ␊ |
315 | enum {␊ |
316 | kIOAudioPortTypeOutput␉␉= 'outp',␊ |
317 | kIOAudioPortTypeInput␉␉= 'inpt',␊ |
318 | kIOAudioPortTypeMixer␉␉= 'mixr',␊ |
319 | kIOAudioPortTypePassThru␉= 'pass',␊ |
320 | kIOAudioPortTypeProcessing␉= 'proc'␊ |
321 | };␊ |
322 | ␊ |
323 | enum {␊ |
324 | kIOAudioOutputPortSubTypeInternalSpeaker␉= 'ispk',␊ |
325 | kIOAudioOutputPortSubTypeExternalSpeaker␉= 'espk',␊ |
326 | kIOAudioOutputPortSubTypeHeadphones␉␉␉= 'hdpn',␊ |
327 | kIOAudioOutputPortSubTypeLine␉␉␉␉= 'line',␊ |
328 | kIOAudioOutputPortSubTypeSPDIF␉␉␉␉= 'spdf',␊ |
329 | ␊ |
330 | kIOAudioInputPortSubTypeInternalMicrophone␉= 'imic',␊ |
331 | kIOAudioInputPortSubTypeExternalMicrophone␉= 'emic',␊ |
332 | kIOAudioInputPortSubTypeCD␉␉␉␉␉= 'cd ',␊ |
333 | kIOAudioInputPortSubTypeLine␉␉␉␉= 'line',␊ |
334 | kIOAudioInputPortSubTypeSPDIF␉␉␉␉= 'spdf'␊ |
335 | };␊ |
336 | ␊ |
337 | enum {␊ |
338 | kIOAudioControlTypeLevel␉␉␉= 'levl',␊ |
339 | kIOAudioControlTypeToggle␉␉␉= 'togl',␊ |
340 | ␉kIOAudioControlTypeJack␉␉␉␉= 'jack',␊ |
341 | kIOAudioControlTypeSelector␉␉␉= 'slct'␊ |
342 | };␊ |
343 | ␊ |
344 | enum {␊ |
345 | kIOAudioLevelControlSubTypeVolume␉␉␉␉␉␉= 'vlme',␊ |
346 | ␉kIOAudioLevelControlSubTypeLFEVolume␉␉␉␉␉= 'subv',␊ |
347 | ␉kIOAudioLevelControlSubTypePRAMVolume␉␉␉␉␉= 'pram',␊ |
348 | kIOAudioToggleControlSubTypeMute␉␉␉␉␉␉= 'mute',␊ |
349 | kIOAudioToggleControlSubTypeSolo␉␉␉␉␉␉= 'solo',␊ |
350 | ␉kIOAudioToggleControlSubTypeLFEMute␉␉␉␉␉␉= 'subm',␊ |
351 | ␉kIOAudioToggleControlSubTypeiSubAttach␉␉␉␉␉= 'atch',␊ |
352 | kIOAudioSelectorControlSubTypeOutput␉␉␉␉␉= 'outp',␊ |
353 | kIOAudioSelectorControlSubTypeInput␉␉␉␉␉␉= 'inpt',␊ |
354 | kIOAudioSelectorControlSubTypeClockSource␉␉␉␉= 'clck',␊ |
355 | kIOAudioSelectorControlSubTypeDestination␉␉␉␉= 'dest',␊ |
356 | ␉kIOAudioSelectorControlSubTypeChannelNominalLineLevel␉= 'nlev',␊ |
357 | ␉kIOAudioSelectorControlSubTypeChannelLevelPlus4dBu␉␉= '4dbu',␊ |
358 | ␉kIOAudioSelectorControlSubTypeChannelLevelMinus10dBV␉= '10db',␊ |
359 | ␉kIOAudioSelectorControlSubTypeChannelLevelMinus20dBV␉= '20db',␊ |
360 | ␉kIOAudioSelectorControlSubTypeChannelLevelMicLevel␉␉= 'micl',␊ |
361 | ␉kIOAudioSelectorControlSubTypeChannelLevelInstrumentLevel␉␉= 'istl'␊ |
362 | };␊ |
363 | ␊ |
364 | enum {␊ |
365 | kIOAudioControlUsageOutput␉␉␉␉= 'outp',␊ |
366 | kIOAudioControlUsageInput␉␉␉␉= 'inpt',␊ |
367 | kIOAudioControlUsagePassThru␉␉␉= 'pass',␊ |
368 | kIOAudioControlUsageCoreAudioProperty␉= 'prop'␊ |
369 | };␊ |
370 | ␊ |
371 | enum {␊ |
372 | kIOAudioControlChannelNumberInactive␉␉␉␉= -1,␊ |
373 | kIOAudioControlChannelIDAll␉␉␉␉␉␉␉= 0,␊ |
374 | kIOAudioControlChannelIDDefaultLeft␉␉␉␉␉= 1,␊ |
375 | kIOAudioControlChannelIDDefaultRight␉␉␉␉= 2,␊ |
376 | kIOAudioControlChannelIDDefaultCenter␉␉␉␉= 3,␊ |
377 | kIOAudioControlChannelIDDefaultLeftRear␉␉␉␉= 4,␊ |
378 | kIOAudioControlChannelIDDefaultRightRear␉␉␉= 5,␊ |
379 | kIOAudioControlChannelIDDefaultSub␉␉␉␉␉= 6,␊ |
380 | kIOAudioControlChannelIDDefaultFrontLeftCenter␉␉= 7,␊ |
381 | kIOAudioControlChannelIDDefaultFrontRightCenter␉␉= 8,␊ |
382 | kIOAudioControlChannelIDDefaultRearCenter␉␉␉= 9,␊ |
383 | kIOAudioControlChannelIDDefaultSurroundLeft␉␉␉= 10,␊ |
384 | kIOAudioControlChannelIDDefaultSurroundRight␉␉= 11␊ |
385 | };␊ |
386 | ␊ |
387 | enum {␊ |
388 | kIOAudioSelectorControlSelectionValueNone␉␉␉␉= 'none',␊ |
389 | ␊ |
390 | // Output-specific selection IDs ␊ |
391 | kIOAudioSelectorControlSelectionValueInternalSpeaker␉= 'ispk',␊ |
392 | kIOAudioSelectorControlSelectionValueExternalSpeaker␉= 'espk',␊ |
393 | kIOAudioSelectorControlSelectionValueHeadphones␉␉␉= 'hdpn',␊ |
394 | ␊ |
395 | // Input-specific selection IDs␊ |
396 | kIOAudioSelectorControlSelectionValueInternalMicrophone␉= 'imic',␊ |
397 | kIOAudioSelectorControlSelectionValueExternalMicrophone␉= 'emic',␊ |
398 | kIOAudioSelectorControlSelectionValueCD␉␉␉␉␉= 'cd ',␊ |
399 | ␊ |
400 | // Common selection IDs␊ |
401 | kIOAudioSelectorControlSelectionValueLine␉␉␉␉= 'line',␊ |
402 | kIOAudioSelectorControlSelectionValueSPDIF␉␉␉␉= 'spdf'␊ |
403 | };␊ |
404 | ␊ |
405 | enum {␊ |
406 | kIOAudioStreamSampleFormatLinearPCM␉␉= 'lpcm',␊ |
407 | kIOAudioStreamSampleFormatIEEEFloat␉␉= 'ieee',␊ |
408 | kIOAudioStreamSampleFormatALaw␉␉␉= 'alaw',␊ |
409 | kIOAudioStreamSampleFormatMuLaw␉␉␉= 'ulaw',␊ |
410 | kIOAudioStreamSampleFormatMPEG␉␉␉= 'mpeg',␊ |
411 | kIOAudioStreamSampleFormatAC3␉␉␉= 'ac-3',␊ |
412 | kIOAudioStreamSampleFormat1937AC3␉␉= 'cac3',␊ |
413 | kIOAudioStreamSampleFormat1937MPEG1␉␉= 'mpg1',␊ |
414 | kIOAudioStreamSampleFormat1937MPEG2␉␉= 'mpg2',␊ |
415 | ␉kIOAudioStreamSampleFormatTimeCode␉␉= 'time'␉␉//␉a stream of IOAudioTimeStamp structures that capture any incoming time code information␊ |
416 | };␊ |
417 | ␊ |
418 | enum {␊ |
419 | kIOAudioStreamNumericRepresentationSignedInt␉= 'sint',␊ |
420 | kIOAudioStreamNumericRepresentationUnsignedInt␉= 'uint',␊ |
421 | ␉kIOAudioStreamNumericRepresentationIEEE754Float = 'flot'␊ |
422 | };␊ |
423 | ␊ |
424 | enum {␊ |
425 | ␉kIOAudioClockSelectorTypeInternal␉␉␉= 'int ',␊ |
426 | ␉kIOAudioClockSelectorTypeExternal␉␉␉= 'ext ',␊ |
427 | ␉kIOAudioClockSelectorTypeAESEBU␉␉␉␉= 'asbu',␊ |
428 | ␉kIOAudioClockSelectorTypeTOSLink␉␉␉= 'tosl',␊ |
429 | ␉kIOAudioClockSelectorTypeSPDIF␉␉␉␉= 'spdf',␊ |
430 | ␉kIOAudioClockSelectorTypeADATOptical␉␉= 'adto',␊ |
431 | ␉kIOAudioClockSelectorTypeADAT9Pin␉␉␉= 'adt9',␊ |
432 | ␉kIOAudioClockSelectorTypeSMPTE␉␉␉␉= 'smpt',␊ |
433 | ␉kIOAudioClockSelectorTypeVideo␉␉␉␉= 'vdeo',␊ |
434 | ␉kIOAudioClockSelectorTypeControl␉␉␉= 'cnrl',␊ |
435 | ␉kIOAudioClockSelectorTypeOther␉␉␉␉= 'othr',␊ |
436 | };␊ |
437 | ␊ |
438 | enum {␊ |
439 | kIOAudioStreamAlignmentLowByte␉␉␉␉␉= 0,␊ |
440 | kIOAudioStreamAlignmentHighByte␉␉␉␉␉= 1␊ |
441 | };␊ |
442 | ␊ |
443 | enum {␊ |
444 | kIOAudioStreamByteOrderBigEndian␉␉␉␉= 0,␊ |
445 | kIOAudioStreamByteOrderLittleEndian␉␉␉␉= 1␊ |
446 | };␊ |
447 | ␊ |
448 | enum {␊ |
449 | kIOAudioLevelControlNegativeInfinity␉␉␉= 0xffffffff␊ |
450 | };␊ |
451 | ␊ |
452 | enum {␊ |
453 | kIOAudioNewClockDomain␉␉␉␉␉␉␉= 0xffffffff␊ |
454 | };␊ |
455 | ␊ |
456 | // Device connection types␊ |
457 | #ifndef __OPEN_SOURCE__␊ |
458 | //␉<rdar://7130813>␉Added kIOAudioDeviceTransportTypeDisplayPort␊ |
459 | #endif␊ |
460 | enum {␊ |
461 | ␉kIOAudioDeviceTransportTypeBuiltIn␉␉␉␉= 'bltn',␊ |
462 | ␉kIOAudioDeviceTransportTypePCI␉␉␉␉␉= 'pci ',␊ |
463 | ␉kIOAudioDeviceTransportTypeUSB␉␉␉␉␉= 'usb ',␊ |
464 | ␉kIOAudioDeviceTransportTypeFireWire␉␉␉␉= '1394',␊ |
465 | ␉kIOAudioDeviceTransportTypeNetwork␉␉␉␉= 'ntwk',␊ |
466 | ␉kIOAudioDeviceTransportTypeWireless␉␉␉␉= 'wrls',␊ |
467 | ␉kIOAudioDeviceTransportTypeOther␉␉␉␉= 'othr',␊ |
468 | ␉kIOAudioDeviceTransportTypeBluetooth␉␉␉= 'blue',␊ |
469 | ␉kIOAudioDeviceTransportTypeVirtual␉␉␉␉= 'virt',␊ |
470 | ␉kIOAudioDeviceTransportTypeDisplayPort␉␉␉= 'dprt',␊ |
471 | ␉kIOAudioDeviceTransportTypeHdmi␉␉␉␉␉= 'hdmi'␊ |
472 | ␊ |
473 | };␊ |
474 | ␊ |
475 | // types that go nowhere␊ |
476 | enum {␊ |
477 | ␉OUTPUT_NULL␉␉␉␉␉␉␉␉␉␉= 0x0100,␊ |
478 | ␉INPUT_NULL␉␉␉␉␉␉␉␉␉␉= 0x0101␊ |
479 | };␊ |
480 | ␊ |
481 | // Input terminal types␊ |
482 | enum {␊ |
483 | ␉INPUT_UNDEFINED␉␉␉␉␉␉␉␉␉= 0x0200,␊ |
484 | ␉INPUT_MICROPHONE␉␉␉␉␉␉␉␉= 0x0201,␊ |
485 | ␉INPUT_DESKTOP_MICROPHONE␉␉␉␉␉␉= 0x0202,␊ |
486 | ␉INPUT_PERSONAL_MICROPHONE␉␉␉␉␉␉= 0x0203,␊ |
487 | ␉INPUT_OMNIDIRECTIONAL_MICROPHONE␉␉␉␉= 0x0204,␊ |
488 | ␉INPUT_MICROPHONE_ARRAY␉␉␉␉␉␉␉= 0x0205,␊ |
489 | ␉INPUT_PROCESSING_MICROPHONE_ARRAY␉␉␉␉= 0x0206,␊ |
490 | ␉INPUT_MODEM_AUDIO␉␉␉␉␉␉␉␉= 0x207␊ |
491 | };␊ |
492 | ␊ |
493 | // Output terminal types␊ |
494 | enum {␊ |
495 | ␉OUTPUT_UNDEFINED␉␉␉␉␉␉␉␉= 0x0300,␊ |
496 | ␉OUTPUT_SPEAKER␉␉␉␉␉␉␉␉␉= 0x0301,␊ |
497 | ␉OUTPUT_HEADPHONES␉␉␉␉␉␉␉␉= 0x0302,␊ |
498 | ␉OUTPUT_HEAD_MOUNTED_DISPLAY_AUDIO␉␉␉␉= 0x0303,␊ |
499 | ␉OUTPUT_DESKTOP_SPEAKER␉␉␉␉␉␉␉= 0x0304,␊ |
500 | ␉OUTPUT_ROOM_SPEAKER␉␉␉␉␉␉␉␉= 0x0305,␊ |
501 | ␉OUTPUT_COMMUNICATION_SPEAKER␉␉␉␉␉= 0x0306,␊ |
502 | ␉OUTPUT_LOW_FREQUENCY_EFFECTS_SPEAKER␉␉␉= 0x0307␊ |
503 | };␊ |
504 | ␊ |
505 | // Bi-directional terminal types␊ |
506 | enum {␊ |
507 | ␉BIDIRECTIONAL_UNDEFINED␉␉␉␉␉␉␉= 0x0400,␊ |
508 | ␉BIDIRECTIONAL_HANDSET␉␉␉␉␉␉␉= 0x0401,␊ |
509 | ␉BIDIRECTIONAL_HEADSET␉␉␉␉␉␉␉= 0x0402,␊ |
510 | ␉BIDIRECTIONAL_SPEAKERPHONE_NO_ECHO_REDX␉␉␉= 0x0403,␊ |
511 | ␉BIDIRECTIONAL_ECHO_SUPPRESSING_SPEAKERPHONE␉␉= 0x0404,␊ |
512 | ␉BIDIRECTIONAL_ECHO_CANCELING_SPEAKERPHONE␉␉= 0x0405␊ |
513 | };␊ |
514 | ␊ |
515 | // Telephony terminal types␊ |
516 | enum {␊ |
517 | ␉TELEPHONY_UNDEFINED␉␉␉␉␉␉␉␉= 0x0500,␊ |
518 | ␉TELEPHONY_PHONE_LINE␉␉␉␉␉␉␉= 0x0501,␊ |
519 | ␉TELEPHONY_TELEPHONE␉␉␉␉␉␉␉␉= 0x0502,␊ |
520 | ␉TELEPHONY_DOWN_LINE_PHONE␉␉␉␉␉␉= 0x0503␊ |
521 | };␊ |
522 | ␊ |
523 | // External terminal types␊ |
524 | enum {␊ |
525 | ␉EXTERNAL_UNDEFINED␉␉␉␉␉␉␉␉= 0x0600,␊ |
526 | ␉EXTERNAL_ANALOG_CONNECTOR␉␉␉␉␉␉= 0x0601,␊ |
527 | ␉EXTERNAL_DIGITAL_AUDIO_INTERFACE␉␉␉␉= 0x0602,␊ |
528 | ␉EXTERNAL_LINE_CONNECTOR␉␉␉␉␉␉␉= 0x0603,␊ |
529 | ␉EXTERNAL_LEGACY_AUDIO_CONNECTOR␉␉␉␉␉= 0x0604,␊ |
530 | ␉EXTERNAL_SPDIF_INTERFACE␉␉␉␉␉␉= 0x0605,␊ |
531 | ␉EXTERNAL_1394_DA_STREAM␉␉␉␉␉␉␉= 0x0606,␊ |
532 | ␉EXTERNAL_1394_DV_STREAM_SOUNDTRACK␉␉␉␉= 0x0607,␊ |
533 | ␉EXTERNAL_ADAT␉␉␉␉␉␉␉␉␉= 0x0608,␊ |
534 | ␉EXTERNAL_TDIF␉␉␉␉␉␉␉␉␉= 0x0609,␊ |
535 | ␉EXTERNAL_MADI␉␉␉␉␉␉␉␉␉= 0x060A␊ |
536 | };␊ |
537 | ␊ |
538 | // Embedded terminal types␊ |
539 | enum {␊ |
540 | ␉EMBEDDED_UNDEFINED␉␉␉␉␉␉␉␉= 0x0700,␊ |
541 | ␉EMBEDDED_LEVEL_CALIBRATION_NOISE_SOURCE␉␉␉= 0x0701,␊ |
542 | ␉EMBEDDED_EQUALIZATION_NOISE␉␉␉␉␉␉= 0x0702,␊ |
543 | ␉EMBEDDED_CD_PLAYER␉␉␉␉␉␉␉␉= 0x0703,␊ |
544 | ␉EMBEDDED_DAT␉␉␉␉␉␉␉␉␉= 0x0704,␊ |
545 | ␉EMBEDDED_DCC␉␉␉␉␉␉␉␉␉= 0x0705,␊ |
546 | ␉EMBEDDED_MINIDISK␉␉␉␉␉␉␉␉= 0x0706,␊ |
547 | ␉EMBEDDED_ANALOG_TAPE␉␉␉␉␉␉␉= 0x0707,␊ |
548 | ␉EMBEDDED_PHONOGRAPH␉␉␉␉␉␉␉␉= 0x0708,␊ |
549 | ␉EMBEDDED_VCR_AUDIO␉␉␉␉␉␉␉␉= 0x0709,␊ |
550 | ␉EMBEDDED_VIDEO_DISC_AUDIO␉␉␉␉␉␉= 0x070A,␊ |
551 | ␉EMBEDDED_DVD_AUDIO␉␉␉␉␉␉␉␉= 0x070B,␊ |
552 | ␉EMBEDDED_TV_TUNER_AUDIO␉␉␉␉␉␉␉= 0x070C,␊ |
553 | ␉EMBEDDED_SATELLITE_RECEIVER_AUDIO␉␉␉␉= 0x070D,␊ |
554 | ␉EMBEDDED_CABLE_TUNER_AUDIO␉␉␉␉␉␉= 0x070E,␊ |
555 | ␉EMBEDDED_DSS_AUDIO␉␉␉␉␉␉␉␉= 0x070F,␊ |
556 | ␉EMBEDDED_RADIO_RECEIVER␉␉␉␉␉␉␉= 0x0710,␊ |
557 | ␉EMBEDDED_RADIO_TRANSMITTER␉␉␉␉␉␉= 0x0711,␊ |
558 | ␉EMBEDDED_MULTITRACK_RECORDER␉␉␉␉␉= 0x0712,␊ |
559 | ␉EMBEDDED_SYNTHESIZER␉␉␉␉␉␉␉= 0x0713␊ |
560 | };␊ |
561 | ␊ |
562 | // Processing terminal types␊ |
563 | enum {␊ |
564 | ␉PROCESSOR_UNDEFINED␉␉␉␉␉␉␉␉= 0x0800,␊ |
565 | ␉PROCESSOR_GENERAL␉␉␉␉␉␉␉␉= 0x0801␊ |
566 | };␊ |
567 | ␊ |
568 | //␉Channel spatial position types␊ |
569 | ␊ |
570 | #ifndef __OPEN_SOURCE__␊ |
571 | //␉<rdar://6868206>␉NOTE: the following are derived from CoreAudioTypes.h␊ |
572 | #endif␊ |
573 | ␊ |
574 | #define␉kIOAudioChannelLabel_Discrete_field_ba␉␉16␊ |
575 | enum {␊ |
576 | kIOAudioChannelLabel_Unknown = 0xFFFFFFFF, // unknown or unspecified other use␊ |
577 | kIOAudioChannelLabel_Unused = 0, // channel is present, but has no intended use or destination␊ |
578 | kIOAudioChannelLabel_UseCoordinates = 100, // channel is described by the mCoordinates fields.␊ |
579 | ␉␊ |
580 | kIOAudioChannelLabel_Left = 1,␊ |
581 | kIOAudioChannelLabel_Right = 2,␊ |
582 | kIOAudioChannelLabel_Center = 3,␊ |
583 | kIOAudioChannelLabel_LFEScreen = 4,␊ |
584 | kIOAudioChannelLabel_LeftSurround = 5, // WAVE: "Back Left"␊ |
585 | kIOAudioChannelLabel_RightSurround = 6, // WAVE: "Back Right"␊ |
586 | kIOAudioChannelLabel_LeftCenter = 7,␊ |
587 | kIOAudioChannelLabel_RightCenter = 8,␊ |
588 | kIOAudioChannelLabel_CenterSurround = 9, // WAVE: "Back Center" or plain "Rear Surround"␊ |
589 | kIOAudioChannelLabel_LeftSurroundDirect = 10, // WAVE: "Side Left"␊ |
590 | kIOAudioChannelLabel_RightSurroundDirect = 11, // WAVE: "Side Right"␊ |
591 | kIOAudioChannelLabel_TopCenterSurround = 12,␊ |
592 | kIOAudioChannelLabel_VerticalHeightLeft = 13, // WAVE: "Top Front Left"␊ |
593 | kIOAudioChannelLabel_VerticalHeightCenter = 14, // WAVE: "Top Front Center"␊ |
594 | kIOAudioChannelLabel_VerticalHeightRight = 15, // WAVE: "Top Front Right"␊ |
595 | ␉␊ |
596 | kIOAudioChannelLabel_TopBackLeft = 16,␊ |
597 | kIOAudioChannelLabel_TopBackCenter = 17,␊ |
598 | kIOAudioChannelLabel_TopBackRight = 18,␊ |
599 | ␉␊ |
600 | kIOAudioChannelLabel_RearSurroundLeft = 33,␊ |
601 | kIOAudioChannelLabel_RearSurroundRight = 34,␊ |
602 | kIOAudioChannelLabel_LeftWide = 35,␊ |
603 | kIOAudioChannelLabel_RightWide = 36,␊ |
604 | kIOAudioChannelLabel_LFE2 = 37,␊ |
605 | kIOAudioChannelLabel_LeftTotal = 38, // matrix encoded 4 channels␊ |
606 | kIOAudioChannelLabel_RightTotal = 39, // matrix encoded 4 channels␊ |
607 | kIOAudioChannelLabel_HearingImpaired = 40,␊ |
608 | kIOAudioChannelLabel_Narration = 41,␊ |
609 | kIOAudioChannelLabel_Mono = 42,␊ |
610 | kIOAudioChannelLabel_DialogCentricMix = 43,␊ |
611 | ␉␊ |
612 | kIOAudioChannelLabel_CenterSurroundDirect = 44, // back center, non diffuse␊ |
613 | ␊ |
614 | kIOAudioChannelLabel_Haptic = 45,␊ |
615 | ␉␊ |
616 | // first order ambisonic channels␊ |
617 | kIOAudioChannelLabel_Ambisonic_W = 200,␊ |
618 | kIOAudioChannelLabel_Ambisonic_X = 201,␊ |
619 | kIOAudioChannelLabel_Ambisonic_Y = 202,␊ |
620 | kIOAudioChannelLabel_Ambisonic_Z = 203,␊ |
621 | ␉␊ |
622 | // Mid/Side Recording␊ |
623 | kIOAudioChannelLabel_MS_Mid = 204,␊ |
624 | kIOAudioChannelLabel_MS_Side = 205,␊ |
625 | ␉␊ |
626 | // X-Y Recording␊ |
627 | kIOAudioChannelLabel_XY_X = 206,␊ |
628 | kIOAudioChannelLabel_XY_Y = 207,␊ |
629 | ␉␊ |
630 | // other␊ |
631 | kIOAudioChannelLabel_HeadphonesLeft = 301,␊ |
632 | kIOAudioChannelLabel_HeadphonesRight = 302,␊ |
633 | kIOAudioChannelLabel_ClickTrack = 304,␊ |
634 | kIOAudioChannelLabel_ForeignLanguage = 305,␊ |
635 | ␉␊ |
636 | // generic discrete channel␊ |
637 | kIOAudioChannelLabel_Discrete = 400,␊ |
638 | ␉␊ |
639 | // numbered discrete channel␊ |
640 | kIOAudioChannelLabel_Discrete_0 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 0,␊ |
641 | kIOAudioChannelLabel_Discrete_1 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 1,␊ |
642 | kIOAudioChannelLabel_Discrete_2 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 2,␊ |
643 | kIOAudioChannelLabel_Discrete_3 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 3,␊ |
644 | kIOAudioChannelLabel_Discrete_4 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 4,␊ |
645 | kIOAudioChannelLabel_Discrete_5 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 5,␊ |
646 | kIOAudioChannelLabel_Discrete_6 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 6,␊ |
647 | kIOAudioChannelLabel_Discrete_7 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 7,␊ |
648 | kIOAudioChannelLabel_Discrete_8 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 8,␊ |
649 | kIOAudioChannelLabel_Discrete_9 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 9,␊ |
650 | kIOAudioChannelLabel_Discrete_10 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 10,␊ |
651 | kIOAudioChannelLabel_Discrete_11 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 11,␊ |
652 | kIOAudioChannelLabel_Discrete_12 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 12,␊ |
653 | kIOAudioChannelLabel_Discrete_13 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 13,␊ |
654 | kIOAudioChannelLabel_Discrete_14 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 14,␊ |
655 | kIOAudioChannelLabel_Discrete_15 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 15,␊ |
656 | kIOAudioChannelLabel_Discrete_65535 = ( 1 << kIOAudioChannelLabel_Discrete_field_ba ) | 65535␊ |
657 | };␊ |
658 | ␊ |
659 | ␊ |
660 | ␊ |
661 | #endif /* _IOKIT_IOAUDIOTYPES_H */␊ |
662 |