2 * Core Audio device topology definitions
4 * Copyright 2009 Maarten Lankhorst
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 interface IControlInterface;
24 interface IDeviceTopology;
25 interface IControlChangeNotify;
31 cpp_quote("#ifndef E_NOTFOUND")
32 cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
35 cpp_quote("#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 0x64726148 /* 'draH' */")
36 cpp_quote("DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xe2c2e9de, 0x09b1, 0x4b04,0x84,0xe5, 0x07, 0x93, 0x12, 0x25, 0xee, 0x04);")
38 cpp_quote("#define _IKsControl_")
39 cpp_quote("#include <ks.h>")
40 cpp_quote("#include <ksmedia.h>")
41 cpp_quote("#ifndef _KS_")
53 typedef KSDATAFORMAT *PKSDATAFORMAT;
68 typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
69 typedef KSIDENTIFIER KSMETHOD, *PKSMETHOD;
70 typedef KSIDENTIFIER KSEVENT, *PKSEVENT;
77 eConnTypeAtapiInternal,
80 eConnTypeOtherDigital,
82 eConnTypeMultichannelAnalogDIN,
83 eConnTypeXlrProfessional,
98 eGeoLocInsideMobileLid,
101 eGeoLocOutsideMobileLid,
109 eGenLocPrimaryBox = 0,
118 ePortConnIntegratedDevice,
119 ePortConnBothIntegratedAndJack,
121 } EPxcPortConnection;
125 DWORD ChannelMapping;
127 EPcxConnectionType ConnectionType;
128 EPcxGeoLocation GeoLocation;
129 EPcxGenLocation GenLocation;
130 EPxcPortConnection PortConnection;
132 } KSJACK_DESCRIPTION;
134 typedef KSJACK_DESCRIPTION *PKSJACK_DESCRIPTION;
142 typedef struct _LUID *PLUID;
146 KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
147 KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
148 } KSJACK_SINK_CONNECTIONTYPE;
150 typedef struct _tagKSJACK_SINK_INFORMATION
152 KSJACK_SINK_CONNECTIONTYPE ConnType;
158 UCHAR SinkDescriptionLength;
159 WCHAR SinkDescription[32];
161 } KSJACK_SINK_INFORMATION;
163 typedef struct _tagKSJACK_DESCRIPTION2
165 DWORD DeviceStateInfo;
166 DWORD JackCapabilities;
167 } KSJACK_DESCRIPTION2;
169 typedef struct _tagKSJACK_DESCRIPTION2 *PKSJACK_DESCRIPTION2;
187 Unknown_Connector = 0,
196 pointer_default(unique),
198 uuid(28f54685-06fd-11d2-b27a-00a0c9223196),
202 interface IKsControl : IUnknown
205 [in] PKSPROPERTY Property,
206 [in] ULONG PropertyLength,
207 [in,out] void *PropertyData,
208 [in] ULONG DataLength,
209 [out] ULONG *BytesReturned
212 [in] PKSMETHOD Method,
213 [in] ULONG MethodLength,
214 [in,out] void *MethodData,
215 [in] ULONG DataLength,
216 [out] ULONG *BytesReturned
220 [in] ULONG EventLength,
221 [in,out] void *EventData,
222 [in] ULONG DataLength,
223 [out] ULONG *BytesReturned
228 pointer_default(unique),
230 uuid(c2f8e001-f205-4bc9-99bc-c13b1e048ccb),
234 interface IPerChannelDbLevel : IUnknown
236 HRESULT GetChannelCount(
237 [out] UINT *pcChannels
239 HRESULT GetLevelRange(
241 [out] float *pfMinLevelDB,
242 [out] float *pfMaxLevelDB,
243 [out] float *pfStepping
247 [out] float *pfLevelDB
252 [in,unique] LPCGUID pguidEventContext
254 HRESULT SetLevelUniform(
256 [in,unique] LPCGUID pguidEventContext
258 HRESULT SetLevelAllChannels(
259 [size_is(cChannels),in] float *aLevelsDB,
260 [in] ULONG cChannels,
261 [in] LPCGUID pguidEventContext
266 pointer_default(unique),
268 uuid(7fb7b48f-531d-44a2-bcb3-5ad5a134b3dc),
272 interface IAudioVolumeLevel : IPerChannelDbLevel
278 pointer_default(unique),
280 uuid(bb11c46f-ec28-493c-b88a-5db88062ce98),
284 interface IAudioChannelConfig : IUnknown
286 HRESULT SetChannelConfig(
288 [in] LPCGUID pguidEventContext
290 HRESULT GetChannelConfig(
292 [retval,out] DWORD *pdwConfig
297 pointer_default(unique),
299 uuid(7d8b1437-dd53-4350-9c1b-1ee2890bf938),
303 interface IAudioLoudness : IUnknown
306 [out] BOOL *pbEnabled
310 [in] LPCGUID pguidEventContext
315 pointer_default(unique),
317 uuid(4f03dc02-5e6e-4653-8f72-a030c123d598),
321 interface IAudioInputSelector : IUnknown
323 HRESULT GetSelection(
324 [out] UINT *pnIdSelected
326 HRESULT SetSelection(
328 [unique,in] LPCGUID pguidEventContext
333 pointer_default(unique),
335 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
339 interface IAudioOutputSelector : IUnknown
341 HRESULT GetSelection(
342 [out] UINT *pnIdSelected
344 HRESULT SetSelection(
346 [unique,in] LPCGUID pguidEventContext
351 pointer_default(unique),
353 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
357 interface IAudioMute : IUnknown
361 [unique,in] LPCGUID pguidEventContext
369 pointer_default(unique),
371 uuid(a2b1a1d9-4db3-425d-a2b2-bd335cb3e2e5),
375 interface IAudioBass : IPerChannelDbLevel
381 pointer_default(unique),
383 uuid(5e54b6d7-b44b-40d9-9a9e-e691d9ce6edf),
387 interface IAudioMidRange : IPerChannelDbLevel
393 pointer_default(unique),
395 uuid(0a717812-694e-4907-b74b-bafa5cfdca7b),
399 interface IAudioTreble : IPerChannelDbLevel
405 pointer_default(unique),
407 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
411 interface IAudioAutoGainControl : IUnknown
415 [unique,in] LPCGUID pguidEventContext
418 [out] BOOL *pbEnabled
423 pointer_default(unique),
425 uuid(dd79923c-0599-45e0-b8b6-c8df7db6e796),
429 interface IAudioPeakMeter : IUnknown
431 HRESULT GetChannelCount(
432 [out] UINT *pcChannels
441 pointer_default(unique),
443 uuid(3b22bcbf-2586-4af0-8583-205d391b807c),
447 interface IDeviceSpecificProperty : IUnknown
450 [out] VARTYPE *pVType
453 [out] VARTYPE *pvType,
454 [out,in] DWORD *pcbValue
459 [in] LPCGUID pguidEventContext
464 [out] LONG *plStepping
469 pointer_default(unique),
471 uuid(3cb4a69d-bb6f-4d2b-95b7-452d2c155db5),
475 interface IKsFormatSupport : IUnknown
477 HRESULT IsFormatSupported(
478 [size_is(cbFormat),in] PKSDATAFORMAT pKsFormat,
480 [out] BOOL *pbSupported
482 HRESULT GetDevicePreferredFormat(
483 [out] PKSDATAFORMAT *ppKsFormat
488 pointer_default(unique),
490 uuid(4509f757-2d46-4637-8e62-ce7db944f57b),
494 interface IKsJackDescription : IUnknown
496 HRESULT GetJackCount(
499 HRESULT GetJackDescription(
501 [out] KSJACK_DESCRIPTION *pDescription
506 pointer_default(unique),
508 uuid(478f3a9b-e0c9-4827-9228-6f5505ffe76a),
512 interface IKsJackDescription2 : IUnknown
514 HRESULT GetJackCount(
517 HRESULT GetJackDescription2(
519 [out] KSJACK_DESCRIPTION2 *pDescription2
524 pointer_default(unique),
526 uuid(d9bd72ed-290f-4581-9ff3-61027a8fe532),
530 interface IKsJackSinkInformation : IUnknown
532 HRESULT GetJackSinkInformation(
533 [out] KSJACK_SINK_INFORMATION *pJackSinkInformation
538 pointer_default(unique),
540 uuid(6daa848c-5eb0-45cc-aea5-998a2cda1ffb),
544 interface IPartsList : IUnknown
556 pointer_default(unique),
558 uuid(ae2de0e4-5bca-4f2d-aa46-5d13f8fdb3a9),
562 interface IPart : IUnknown
565 [out] LPWSTR *ppwstrName
571 [out] LPWSTR *ppwstrGlobalId
574 [out] PartType *pPartType
579 HRESULT GetControlInterfaceCount(
582 HRESULT GetControlInterface(
584 [out] IControlInterface **ppInterfaceDesc
586 HRESULT EnumPartsIncoming(
587 [out] IPartsList **ppParts
589 HRESULT EnumPartsOutgoing(
590 [out] IPartsList **ppParts
592 HRESULT GetTopologyObjects(
593 [out] IDeviceTopology **ppTopology
596 [in] DWORD dwClsContext,
598 [iid_is(refiid),out] void **ppvObject
600 HRESULT RegisterControlChangeCallback(
602 [in] IControlChangeNotify *pNotify
604 HRESULT UnregisterControlChangeCallback(
605 [in] IControlChangeNotify *pNotify
610 pointer_default(unique),
612 uuid(9c2c4058-23f5-41de-877a-df3af236a09e),
616 interface IConnector : IUnknown
619 [out] ConnectorType *pType
622 [out] DataFlow *pFlow
625 [in] IConnector *pConnectTo
627 HRESULT Disconnect(void);
629 [out] BOOL *pbConnected
631 HRESULT GetConnectedTo(
632 [out] IConnector **ppConTo
634 HRESULT GetConnectorIdConnectedTo(
635 [out] LPWSTR *ppwstrConnectorId
637 HRESULT GetDeviceIdConnectedTo(
638 [out] LPWSTR *ppwstrDeviceId
643 pointer_default(unique),
645 uuid(82149a85-dba6-4487-86bb-ea8f7fefcc71),
649 interface ISubUnit: IUnknown
651 /* Empty IUnknown interface.. */
655 pointer_default(unique),
657 uuid(45d37c3f-5140-444a-ae24-400789f3cbf3),
661 interface IControlInterface : IUnknown
664 [out] LPWSTR *ppwstrName
672 pointer_default(unique),
674 uuid(a09513ed-c709-4d21-bd7b-5f34c47f3947),
678 interface IControlChangeNotify : IUnknown
681 [in] DWORD dwSenderProcessId,
682 [in] LPCGUID ppguidEventContext
687 pointer_default(unique),
689 uuid(2a07407e-6497-4a18-9787-32f79bd0d98f),
693 interface IDeviceTopology : IUnknown
695 HRESULT GetConnectorCount(
698 HRESULT GetConnector(
700 [out] IConnector **ppConnector
702 HRESULT GetSubunitCount(
707 [out] ISubUnit **ppConnector
714 [out] LPWSTR *ppwstrDeviceId
716 HRESULT GetSignalPath(
717 [in] IPart *pIPartFrom,
718 [in] IPart *pIPartTo,
719 [in] BOOL bRejectMixedPaths,
720 [out] IPartsList **ppParts
727 library DevTopologyLib
730 uuid(1df639d0-5ec1-47aa-9379-828dc1aa8c59),
732 coclass DeviceTopology
734 interface IDeviceTopology;