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
22 cpp_quote("#ifndef __devicetopology_h__")
23 cpp_quote("#define __devicetopology_h__")
26 interface IControlInterface;
27 interface IDeviceTopology;
28 interface IControlChangeNotify;
34 cpp_quote("#ifndef E_NOTFOUND")
35 cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
38 cpp_quote("#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'")
39 cpp_quote("DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xe2c2e9de, 0x09b1, 0x4b04,0x84,0xe5, 0x07, 0x93, 0x12, 0x25, 0xee, 0x04);")
41 cpp_quote("#define _IKsControl_")
42 cpp_quote("#include <ks.h>")
43 cpp_quote("#include <ksmedia.h>")
44 cpp_quote("#ifndef _KS_")
56 typedef KSDATAFORMAT *PKSDATAFORMAT;
71 typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
72 typedef KSIDENTIFIER KSMETHOD, *PKSMETHOD;
73 typedef KSIDENTIFIER KSEVENT, *PKSEVENT;
80 eConnTypeAtapiInternal,
83 eConnTypeOtherDigital,
85 eConnTypeMultichannelAnalogDIN,
86 eConnTypeXlrProfessional,
101 eGeoLocInsideMobileLid,
104 eGeoLocOutsideMobileLid,
112 eGenLocPrimaryBox = 0,
121 ePortConnIntegratedDevice,
122 ePortConnBothIntegratedAndJack,
124 } EPxcPortConnection;
128 DWORD ChannelMapping;
130 EPcxConnectionType ConnectionType;
131 EPcxGeoLocation GeoLocation;
132 EPcxGenLocation GenLocation;
133 EPxcPortConnection PortConnection;
135 } KSJACK_DESCRIPTION;
137 typedef KSJACK_DESCRIPTION *PKSJACK_DESCRIPTION;
145 typedef struct _LUID *PLUID;
149 KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
150 KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
151 } KSJACK_SINK_CONNECTIONTYPE;
153 typedef struct _tagKSJACK_SINK_INFORMATION
155 KSJACK_SINK_CONNECTIONTYPE ConnType;
161 UCHAR SinkDescriptionLength;
162 WCHAR SinkDescription[32];
164 } KSJACK_SINK_INFORMATION;
166 typedef struct _tagKSJACK_DESCRIPTION2
168 DWORD DeviceStateInfo;
169 DWORD JackCapabilities;
170 } KSJACK_DESCRIPTION2;
172 typedef struct _tagKSJACK_DESCRIPTION2 *PKSJACK_DESCRIPTION2;
190 Unknown_Connector = 0,
199 pointer_default(unique),
201 uuid(28f54685-06fd-11d2-b27a-00a0c9223196),
205 interface IKsControl : IUnknown
208 [in] PKSPROPERTY Property,
209 [in] ULONG PropertyLength,
210 [in,out] void *PropertyData,
211 [in] ULONG DataLength,
212 [out] ULONG *BytesReturned
215 [in] PKSMETHOD Method,
216 [in] ULONG MethodLength,
217 [in,out] void *MethodData,
218 [in] ULONG DataLength,
219 [out] ULONG *BytesReturned
223 [in] ULONG EventLength,
224 [in,out] void *EventData,
225 [in] ULONG DataLength,
226 [out] ULONG *BytesReturned
231 pointer_default(unique),
233 uuid(c2f8e001-f205-4bc9-99bc-c13b1e048ccb),
237 interface IPerChannelDbLevel : IUnknown
239 HRESULT GetChannelCount(
240 [out] UINT *pcChannels
242 HRESULT GetLevelRange(
244 [out] float *pfMinLevelDB,
245 [out] float *pfMaxLevelDB,
246 [out] float *pfStepping
250 [out] float *pfLevelDB
255 [in,unique] LPCGUID pguidEventContext
257 HRESULT SetLevelUniform(
259 [in,unique] LPCGUID pguidEventContext
261 HRESULT SetLevelAllChannels(
262 [size_is(cChannels),in] float *aLevelsDB,
263 [in] ULONG cChannels,
264 [in] LPCGUID pguidEventContext
269 pointer_default(unique),
271 uuid(7fb7b48f-531d-44a2-bcb3-5ad5a134b3dc),
275 interface IAudioVolumeLevel : IPerChannelDbLevel
281 pointer_default(unique),
283 uuid(bb11c46f-ec28-493c-b88a-5db88062ce98),
287 interface IAudioChannelConfig : IUnknown
289 HRESULT SetChannelConfig(
291 [in] LPCGUID pguidEventContext
293 HRESULT GetChannelConfig(
295 [retval,out] DWORD *pdwConfig
300 pointer_default(unique),
302 uuid(7d8b1437-dd53-4350-9c1b-1ee2890bf938),
306 interface IAudioLoudness : IUnknown
309 [out] BOOL *pbEnabled
313 [in] LPCGUID pguidEventContext
318 pointer_default(unique),
320 uuid(4f03dc02-5e6e-4653-8f72-a030c123d598),
324 interface IAudioInputSelector : IUnknown
326 HRESULT GetSelection(
327 [out] UINT *pnIdSelected
329 HRESULT SetSelection(
331 [unique,in] LPCGUID pguidEventContext
336 pointer_default(unique),
338 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
342 interface IAudioOutputSelector : IUnknown
344 HRESULT GetSelection(
345 [out] UINT *pnIdSelected
347 HRESULT SetSelection(
349 [unique,in] LPCGUID pguidEventContext
354 pointer_default(unique),
356 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
360 interface IAudioMute : IUnknown
364 [unique,in] LPCGUID pguidEventContext
372 pointer_default(unique),
374 uuid(a2b1a1d9-4db3-425d-a2b2-bd335cb3e2e5),
378 interface IAudioBass : IPerChannelDbLevel
384 pointer_default(unique),
386 uuid(5e54b6d7-b44b-40d9-9a9e-e691d9ce6edf),
390 interface IAudioMidRange : IPerChannelDbLevel
396 pointer_default(unique),
398 uuid(0a717812-694e-4907-b74b-bafa5cfdca7b),
402 interface IAudioTreble : IPerChannelDbLevel
408 pointer_default(unique),
410 uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
414 interface IAudioAutoGainControl : IUnknown
418 [unique,in] LPCGUID pguidEventContext
421 [out] BOOL *pbEnabled
426 pointer_default(unique),
428 uuid(dd79923c-0599-45e0-b8b6-c8df7db6e796),
432 interface IAudioPeakMeter : IUnknown
434 HRESULT GetChannelCount(
435 [out] UINT *pcChannels
444 pointer_default(unique),
446 uuid(3b22bcbf-2586-4af0-8583-205d391b807c),
450 interface IDeviceSpecificProperty : IUnknown
453 [out] VARTYPE *pVType
456 [out] VARTYPE *pvType,
457 [out,in] DWORD *pcbValue
462 [in] LPCGUID pguidEventContext
467 [out] LONG *plStepping
472 pointer_default(unique),
474 uuid(3cb4a69d-bb6f-4d2b-95b7-452d2c155db5),
478 interface IKsFormatSupport : IUnknown
480 HRESULT IsFormatSupported(
481 [size_is(cbFormat),in] PKSDATAFORMAT pKsFormat,
483 [out] BOOL *pbSupported
485 HRESULT GetDevicePreferredFormat(
486 [out] PKSDATAFORMAT *ppKsFormat
491 pointer_default(unique),
493 uuid(4509f757-2d46-4637-8e62-ce7db944f57b),
497 interface IKsJackDescription : IUnknown
499 HRESULT GetJackCount(
502 HRESULT GetJackDescription(
504 [out] KSJACK_DESCRIPTION *pDescription
509 pointer_default(unique),
511 uuid(478f3a9b-e0c9-4827-9228-6f5505ffe76a),
515 interface IKsJackDescription2 : IUnknown
517 HRESULT GetJackCount(
520 HRESULT GetJackDescription2(
522 [out] KSJACK_DESCRIPTION2 *pDescription2
527 pointer_default(unique),
529 uuid(d9bd72ed-290f-4581-9ff3-61027a8fe532),
533 interface IKsJackSinkInformation : IUnknown
535 HRESULT GetJackSinkInformation(
536 [out] KSJACK_SINK_INFORMATION *pJackSinkInformation
541 pointer_default(unique),
543 uuid(6daa848c-5eb0-45cc-aea5-998a2cda1ffb),
547 interface IPartsList : IUnknown
559 pointer_default(unique),
561 uuid(ae2de0e4-5bca-4f2d-aa46-5d13f8fdb3a9),
565 interface IPart : IUnknown
568 [out] LPWSTR *ppwstrName
574 [out] LPWSTR *ppwstrGlobalId
577 [out] PartType *pPartType
582 HRESULT GetControlInterfaceCount(
585 HRESULT GetControlInterface(
587 [out] IControlInterface **ppInterfaceDesc
589 HRESULT EnumPartsIncoming(
590 [out] IPartsList **ppParts
592 HRESULT EnumPartsOutgoing(
593 [out] IPartsList **ppParts
595 HRESULT GetTopologyObjects(
596 [out] IDeviceTopology **ppTopology
599 [in] DWORD dwClsContext,
601 [iid_is(refiid),out] void **ppvObject
603 HRESULT RegisterControlChangeCallback(
605 [in] IControlChangeNotify *pNotify
607 HRESULT UnregisterControlChangeCallback(
608 [in] IControlChangeNotify *pNotify
613 pointer_default(unique),
615 uuid(9c2c4058-23f5-41de-877a-df3af236a09e),
619 interface IConnector : IUnknown
622 [out] ConnectorType *pType
625 [out] DataFlow *pFlow
628 [in] IConnector *pConnectTo
630 HRESULT Disconnect(void);
632 [out] BOOL *pbConnected
634 HRESULT GetConnectedTo(
635 [out] IConnector **ppConTo
637 HRESULT GetConnectorIdConnectedTo(
638 [out] LPWSTR *ppwstrConnectorId
640 HRESULT GetDeviceIdConnectedTo(
641 [out] LPWSTR *ppwstrDeviceId
646 pointer_default(unique),
648 uuid(82149a85-dba6-4487-86bb-ea8f7fefcc71),
652 interface ISubUnit: IUnknown
654 /* Empty IUnknown interface.. */
658 pointer_default(unique),
660 uuid(45d37c3f-5140-444a-ae24-400789f3cbf3),
664 interface IControlInterface : IUnknown
667 [out] LPWSTR *ppwstrName
675 pointer_default(unique),
677 uuid(a09513ed-c709-4d21-bd7b-5f34c47f3947),
681 interface IControlChangeNotify : IUnknown
684 [in] DWORD dwSenderProcessId,
685 [in] LPCGUID ppguidEventContext
690 pointer_default(unique),
692 uuid(2a07407e-6497-4a18-9787-32f79bd0d98f),
696 interface IDeviceTopology : IUnknown
698 HRESULT GetConnectorCount(
701 HRESULT GetConnector(
703 [out] IConnector **ppConnector
705 HRESULT GetSubunitCount(
710 [out] ISubUnit **ppConnector
717 [out] LPWSTR *ppwstrDeviceId
719 HRESULT GetSignalPath(
720 [in] IPart *pIPartFrom,
721 [in] IPart *pIPartTo,
722 [in] BOOL bRejectMixedPaths,
723 [out] IPartsList **ppParts
730 library DevTopologyLib
733 uuid(1df639d0-5ec1-47aa-9379-828dc1aa8c59),
735 coclass DeviceTopology
737 interface IDeviceTopology;
741 cpp_quote("#endif /*__devicetopology_h__*/")