1/*
2 * Copyright (c) 1998-2013 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 _IOAUDIODEFINES_H
24#define _IOAUDIODEFINES_H
25
26#define kIOAudioDeviceClassName		"IOAudioDevice"
27#define kIOAudioEngineClassName		"IOAudioEngine"
28#define kIOAudioStreamClassName		"IOAudioStream"
29#define kIOAudioPortClassName		"IOAudioPort"
30#define kIOAudioControlClassName	"IOAudioControl"
31
32/*!
33 * @defined kIOAudioSampleRateKey
34 * @abstract The key in the IORegistry for the IOAudioEngine sample rate attribute
35 * @discussion This value is represented as an integer in samples per second.
36 */
37#define kIOAudioSampleRateKey				"IOAudioSampleRate"
38
39#define kIOAudioSampleRateWholeNumberKey	"IOAudioSampleRateWholeNumber"
40#define kIOAudioSampleRateFractionKey		"IOAudioSampleRateFraction"
41
42
43
44/******
45 *
46 * IOAudioDevice  defines
47 *
48 *****/
49
50
51/*!
52 * @defined kIOAudioDeviceNameKey
53 * @abstract The key in the IORegistry for the IOAudioDevice name attribute.
54 */
55#define kIOAudioDeviceNameKey				"IOAudioDeviceName"
56
57#define kIOAudioDeviceShortNameKey			"IOAudioDeviceShortName"
58
59/*!
60 * @defined kIOAudioDeviceManufacturerNameKey
61 * @abstract The key in the IORegistry for the IOAudioDevice manufacturer name attribute.
62 */
63#define kIOAudioDeviceManufacturerNameKey	"IOAudioDeviceManufacturerName"
64
65#define kIOAudioDeviceLocalizedBundleKey	"IOAudioDeviceLocalizedBundle"
66
67#define kIOAudioDeviceTransportTypeKey		"IOAudioDeviceTransportType"
68
69#define kIOAudioDeviceConfigurationAppKey	"IOAudioDeviceConfigurationApplication"
70
71#define kIOAudioDeviceCanBeDefaults			"IOAudioDeviceCanBeDefaults"
72
73#define kIOAudioDeviceModelIDKey			"IOAudioDeviceModelID"
74
75
76/*!
77 * @defined kIOAudioDeviceIconName
78 * @abstract The key in the IORegistry for the IOAudioDevice icon name attribute.
79 */
80#define kIOAudioDeviceIconNameKey		"IOAudioDeviceIconName"
81
82#define kIOAudioDeviceIconTypeKey		"IOAudioDeviceIconType"
83
84#define kIOAudioDeviceIconSubDirKey	"IOAudioDeviceIconSubDir"
85
86/*****
87 *
88 * IOAudioEngine defines
89 *
90 *****/
91
92
93 /*!
94 * @defined kIOAudioEngineStateKey
95 * @abstract The key in the IORegistry for the IOAudioEngine state atrribute
96 * @discussion The value for this key may be one of: "Running", "Stopped" or "Paused".  Currently the "Paused"
97 *  state is unimplemented.
98 */
99#define kIOAudioEngineStateKey		"IOAudioEngineState"
100
101/*!
102 * @defined kIOAudioEngineOutputSampleLatencyKey
103 * @abstract The key in the IORegistry for the IOAudioEngine output sample latency key
104 * @discussion
105 */
106#define kIOAudioEngineOutputSampleLatencyKey		"IOAudioEngineOutputSampleLatency"
107
108/*!
109 * @defined kIOAudioStreamSampleLatencyKey
110 * @abstract The key in the IORegistry for the IOAudioStream output sample latency key
111 * @discussion Tells the HAL how much latency is on a particular stream.  If two streams
112 * on the same engine have different latencies (e.g. one is analog, one is digital), then
113 * set this property on both streams to inform the HAL of the latency differences.  Alternately,
114 * you can set the engine latency, and just include the latency additional to that for the particular
115 * stream.  The HAL will add the engine and stream latency numbers together to get the total latency.
116 */
117#define kIOAudioStreamSampleLatencyKey				"IOAudioStreamSampleLatency"
118
119#define kIOAudioEngineInputSampleLatencyKey			"IOAudioEngineInputSampleLatency"
120
121#define kIOAudioEngineSampleOffsetKey				"IOAudioEngineSampleOffset"
122
123#define kIOAudioEngineInputSampleOffsetKey			"IOAudioEngineInputSampleOffset"
124
125#define kIOAudioEngineNumSampleFramesPerBufferKey	"IOAudioEngineNumSampleFramesPerBuffer"
126
127#define kIOAudioEngineCoreAudioPlugInKey			"IOAudioEngineCoreAudioPlugIn"
128
129#define kIOAudioEngineNumActiveUserClientsKey		"IOAudioEngineNumActiveUserClients"
130
131#define kIOAudioEngineUserClientActiveKey			"IOAudioEngineUserClientActive"
132
133#define kIOAudioEngineGlobalUniqueIDKey				"IOAudioEngineGlobalUniqueID"
134
135#define kIOAudioEngineDescriptionKey				"IOAudioEngineDescription"
136
137#define kIOAudioEngineClockIsStableKey				"IOAudioEngineClockIsStable"
138
139#define kIOAudioEngineClockDomainKey				"IOAudioEngineClockDomain"
140
141#define kIOAudioEngineIsHiddenKey               "IOAudioEngineIsHidden"
142/*!
143 * @defined kIOAudioEngineFullChannelNamesKey
144 * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of fully constructed names for each channel keyed by the device channel
145 * @discussion
146 */
147#define	kIOAudioEngineFullChannelNamesKey			"IOAudioEngineChannelNames"
148
149/*!
150 * @defined kIOAudioEngineFullChannelCategoryNamesKey
151 * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of category names for each channel keyed by the device channel
152 * @discussion
153 */
154#define	kIOAudioEngineFullChannelCategoryNamesKey	"IOAudioEngineChannelCategoryNames"
155
156/*!
157 * @defined kIOAudioEngineFullChannelNamesKey
158 * @abstract The key in the IORegistry for the IOAudioEngine's dictionary of number names for each channel keyed by the device channel
159 * @discussion
160 */
161#define	kIOAudioEngineFullChannelNumberNamesKey			"IOAudioEngineChannelNumberNames"
162
163#define	kIOAudioEngineFullChannelNameKeyInputFormat		"InputChannel%u"
164
165#define	kIOAudioEngineFullChannelNameKeyOutputFormat	"OutputChannel%u"
166
167#define kIOAudioEngineFlavorKey							"IOAudioEngineFlavor"
168
169#define	kIOAudioEngineAlwaysLoadCoreAudioPlugInKey		"IOAudioEngineAlwaysLoadCoreAudioPlugIn"
170
171/*!
172 * @defined kIOAudioEngineInputChannelLayoutKey
173 * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel.  See IOAudioTypes.h.
174 * @discussion
175 */
176
177#define kIOAudioEngineInputChannelLayoutKey				"IOAudioEngineInputChannelLayout"
178
179/*!
180 * @defined kIOAudioEngineOutputChannelLayoutKey
181 * @abstract The key in the IORegistry for the IOAudioEngine's dictionary describes an array of OSNumber data that describe the spatial position of each channel.  See IOAudioTypes.h.
182 * @discussion
183 */
184
185#define kIOAudioEngineOutputChannelLayoutKey			"IOAudioEngineOutputChannelLayout"
186
187/*****
188 *
189 * IOAudioStream defines
190 *
191 *****/
192
193
194#define kIOAudioStreamIDKey					"IOAudioStreamID"
195#define kIOAudioStreamDescriptionKey		"IOAudioStreamDescription"
196#define kIOAudioStreamNumClientsKey			"IOAudioStreamNumClients"
197
198/*!
199 * @defined kIOAudioStreamDirectionKey
200 * @abstract The key in the IORegistry for the IOAudioStream direction attribute.
201 * @discussion The value for this key may be either "Output" or "Input".
202 */
203#define kIOAudioStreamDirectionKey				"IOAudioStreamDirection"
204
205#define kIOAudioStreamStartingChannelIDKey		"IOAudioStreamStartingChannelID"
206#define kIOAudioStreamStartingChannelNumberKey	"IOAudioStreamStartingChannelNumber"
207#define kIOAudioStreamAvailableKey				"IOAudioStreamAvailable"
208
209#define kIOAudioStreamFormatKey					"IOAudioStreamFormat"
210#define kIOAudioStreamAvailableFormatsKey		"IOAudioStreamAvailableFormats"
211
212#define kIOAudioStreamNumChannelsKey			"IOAudioStreamNumChannels"
213#define kIOAudioStreamSampleFormatKey			"IOAudioStreamSampleFormat"
214
215#define kIOAudioStreamNumericRepresentationKey	"IOAudioStreamNumericRepresentation"
216
217#define kIOAudioStreamFormatFlagsKey			"IOAudioStreamFormatFlags"
218#define kIOAudioStreamFramesPerPacketKey		"IOAudioStreamFramesPerPacket"
219#define kIOAudioStreamBytesPerPacketKey			"IOAudioStreamBytesPerPacket"
220
221
222#define kIOAudioStreamBitDepthKey				"IOAudioStreamBitDepth"
223#define kIOAudioStreamBitWidthKey				"IOAudioStreamBitWidth"
224
225#define kIOAudioStreamAlignmentKey				"IOAudioStreamAlignment"
226
227#define kIOAudioStreamByteOrderKey				"IOAudioStreamByteOrder"
228
229#define kIOAudioStreamIsMixableKey				"IOAudioStreamIsMixable"
230
231#define kIOAudioStreamMinimumSampleRateKey		"IOAudioStreamMinimumSampleRate"
232#define kIOAudioStreamMaximumSampleRateKey		"IOAudioStreamMaximumSampleRate"
233
234#define kIOAudioStreamDriverTagKey				"IOAudioStreamDriverTag"
235
236#define kIOAudioStreamTerminalTypeKey			"IOAudioStreamTerminalType"
237
238/*****
239 *
240 * IOAudioPort defines
241 *
242 *****/
243
244
245 /*!
246 * @defined kIOAudioPortTypeKey
247 * @abstract The key in the IORegistry for the IOAudioPort type attribute.
248 * @discussion This is a driver-defined text attribute that may contain any type.
249 *  Common types are defined as: "Speaker", "Headphones", "Microphone", "CD", "Line", "Digital", "Mixer", "PassThru".
250 */
251#define kIOAudioPortTypeKey			"IOAudioPortType"
252
253/*!
254 * @defined kIOAudioPortSubTypeKey
255 * @abstract The key in the IORegistry for the IOAudioPort subtype attribute.
256 * @discussion The IOAudioPort subtype is a driver-defined text attribute designed to complement the type
257 *  attribute.
258 */
259#define kIOAudioPortSubTypeKey		"IOAudioPortSubType"
260
261/*!
262 * @defined kIOAudioPortNameKey
263 * @abstract The key in the IORegistry for the IOAudioPort name attribute.
264 */
265#define kIOAudioPortNameKey			"IOAudioPortName"
266
267
268
269/*****
270 *
271 * IOAudioControl defines
272 *
273 *****/
274
275
276 /*!
277 * @defined kIOAudioControlTypeKey
278 * @abstract The key in the IORegistry for the IOAudioCntrol type attribute.
279 * @discussion The value of this text attribute may be defined by the driver, however system-defined
280 *  types recognized by the upper-level software are "Level", "Mute", "Selector".
281 */
282#define kIOAudioControlTypeKey		"IOAudioControlType"
283
284#define kIOAudioControlSubTypeKey	"IOAudioControlSubType"
285
286#define kIOAudioControlUsageKey		"IOAudioControlUsage"
287
288#define kIOAudioControlIDKey		"IOAudioControlID"
289
290/*!
291 * @defined kIOAudioControlChannelIDKey
292 * @abstract The key in the IORegistry for the IOAudioControl channel ID attribute
293 * @discussion The value for this key is an integer which may be driver defined.  Default values for
294 *  common channel types are provided in the following defines.
295 */
296#define kIOAudioControlChannelIDKey		"IOAudioControlChannelID"
297
298#define kIOAudioControlChannelNumberKey			"IOAudioControlChannelNumber"
299
300#define kIOAudioControlCoreAudioPropertyIDKey	"IOAudioControlCoreAudioPropertyID"
301/*!
302 * @defined kIOAudioControlChannelNameKey
303 * @abstract The key in the IORegistry for the IOAudioControl name attribute.
304 * @discussion This name should be a human-readable name for the channel(s) represented by the port.
305 *  *** NOTE *** We really need to make all of the human-readable attributes that have potential to
306 *  be used in a GUI localizable.  There will need to be localized strings in the kext bundle matching
307 *  the text.
308 */
309#define kIOAudioControlChannelNameKey		"IOAudioControlChannelName"
310
311/*!
312 * @defined kIOAudioControlChannelNameAll
313 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
314 *  the channel name for all channels.
315 */
316#define kIOAudioControlChannelNameAll		"All Channels"
317
318/*!
319 * @defined kIOAudioControlChannelNameLeft
320 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
321 *  the channel name for the left channel.
322 */
323#define kIOAudioControlChannelNameLeft		"Left"
324
325/*!
326 * @defined kIOAudioControlChannelNameRight
327 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
328 *  the channel name for the right channel.
329 */
330#define kIOAudioControlChannelNameRight		"Right"
331
332/*!
333 * @defined kIOAudioControlChannelNameCenter
334 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
335 *  the channel name for the center channel.
336 */
337#define kIOAudioControlChannelNameCenter	"Center"
338
339/*!
340 * @defined kIOAudioControlChannelNameLeftRear
341 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
342 *  the channel name for the left rear channel.
343 */
344#define kIOAudioControlChannelNameLeftRear	"LeftRear"
345
346/*!
347 * @defined kIOAudioControlChannelNameRightRear
348 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
349 *  the channel name for the right rear channel.
350 */
351#define kIOAudioControlChannelNameRightRear	"RightRear"
352
353/*!
354 * @defined kIOAudioControlChannelNameSub
355 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
356 *  the channel name for the sub/LFE channel.
357 */
358#define kIOAudioControlChannelNameSub		"Sub"
359
360/*!
361 * @defined kIOAudioControlChannelNameFrontLeftCenter
362 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
363 *  the channel name for the FrontLeftCenter channel.
364 */
365#define kIOAudioControlChannelNameFrontLeftCenter		"FrontLeftCenter"
366
367/*!
368 * @defined kIOAudioControlChannelNameFrontRightCenter
369 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
370 *  the channel name for the FrontRightCenter channel.
371 */
372#define kIOAudioControlChannelNameFrontRightCenter		"FrontRightCenter"
373
374/*!
375 * @defined kIOAudioControlChannelNameRearCenter
376 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
377 *  the channel name for the RearCenter channel.
378 */
379#define kIOAudioControlChannelNameRearCenter		"RearCenter"
380
381/*!
382 * @defined kIOAudioControlChannelNameSurroundLeft
383 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
384 *  the channel name for the SurroundLeft channel.
385 */
386#define kIOAudioControlChannelNameSurroundLeft		"SurroundLeft"
387
388/*!
389 * @defined kIOAudioControlChannelNameSurroundRight
390 * @abstract The value for the kIOAudioControlChannelNameKey in the IORegistry representing
391 *  the channel name for the SurroundRight channel.
392 */
393#define kIOAudioControlChannelNameSurroundRight		"SurroundRight"
394
395
396/*!
397 * @defined kIOAudioControlValueKey
398 * @abstract The key in the IORegistry for the IOAudioControl value attribute.
399 * @discussion The value returned by this key is a 32-bit integer representing the current value of the IOAudioControl.
400 */
401#define kIOAudioControlValueKey				"IOAudioControlValue"
402
403/*!
404 * @defined kIOAudioControlValueIsReadOnlyKey
405 * @abstract The key in the IORegistry for the IOAudioControl value-is-read-only attribute.
406 * @discussion The value returned by this key is a 32-bit integer but the value doesn't have any direct meaning.
407 *  Instead, the presence of this key indicates that the value for the control is read-only
408 */
409#define kIOAudioControlValueIsReadOnlyKey	"IOAudioControlValueIsReadOnly"
410
411/*!
412 * @defined kIOAudioLevelControlMinValueKey
413 * @abstract The key in the IORegistry for the IOAudioControl minimum value attribute.
414 * @discussion The value returned by this key is a 32-bit integer representing the minimum value for the IOAudioControl.
415 *  This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum
416 *  value.
417 */
418#define kIOAudioLevelControlMinValueKey		"IOAudioLevelControlMinValue"
419
420/*!
421 * @defined kIOAudioLevelControlMaxValueKey
422 * @abstract The key in the IORegistry for the IOAudioControl maximum value attribute.
423 * @discussion The value returned by this key is a 32-bit integer representing the maximum value for the IOAudioControl.
424 *  This is currently only valid for Level controls or other driver-defined controls that have a minimum and maximum
425 *  value.
426 */
427#define kIOAudioLevelControlMaxValueKey		"IOAudioLevelControlMaxValue"
428
429/*!
430 * @defined kIOAudioLevelControlMinDBKey
431 * @abstract The key in the IORgistry for the IOAudioControl minimum db value attribute.
432 * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit
433 *  integer.  It represents the minimum value in db for the IOAudioControl.  This value matches the minimum
434 *  value attribute.  This is currently valid for Level controls or other driver-defined controls that have a
435 *  minimum and maximum db value.
436 */
437#define kIOAudioLevelControlMinDBKey		"IOAudioLevelControlMinDB"
438
439/*!
440 * @defined kIOAudioLevelControlMaxDBKey
441 * @abstract The key in the IORgistry for the IOAudioControl maximum db value attribute.
442 * @discussion The value returned by this key is a fixed point value in 16.16 format represented as a 32-bit
443 *  integer.  It represents the maximum value in db for the IOAudioControl.  This value matches the maximum
444 *  value attribute.  This is currently valid for Level controls or other driver-defined controls that have a
445 *  minimum and maximum db value.
446 */
447#define kIOAudioLevelControlMaxDBKey		"IOAudioLevelControlMaxDB"
448
449#define kIOAudioLevelControlRangesKey		"IOAudioLevelControlRanges"
450
451#define kIOAudioLevelControlUseLinearScale	"IOAudioLevelControlUseLinearScale"
452
453#define kIOAudioSelectorControlAvailableSelectionsKey	"IOAudioSelectorControlAvailableSelections"
454#define kIOAudioSelectorControlSelectionValueKey		"IOAudioSelectorControlSelectionValue"
455#define kIOAudioSelectorControlSelectionDescriptionKey	"IOAudioSelectorControlSelectionDescriptionKey"
456#define kIOAudioSelectorControlTransportValueKey		"IOAudioSelectorControlTransportValue"					// <rdar://8202424>
457
458#define kIOAudioSelectorControlClockSourceKey			"IOAudioSelectorControlClockSourceKey"
459
460
461#endif /* _IOAUDIODEFINES_H */
462