Author: janderwald
Date: Tue Sep 27 19:56:54 2016
New Revision: 72833
URL:
http://svn.reactos.org/svn/reactos?rev=72833&view=rev
Log:
[USBAUDIO]
- improve guid mess a bit
- thanks amine
Modified:
trunk/reactos/drivers/usb/usbaudio/filter.c
trunk/reactos/drivers/usb/usbaudio/guid.c
trunk/reactos/drivers/usb/usbaudio/pin.c
Modified: trunk/reactos/drivers/usb/usbaudio/filter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/filte…
==============================================================================
--- trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] Tue Sep 27 19:56:54 2016
@@ -25,9 +25,7 @@
GUID NodeTypeCapture = { STATIC_PINNAME_CAPTURE };
GUID NodeTypePlayback = { STATIC_KSCATEGORY_AUDIO };
GUID GUID_KSCATEGORY_AUDIO = { STATIC_KSCATEGORY_AUDIO };
-GUID GUID_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
-GUID GUID_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
-GUID GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {
STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX };
+
KSPIN_INTERFACE StandardPinInterface =
{
{STATIC_KSINTERFACESETID_Standard},
@@ -367,9 +365,9 @@
}
DataRangeAudio->DataRange.FormatSize = sizeof(KSDATARANGE_AUDIO);
- DataRangeAudio->DataRange.MajorFormat =
GUID_KSDATAFORMAT_TYPE_AUDIO;
- DataRangeAudio->DataRange.SubFormat =
GUID_KSDATAFORMAT_SUBTYPE_PCM;
- DataRangeAudio->DataRange.Specifier =
GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
+ DataRangeAudio->DataRange.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
+ DataRangeAudio->DataRange.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
+ DataRangeAudio->DataRange.Specifier =
KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
DataRangeAudio->MaximumChannels = 1;
DataRangeAudio->MinimumBitsPerSample =
StreamingFormatDescriptor->bBitResolution;
DataRangeAudio->MaximumBitsPerSample =
StreamingFormatDescriptor->bBitResolution;
Modified: trunk/reactos/drivers/usb/usbaudio/guid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/guid.…
==============================================================================
--- trunk/reactos/drivers/usb/usbaudio/guid.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbaudio/guid.c [iso-8859-1] Tue Sep 27 19:56:54 2016
@@ -1,14 +1,11 @@
/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
-//#include <wdm.h>
#include <initguid.h>
-#include <portcls.h>
-#include <wdmguid.h>
-#include <ksmedia.h>
-#include <hubbusif.h>
-#include <usbbusif.h>
/* FIXME */
DEFINE_GUID(KSNAME_Filter, 0x9b365890L, 0x165f, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf,
0xd1, 0x56, 0xe4);
+DEFINE_GUID(KSDATAFORMAT_TYPE_AUDIO, 0x73647561L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa,
0x00, 0x38, 0x9b, 0x71);
+DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001L, 0x0000, 0x0010, 0x80, 0x00, 0x00,
0xaa, 0x00, 0x38, 0x9b, 0x71);
+DEFINE_GUID(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, 0x05589f81L, 0xc356, 0x11ce, 0xbf, 0x01,
0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a);
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
Modified: trunk/reactos/drivers/usb/usbaudio/pin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/pin.c…
==============================================================================
--- trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] Tue Sep 27 19:56:54 2016
@@ -8,10 +8,6 @@
*/
#include "usbaudio.h"
-
-GUID GUID2_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
-GUID GUID2_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
-GUID GUID2_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {
STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX };
NTSTATUS
NTAPI
@@ -103,9 +99,9 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat,
&GUID2_KSDATAFORMAT_TYPE_AUDIO) &&
- IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat,
&GUID2_KSDATAFORMAT_SUBTYPE_PCM) &&
- IsEqualGUIDAligned(&Pin->ConnectionFormat->Specifier,
&GUID2_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
+ if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat,
&KSDATAFORMAT_TYPE_AUDIO) &&
+ IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat,
&KSDATAFORMAT_SUBTYPE_PCM) &&
+ IsEqualGUIDAligned(&Pin->ConnectionFormat->Specifier,
&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
{
WaveFormatEx = (PKSDATAFORMAT_WAVEFORMATEX)Pin->ConnectionFormat;
SampleRateBuffer[0] = (WaveFormatEx->WaveFormatEx.nSamplesPerSec >> 16)
& 0xFF;