ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
342 discussions
Start a n
N
ew thread
[janderwald] 72790: [USBAUDIO] - allocate filter descriptor - fixes hang in win2k3
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Sep 24 11:17:32 2016 New Revision: 72790 URL:
http://svn.reactos.org/svn/reactos?rev=72790&view=rev
Log: [USBAUDIO] - allocate filter descriptor - fixes hang in win2k3 Modified: trunk/reactos/drivers/usb/usbaudio/filter.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] Sat Sep 24 11:17:32 2016 @@ -477,20 +477,25 @@ USBAudioCreateFilterContext( PKSDEVICE Device) { - KSFILTER_DESCRIPTOR FilterDescriptor; + PKSFILTER_DESCRIPTOR FilterDescriptor; PKSCOMPONENTID ComponentId; NTSTATUS Status; - /* clear filter descriptor */ - RtlZeroMemory(&FilterDescriptor, sizeof(KSFILTER_DESCRIPTOR)); + /* allocate descriptor */ + FilterDescriptor = AllocFunction(sizeof(KSFILTER_DESCRIPTOR)); + if (!FilterDescriptor) + { + /* no memory */ + return USBD_STATUS_INSUFFICIENT_RESOURCES; + } /* init filter descriptor*/ - FilterDescriptor.Version = KSFILTER_DESCRIPTOR_VERSION; - FilterDescriptor.Flags = 0; - FilterDescriptor.ReferenceGuid = &KSNAME_Filter; - FilterDescriptor.Dispatch = &USBAudioFilterDispatch; - FilterDescriptor.CategoriesCount = 1; - FilterDescriptor.Categories = &GUID_KSCATEGORY_AUDIO; + FilterDescriptor->Version = KSFILTER_DESCRIPTOR_VERSION; + FilterDescriptor->Flags = 0; + FilterDescriptor->ReferenceGuid = &KSNAME_Filter; + FilterDescriptor->Dispatch = &USBAudioFilterDispatch; + FilterDescriptor->CategoriesCount = 1; + FilterDescriptor->Categories = &GUID_KSCATEGORY_AUDIO; /* init component id*/ ComponentId = AllocFunction(sizeof(KSCOMPONENTID)); @@ -506,10 +511,10 @@ //FreeFunction(ComponentId); //return Status; } - FilterDescriptor.ComponentId = ComponentId; + FilterDescriptor->ComponentId = ComponentId; /* build pin descriptors */ - Status = USBAudioPinBuildDescriptors(Device, (PKSPIN_DESCRIPTOR_EX *)&FilterDescriptor.PinDescriptors, &FilterDescriptor.PinDescriptorsCount, &FilterDescriptor.PinDescriptorSize); + Status = USBAudioPinBuildDescriptors(Device, (PKSPIN_DESCRIPTOR_EX *)&FilterDescriptor->PinDescriptors, &FilterDescriptor->PinDescriptorsCount, &FilterDescriptor->PinDescriptorSize); if (!NT_SUCCESS(Status)) { /* failed*/ @@ -527,7 +532,7 @@ } /* lets create the filter */ - Status = KsCreateFilterFactory(Device->FunctionalDeviceObject, &FilterDescriptor, ReferenceString, NULL, KSCREATE_ITEM_FREEONSTOP, NULL, NULL, NULL); + Status = KsCreateFilterFactory(Device->FunctionalDeviceObject, FilterDescriptor, ReferenceString, NULL, KSCREATE_ITEM_FREEONSTOP, NULL, NULL, NULL); DPRINT1("KsCreateFilterFactory: %x\n", Status); return Status;
8 years, 3 months
1
0
0
0
[ekohl] 72789: [LSASRV] LsapSetLogonSessionData: Set the logon type and the user name of the selected session. LsapGetLogonSessionData: Fix the session data marshalling code. Now we can retrieve th...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Sep 24 09:38:17 2016 New Revision: 72789 URL:
http://svn.reactos.org/svn/reactos?rev=72789&view=rev
Log: [LSASRV] LsapSetLogonSessionData: Set the logon type and the user name of the selected session. LsapGetLogonSessionData: Fix the session data marshalling code. Now we can retrieve the logon type and user name of the logon sessions. Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c trunk/reactos/dll/win32/lsasrv/lsasrv.h trunk/reactos/dll/win32/lsasrv/session.c Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/authpacka…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] Sat Sep 24 09:38:17 2016 @@ -1606,7 +1606,9 @@ // TokenHandle = NULL; - Status = LsapSetLogonSessionData(&RequestMsg->LogonUser.Reply.LogonId); + Status = LsapSetLogonSessionData(&RequestMsg->LogonUser.Reply.LogonId, + LogonType, + AccountName); if (!NT_SUCCESS(Status)) { ERR("LsapSetLogonSessionData failed (Status 0x%08lx)\n", Status); Modified: trunk/reactos/dll/win32/lsasrv/lsasrv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsasrv.h?…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] Sat Sep 24 09:38:17 2016 @@ -447,7 +447,10 @@ _In_ PLSA_STRING PrimaryKeyValue); NTSTATUS -LsapSetLogonSessionData(IN PLUID LogonId); +LsapSetLogonSessionData( + _In_ PLUID LogonId, + _In_ ULONG LogonType, + _In_ PUNICODE_STRING UserName); NTSTATUS LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg); Modified: trunk/reactos/dll/win32/lsasrv/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/session.c…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/session.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/session.c [iso-8859-1] Sat Sep 24 09:38:17 2016 @@ -64,7 +64,10 @@ NTSTATUS -LsapSetLogonSessionData(IN PLUID LogonId) +LsapSetLogonSessionData( + _In_ PLUID LogonId, + _In_ ULONG LogonType, + _In_ PUNICODE_STRING UserName) { PLSAP_LOGON_SESSION Session; @@ -74,6 +77,17 @@ if (Session == NULL) return STATUS_NO_SUCH_LOGON_SESSION; + TRACE("LogonType %lu\n", LogonType); + Session->LogonType = LogonType; + + TRACE("UserName %wZ\n", UserName); + Session->UserName.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, UserName->MaximumLength); + if (Session->UserName.Buffer == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + Session->UserName.Length = UserName->Length; + Session->UserName.MaximumLength = UserName->MaximumLength; + RtlCopyMemory(Session->UserName.Buffer, UserName->Buffer, UserName->MaximumLength); return STATUS_SUCCESS; } @@ -369,9 +383,9 @@ if (Session->UserName.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->UserName.Buffer, Session->UserName.MaximumLength); + LocalSessionData->UserName.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->UserName.MaximumLength); - - LocalSessionData->UserName.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } /* Copy the LogonDomain string */ @@ -380,9 +394,9 @@ if (Session->LogonDomain.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->LogonDomain.Buffer, Session->LogonDomain.MaximumLength); + LocalSessionData->LogonDomain.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->LogonDomain.MaximumLength); - - LocalSessionData->LogonDomain.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } /* Copy the AuthenticationPackage string */ @@ -391,9 +405,9 @@ if (Session->AuthenticationPackage.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->AuthenticationPackage.Buffer, Session->AuthenticationPackage.MaximumLength); + LocalSessionData->AuthenticationPackage.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->AuthenticationPackage.MaximumLength); - - LocalSessionData->AuthenticationPackage.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } LocalSessionData->LogonType = Session->LogonType; @@ -403,9 +417,9 @@ if (Session->Sid != NULL) { RtlCopyMemory(Ptr, Session->Sid, SidLength); + LocalSessionData->Sid = (PSID)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + SidLength); - - LocalSessionData->Sid = (PSID)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } /* LogonTime */ @@ -417,9 +431,9 @@ if (Session->LogonServer.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->LogonServer.Buffer, Session->LogonServer.MaximumLength); + LocalSessionData->LogonServer.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->LogonServer.MaximumLength); - - LocalSessionData->LogonServer.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } /* Copy the DnsDomainName string */ @@ -428,9 +442,9 @@ if (Session->DnsDomainName.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->DnsDomainName.Buffer, Session->DnsDomainName.MaximumLength); + LocalSessionData->DnsDomainName.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->DnsDomainName.MaximumLength); - - LocalSessionData->DnsDomainName.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); } /* Copy the Upn string */ @@ -439,9 +453,9 @@ if (Session->Upn.MaximumLength != 0) { RtlCopyMemory(Ptr, Session->Upn.Buffer, Session->Upn.MaximumLength); + LocalSessionData->Upn.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); + Ptr = (PUCHAR)((ULONG_PTR)Ptr + Session->Upn.MaximumLength); - - LocalSessionData->Upn.Buffer = (PWSTR)((ULONG_PTR)Ptr - (ULONG_PTR)LocalSessionData); }
8 years, 3 months
1
0
0
0
[dchapyshev] 72788: [NTOSKRNL] Add missed _SEH2_YIELD's
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 24 09:34:09 2016 New Revision: 72788 URL:
http://svn.reactos.org/svn/reactos?rev=72788&view=rev
Log: [NTOSKRNL] Add missed _SEH2_YIELD's Modified: trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c trunk/reactos/ntoskrnl/ke/amd64/except.c trunk/reactos/ntoskrnl/lpc/send.c trunk/reactos/ntoskrnl/se/audit.c trunk/reactos/ntoskrnl/se/sd.c Modified: trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/amd64/kdx64.…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/amd64/kdx64.c [iso-8859-1] Sat Sep 24 09:34:09 2016 @@ -105,7 +105,7 @@ { _SEH2_YIELD(return STATUS_NO_SUCH_DEVICE); } - _SEH2_END + _SEH2_END; return STATUS_SUCCESS; } @@ -124,7 +124,7 @@ { _SEH2_YIELD(return STATUS_NO_SUCH_DEVICE); } - _SEH2_END + _SEH2_END; return STATUS_SUCCESS; } Modified: trunk/reactos/ntoskrnl/ke/amd64/except.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/except.c…
============================================================================== --- trunk/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] Sat Sep 24 09:34:09 2016 @@ -229,7 +229,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { } - _SEH2_END + _SEH2_END; } VOID Modified: trunk/reactos/ntoskrnl/lpc/send.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/send.c?rev=72…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/send.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/lpc/send.c [iso-8859-1] Sat Sep 24 09:34:09 2016 @@ -746,7 +746,7 @@ if (!NT_SUCCESS(Status)) { DPRINT1("LpcpVerifyMessageDataInfo failed\n"); - return Status; + _SEH2_YIELD(return Status); } } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) @@ -861,7 +861,7 @@ ObDereferenceObject(Port); DPRINT1("NumberOfEntries has changed: %u, %u\n", DataInfo->NumberOfEntries, NumberOfDataEntries); - return STATUS_INVALID_PARAMETER; + _SEH2_YIELD(return STATUS_INVALID_PARAMETER); } } Modified: trunk/reactos/ntoskrnl/se/audit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?rev=72…
============================================================================== --- trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] Sat Sep 24 09:34:09 2016 @@ -1101,7 +1101,7 @@ if (PrivilegeCount > SEP_PRIVILEGE_SET_MAX_COUNT) { Status = STATUS_INVALID_PARAMETER; - goto Cleanup; + _SEH2_YIELD(goto Cleanup); } /* Calculate the size of the PrivilegeSet structure */ @@ -1118,7 +1118,7 @@ { DPRINT1("Failed to allocate %u bytes\n", PrivilegeSetSize); Status = STATUS_INSUFFICIENT_RESOURCES; - goto Cleanup; + _SEH2_YIELD(goto Cleanup); } /* Copy the privileges */ @@ -1324,7 +1324,7 @@ if (PrivilegeCount > SEP_PRIVILEGE_SET_MAX_COUNT) { Status = STATUS_INVALID_PARAMETER; - goto Cleanup; + _SEH2_YIELD(goto Cleanup); } /* Calculate the size of the Privileges structure */ @@ -1341,7 +1341,7 @@ { DPRINT1("Failed to allocate %u bytes\n", PrivilegesSize); Status = STATUS_INSUFFICIENT_RESOURCES; - goto Cleanup; + _SEH2_YIELD(goto Cleanup); } /* Copy the privileges */ Modified: trunk/reactos/ntoskrnl/se/sd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=72788…
============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Sat Sep 24 09:34:09 2016 @@ -528,7 +528,7 @@ { _SEH2_YIELD(return _SEH2_GetExceptionCode()); } - _SEH2_END + _SEH2_END; /* * Allocate enough memory to store a complete copy of a self-relative
8 years, 3 months
1
0
0
0
[dchapyshev] 72787: [NTOSKRNL] Remove unneeded sanity checks
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 24 09:30:06 2016 New Revision: 72787 URL:
http://svn.reactos.org/svn/reactos?rev=72787&view=rev
Log: [NTOSKRNL] Remove unneeded sanity checks Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] Sat Sep 24 09:30:06 2016 @@ -25,7 +25,6 @@ \ /* Sanity checks */ \ ASSERT(KeGetCurrentIrql() <= APC_LEVEL); \ - ASSERT(_Thread == KeGetCurrentThread()); \ ASSERT((_Thread->SpecialApcDisable <= 0) && \ (_Thread->SpecialApcDisable != -32768)); \ \ @@ -42,7 +41,6 @@ \ /* Sanity checks */ \ ASSERT(KeGetCurrentIrql() <= APC_LEVEL); \ - ASSERT(_Thread == KeGetCurrentThread()); \ ASSERT(_Thread->SpecialApcDisable < 0); \ \ /* Leave region and check if APCs are OK now */ \ @@ -66,7 +64,6 @@ PKTHREAD _Thread = KeGetCurrentThread(); \ \ /* Sanity checks */ \ - ASSERT(_Thread == KeGetCurrentThread()); \ ASSERT((_Thread->KernelApcDisable <= 0) && \ (_Thread->KernelApcDisable != -32768)); \ \ @@ -82,7 +79,6 @@ PKTHREAD _Thread = KeGetCurrentThread(); \ \ /* Sanity checks */ \ - ASSERT(_Thread == KeGetCurrentThread()); \ ASSERT(_Thread->KernelApcDisable < 0); \ \ /* Enable Kernel APCs */ \
8 years, 3 months
1
0
0
0
[dchapyshev] 72786: [ACPPAGE] Update Russian translation
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 24 09:25:13 2016 New Revision: 72786 URL:
http://svn.reactos.org/svn/reactos?rev=72786&view=rev
Log: [ACPPAGE] Update Russian translation Modified: trunk/reactos/dll/shellext/acppage/lang/ru-RU.rc Modified: trunk/reactos/dll/shellext/acppage/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/acppage/lang/…
============================================================================== --- trunk/reactos/dll/shellext/acppage/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/acppage/lang/ru-RU.rc [iso-8859-1] Sat Sep 24 09:25:13 2016 @@ -4,7 +4,7 @@ IDD_ACPPAGESHEET DIALOGEX 0, 0, 224, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Compatibility" +CAPTION "СовмеÑÑимоÑÑÑ" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "ÐÑли Ñ Ð²Ð°Ñ ÐµÑÑÑ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ñ Ð·Ð°Ð¿ÑÑком ÑÑой пÑогÑÐ°Ð¼Ð¼Ñ Ð² ReactOS, вÑбеÑиÑе опеÑаÑионнÑÑ ÑиÑÑемÑ, коÑоÑой ReactOS бÑÐ´ÐµÑ Ð¿ÑедÑÑавлÑÑÑÑÑ Ð¿ÑиложениÑ.\nУÑÑиÑе, ÑабоÑа над ÑÑим модÑлем пÑодолжаеÑÑÑ, и на данном ÑÑапе он ниÑего не бÑÐ´ÐµÑ Ð´ÐµÐ»Ð°ÑÑ.", IDC_EXPLANATION, 7, 7 , 210, 31
8 years, 3 months
1
0
0
0
[janderwald] 72785: [USBAUDIO] - add pin dispatch routines
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Sep 24 08:35:25 2016 New Revision: 72785 URL:
http://svn.reactos.org/svn/reactos?rev=72785&view=rev
Log: [USBAUDIO] - add pin dispatch routines Modified: trunk/reactos/drivers/usb/usbaudio/filter.c trunk/reactos/drivers/usb/usbaudio/pin.c trunk/reactos/drivers/usb/usbaudio/usbaudio.h 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] Sat Sep 24 08:35:25 2016 @@ -77,6 +77,21 @@ NULL, NULL }; + +static KSPIN_DISPATCH UsbAudioPinDispatch = +{ + USBAudioPinCreate, + USBAudioPinClose, + USBAudioPinProcess, + USBAudioPinReset, + USBAudioPinSetDataFormat, + USBAudioPinSetDeviceState, + NULL, + NULL, + NULL, + NULL +}; + NTSTATUS BuildUSBAudioFilterTopology( @@ -382,6 +397,9 @@ { /* irp sink pins*/ TerminalDescriptor = UsbAudioGetStreamingTerminalDescriptorByIndex(DeviceExtension->ConfigurationDescriptor, Index); + ASSERT(TerminalDescriptor != NULL); + + Pins[Index].Dispatch = &UsbAudioPinDispatch; Pins[Index].PinDescriptor.InterfacesCount = 1; Pins[Index].PinDescriptor.Interfaces = &StandardPinInterface; Pins[Index].PinDescriptor.MediumsCount = 1; @@ -499,7 +517,6 @@ return Status; } - DbgBreakPoint(); /* build topology */ Status = BuildUSBAudioFilterTopology(Device); if (!NT_SUCCESS(Status)) 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] Sat Sep 24 08:35:25 2016 @@ -9,3 +9,66 @@ #include "usbaudio.h" +NTSTATUS +NTAPI +USBAudioPinCreate( + _In_ PKSPIN Pin, + _In_ PIRP Irp) +{ + UNIMPLEMENTED + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +USBAudioPinClose( + _In_ PKSPIN Pin, + _In_ PIRP Irp) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + + +NTSTATUS +NTAPI +USBAudioPinProcess( + _In_ PKSPIN Pin) +{ + UNIMPLEMENTED + return STATUS_SUCCESS; +} + + +VOID +NTAPI +USBAudioPinReset( + _In_ PKSPIN Pin) +{ + UNIMPLEMENTED +} + +NTSTATUS +NTAPI +USBAudioPinSetDataFormat( + _In_ PKSPIN Pin, + _In_opt_ PKSDATAFORMAT OldFormat, + _In_opt_ PKSMULTIPLE_ITEM OldAttributeList, + _In_ const KSDATARANGE* DataRange, + _In_opt_ const KSATTRIBUTE_LIST* AttributeRange) +{ + UNIMPLEMENTED + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +USBAudioPinSetDeviceState( + _In_ PKSPIN Pin, + _In_ KSSTATE ToState, + _In_ KSSTATE FromState) +{ + UNIMPLEMENTED + return STATUS_SUCCESS; +} Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] Sat Sep 24 08:35:25 2016 @@ -222,3 +222,44 @@ _In_ DEVICE_POWER_STATE To, _In_ DEVICE_POWER_STATE From ); + +/* pin.c*/ + +NTSTATUS +NTAPI +USBAudioPinCreate( + _In_ PKSPIN Pin, + _In_ PIRP Irp); + +NTSTATUS +NTAPI +USBAudioPinClose( + _In_ PKSPIN Pin, + _In_ PIRP Irp); + +NTSTATUS +NTAPI +USBAudioPinProcess( + _In_ PKSPIN Pin); + +VOID +NTAPI +USBAudioPinReset( + _In_ PKSPIN Pin); + +NTSTATUS +NTAPI +USBAudioPinSetDataFormat( + _In_ PKSPIN Pin, + _In_opt_ PKSDATAFORMAT OldFormat, + _In_opt_ PKSMULTIPLE_ITEM OldAttributeList, + _In_ const KSDATARANGE* DataRange, + _In_opt_ const KSATTRIBUTE_LIST* AttributeRange); + +NTSTATUS +NTAPI +USBAudioPinSetDeviceState( + _In_ PKSPIN Pin, + _In_ KSSTATE ToState, + _In_ KSSTATE FromState); +
8 years, 3 months
1
0
0
0
[cwittich] 72784: [DNSAPI] sync record.c with wine 1.9.19
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 24 07:32:25 2016 New Revision: 72784 URL:
http://svn.reactos.org/svn/reactos?rev=72784&view=rev
Log: [DNSAPI] sync record.c with wine 1.9.19 Modified: trunk/reactos/dll/win32/dnsapi/dnsapi/record.c Modified: trunk/reactos/dll/win32/dnsapi/dnsapi/record.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dnsapi/dnsapi/re…
============================================================================== --- trunk/reactos/dll/win32/dnsapi/dnsapi/record.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dnsapi/dnsapi/record.c [iso-8859-1] Sat Sep 24 07:32:25 2016 @@ -108,12 +108,15 @@ DPRINT( "(%p,%p)\n", r1, r2 ); - if (r1->wType != r2->wType || - r1->wDataLength != r2->wDataLength || - r1->Flags.DW != r2->Flags.DW || - r1->dwReserved != r2->dwReserved) return FALSE; - - wide = (r1->Flags.S.CharSet == DnsCharSetUnicode) ? TRUE : FALSE; + if (r1->wType != r2->wType || + r1->wDataLength != r2->wDataLength || + r1->Flags.S.Section != r2->Flags.S.Section || + r1->Flags.S.Delete != r2->Flags.S.Delete || + r1->Flags.S.Unused != r2->Flags.S.Unused || + r1->Flags.S.Reserved != r2->Flags.S.Reserved || + r1->dwReserved != r2->dwReserved) return FALSE; + + wide = (r1->Flags.S.CharSet == DnsCharSetUnicode || r1->Flags.S.CharSet == DnsCharSetUnknown); if (dns_strcmpX( r1->pName, r2->pName, wide )) return FALSE; switch (r1->wType) @@ -354,6 +357,7 @@ DPRINT1( "unhandled target charset: %d\n", out ); break; } + break; } case DnsCharSetUtf8: switch (out) @@ -365,6 +369,7 @@ DPRINT1( "unhandled target charset: %d\n", out ); break; } + break; case DnsCharSetAnsi: switch (out) { @@ -375,6 +380,7 @@ DPRINT1( "unhandled target charset: %d\n", out ); break; } + break; default: DPRINT1( "unhandled source charset: %d\n", in ); break;
8 years, 3 months
1
0
0
0
[janderwald] 72783: [USBAUDIO] - fix build with gcc
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 23 22:14:21 2016 New Revision: 72783 URL:
http://svn.reactos.org/svn/reactos?rev=72783&view=rev
Log: [USBAUDIO] - fix build with gcc Modified: trunk/reactos/drivers/usb/usbaudio/filter.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] Fri Sep 23 22:14:21 2016 @@ -45,13 +45,15 @@ KSDATARANGE BridgePinAudioFormat[] = { { - sizeof(KSDATAFORMAT), - 0, - 0, - 0, - {STATIC_KSDATAFORMAT_TYPE_AUDIO}, - {STATIC_KSDATAFORMAT_SUBTYPE_ANALOG}, - {STATIC_KSDATAFORMAT_SPECIFIER_NONE} + { + sizeof(KSDATAFORMAT), + 0, + 0, + 0, + {STATIC_KSDATAFORMAT_TYPE_AUDIO}, + {STATIC_KSDATAFORMAT_SUBTYPE_ANALOG}, + {STATIC_KSDATAFORMAT_SPECIFIER_NONE} + } } }; @@ -458,7 +460,6 @@ PKSDEVICE Device) { KSFILTER_DESCRIPTOR FilterDescriptor; - PDEVICE_EXTENSION DeviceExtension; PKSCOMPONENTID ComponentId; NTSTATUS Status; @@ -509,7 +510,6 @@ } /* lets create the filter */ - DeviceExtension = Device->Context; Status = KsCreateFilterFactory(Device->FunctionalDeviceObject, &FilterDescriptor, ReferenceString, NULL, KSCREATE_ITEM_FREEONSTOP, NULL, NULL, NULL); DPRINT1("KsCreateFilterFactory: %x\n", Status);
8 years, 3 months
1
0
0
0
[janderwald] 72782: [USBAUDIO] - fix warnings - implement UsbAudioGetDataRanges for filter descriptor
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 23 22:07:24 2016 New Revision: 72782 URL:
http://svn.reactos.org/svn/reactos?rev=72782&view=rev
Log: [USBAUDIO] - fix warnings - implement UsbAudioGetDataRanges for filter descriptor Modified: trunk/reactos/drivers/usb/usbaudio/filter.c trunk/reactos/drivers/usb/usbaudio/usbaudio.h 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] Fri Sep 23 22:07:24 2016 @@ -25,7 +25,9 @@ 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}, @@ -112,7 +114,7 @@ { if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ { - InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + InterfaceHeaderDescriptor = (PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR)USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); if (InterfaceHeaderDescriptor != NULL) { CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); @@ -127,7 +129,7 @@ } TotalTerminalCount++; } - CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) break; } @@ -203,7 +205,7 @@ { if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ { - InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + InterfaceHeaderDescriptor = (PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR)USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); if (InterfaceHeaderDescriptor != NULL) { CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); @@ -221,7 +223,7 @@ TerminalCount++; } } - CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) break; } @@ -249,7 +251,7 @@ { if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ { - InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + InterfaceHeaderDescriptor = (PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR)USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); if (InterfaceHeaderDescriptor != NULL) { CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); @@ -267,7 +269,7 @@ TerminalCount++; } } - CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) break; } @@ -277,6 +279,71 @@ return NULL; } +VOID +UsbAudioGetDataRanges( + IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + IN UCHAR bTerminalID, + OUT PKSDATARANGE** OutDataRanges, + OUT PULONG OutDataRangesCount) +{ + PUSB_AUDIO_STREAMING_INTERFACE_DESCRIPTOR StreamingInterfaceDescriptor; + PUSB_AUDIO_STREAMING_FORMAT_TYPE_DESCRIPTOR StreamingFormatDescriptor; + PUSB_INTERFACE_DESCRIPTOR Descriptor; + PKSDATARANGE_AUDIO DataRangeAudio; + PKSDATARANGE *DataRangeAudioArray; + ULONG NumFrequency; + + for (Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + Descriptor != NULL; + Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, (PVOID)((ULONG_PTR)Descriptor + Descriptor->bLength), -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1)) + { + if (Descriptor->bInterfaceSubClass == 0x02) /* AUDIO_STREAMING */ + { + StreamingInterfaceDescriptor = (PUSB_AUDIO_STREAMING_INTERFACE_DESCRIPTOR)USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + if (StreamingInterfaceDescriptor != NULL) + { + ASSERT(StreamingInterfaceDescriptor->bDescriptorSubtype == 0x01); + ASSERT(StreamingInterfaceDescriptor->wFormatTag == WAVE_FORMAT_PCM); + if (StreamingInterfaceDescriptor->bTerminalLink == bTerminalID) + { + StreamingFormatDescriptor = (PUSB_AUDIO_STREAMING_FORMAT_TYPE_DESCRIPTOR)((ULONG_PTR)StreamingInterfaceDescriptor + StreamingInterfaceDescriptor->bLength); + ASSERT(StreamingFormatDescriptor->bDescriptorType == 0x24); + ASSERT(StreamingFormatDescriptor->bDescriptorSubtype == 0x02); + ASSERT(StreamingFormatDescriptor->bFormatType == 0x01); + + DataRangeAudio = AllocFunction(sizeof(KSDATARANGE_AUDIO)); + if (DataRangeAudio == NULL) + { + /* no memory*/ + return; + } + + 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->MaximumChannels = 1; + DataRangeAudio->MinimumBitsPerSample = StreamingFormatDescriptor->bBitResolution; + DataRangeAudio->MaximumBitsPerSample = StreamingFormatDescriptor->bBitResolution; + NumFrequency = StreamingFormatDescriptor->bSamFreqType - 1; + DataRangeAudio->MinimumSampleFrequency = StreamingFormatDescriptor->tSamFreq[0] | StreamingFormatDescriptor->tSamFreq[1] << 8 | StreamingFormatDescriptor->tSamFreq[2] << 16; + DataRangeAudio->MaximumSampleFrequency = StreamingFormatDescriptor->tSamFreq[NumFrequency*3] | StreamingFormatDescriptor->tSamFreq[NumFrequency * 3+1] << 8 | StreamingFormatDescriptor->tSamFreq[NumFrequency * 3+2]<<16; + DataRangeAudioArray = AllocFunction(sizeof(PKSDATARANGE_AUDIO)); + if (DataRangeAudioArray == NULL) + { + /* no memory */ + FreeFunction(DataRangeAudio); + return; + } + DataRangeAudioArray[0] = (PKSDATARANGE)DataRangeAudio; + *OutDataRanges = DataRangeAudioArray; + *OutDataRangesCount = 1; + return; + } + } + } + } +} NTSTATUS @@ -318,6 +385,7 @@ Pins[Index].PinDescriptor.MediumsCount = 1; Pins[Index].PinDescriptor.Mediums = &StandardPinMedium; Pins[Index].PinDescriptor.Category = UsbAudioGetPinCategoryFromTerminalDescriptor(TerminalDescriptor); + UsbAudioGetDataRanges(DeviceExtension->ConfigurationDescriptor, TerminalDescriptor->bTerminalID, (PKSDATARANGE**)&Pins[Index].PinDescriptor.DataRanges, &Pins[Index].PinDescriptor.DataRangesCount); if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_OUTPUT_TERMINAL) { Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] Fri Sep 23 22:07:24 2016 @@ -74,6 +74,30 @@ UCHAR iChannelNames; UCHAR iTerminal; }USB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR, *PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR; + +typedef struct +{ + UCHAR bLength; + UCHAR bDescriptorType; + UCHAR bDescriptorSubtype; + UCHAR bTerminalLink; + UCHAR bDelay; + USHORT wFormatTag; +}USB_AUDIO_STREAMING_INTERFACE_DESCRIPTOR, *PUSB_AUDIO_STREAMING_INTERFACE_DESCRIPTOR; + +typedef struct +{ + UCHAR bLength; + UCHAR bDescriptorType; + UCHAR bDescriptorSubtype; + UCHAR bFormatType; + UCHAR bNrChannels; + UCHAR bSubframeSize; + UCHAR bBitResolution; + UCHAR bSamFreqType; + UCHAR tSamFreq[1]; +}USB_AUDIO_STREAMING_FORMAT_TYPE_DESCRIPTOR, *PUSB_AUDIO_STREAMING_FORMAT_TYPE_DESCRIPTOR; + #include <poppack.h> typedef struct __DEVICE_EXTENSION__
8 years, 3 months
1
0
0
0
[janderwald] 72781: [USBAUDIO] - start implementing USBAudioPinBuildDescriptors
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 23 19:53:19 2016 New Revision: 72781 URL:
http://svn.reactos.org/svn/reactos?rev=72781&view=rev
Log: [USBAUDIO] - start implementing USBAudioPinBuildDescriptors Modified: trunk/reactos/drivers/usb/usbaudio/filter.c trunk/reactos/drivers/usb/usbaudio/guid.c trunk/reactos/drivers/usb/usbaudio/usbaudio.h 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] Fri Sep 23 19:53:19 2016 @@ -9,6 +9,71 @@ #include "usbaudio.h" +GUID NodeTypeMicrophone = { STATIC_KSNODETYPE_MICROPHONE }; +GUID NodeTypeDesktopMicrophone = { STATIC_KSNODETYPE_DESKTOP_MICROPHONE }; +GUID NodeTypePersonalMicrophone = { STATIC_KSNODETYPE_PERSONAL_MICROPHONE }; +GUID NodeTypeOmmniMicrophone = { STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE }; +GUID NodeTypeArrayMicrophone = { STATIC_KSNODETYPE_MICROPHONE_ARRAY }; +GUID NodeTypeProcessingArrayMicrophone = { STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY }; +GUID NodeTypeSpeaker = { STATIC_KSNODETYPE_SPEAKER }; +GUID NodeTypeHeadphonesSpeaker = { STATIC_KSNODETYPE_HEADPHONES }; +GUID NodeTypeHMDA = { STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO }; +GUID NodeTypeDesktopSpeaker = { STATIC_KSNODETYPE_DESKTOP_SPEAKER }; +GUID NodeTypeRoomSpeaker = { STATIC_KSNODETYPE_ROOM_SPEAKER }; +GUID NodeTypeCommunicationSpeaker = { STATIC_KSNODETYPE_COMMUNICATION_SPEAKER }; +GUID NodeTypeSubwoofer = { STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER }; +GUID NodeTypeCapture = { STATIC_PINNAME_CAPTURE }; +GUID NodeTypePlayback = { STATIC_KSCATEGORY_AUDIO }; +GUID GUID_KSCATEGORY_AUDIO = { STATIC_KSCATEGORY_AUDIO }; + +KSPIN_INTERFACE StandardPinInterface = +{ + {STATIC_KSINTERFACESETID_Standard}, + KSINTERFACE_STANDARD_STREAMING, + 0 +}; + +KSPIN_MEDIUM StandardPinMedium = +{ + {STATIC_KSMEDIUMSETID_Standard}, + KSMEDIUM_TYPE_ANYINSTANCE, + 0 +}; + +KSDATARANGE BridgePinAudioFormat[] = +{ + { + sizeof(KSDATAFORMAT), + 0, + 0, + 0, + {STATIC_KSDATAFORMAT_TYPE_AUDIO}, + {STATIC_KSDATAFORMAT_SUBTYPE_ANALOG}, + {STATIC_KSDATAFORMAT_SPECIFIER_NONE} + } +}; + +static PKSDATARANGE BridgePinAudioFormats[] = +{ + &BridgePinAudioFormat[0] +}; + +static LPWSTR ReferenceString = L"global"; + +NTSTATUS +NTAPI +USBAudioFilterCreate( + PKSFILTER Filter, + PIRP Irp); + +static KSFILTER_DISPATCH USBAudioFilterDispatch = +{ + USBAudioFilterCreate, + NULL, + NULL, + NULL +}; + NTSTATUS BuildUSBAudioFilterTopology( PKSDEVICE Device) @@ -16,6 +81,17 @@ UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; } + +NTSTATUS +NTAPI +USBAudioFilterCreate( + PKSFILTER Filter, + PIRP Irp) +{ + UNIMPLEMENTED + return STATUS_SUCCESS; +} + VOID CountTerminalUnits( @@ -51,6 +127,9 @@ } TotalTerminalCount++; } + CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) + break; } } } @@ -61,8 +140,144 @@ } *NonStreamingTerminalDescriptorCount = NonStreamingTerminalCount; *TotalTerminalDescriptorCount = TotalTerminalCount; - -} +} + +LPGUID +UsbAudioGetPinCategoryFromTerminalDescriptor( + IN PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR TerminalDescriptor) +{ + if (TerminalDescriptor->wTerminalType == USB_AUDIO_MICROPHONE_TERMINAL_TYPE) + return &NodeTypeMicrophone; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_DESKTOP_MICROPHONE_TERMINAL_TYPE) + return &NodeTypeDesktopMicrophone; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_PERSONAL_MICROPHONE_TERMINAL_TYPE) + return &NodeTypePersonalMicrophone; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_OMMNI_MICROPHONE_TERMINAL_TYPE) + return &NodeTypeOmmniMicrophone; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_ARRAY_MICROPHONE_TERMINAL_TYPE) + return &NodeTypeArrayMicrophone; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_ARRAY_PROCESSING_MICROPHONE_TERMINAL_TYPE) + return &NodeTypeProcessingArrayMicrophone; + + /* playback types */ + if (TerminalDescriptor->wTerminalType == USB_AUDIO_SPEAKER_TERMINAL_TYPE) + return &NodeTypeSpeaker; + else if (TerminalDescriptor->wTerminalType == USB_HEADPHONES_SPEAKER_TERMINAL_TYPE) + return &NodeTypeHeadphonesSpeaker; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_HMDA_TERMINAL_TYPE) + return &NodeTypeHMDA; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_DESKTOP_SPEAKER_TERMINAL_TYPE) + return &NodeTypeDesktopSpeaker; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_ROOM_SPEAKER_TERMINAL_TYPE) + return &NodeTypeRoomSpeaker; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_COMMUNICATION_SPEAKER_TERMINAL_TYPE) + return &NodeTypeCommunicationSpeaker; + else if (TerminalDescriptor->wTerminalType == USB_AUDIO_SUBWOOFER_TERMINAL_TYPE) + return &NodeTypeSubwoofer; + + if (TerminalDescriptor->wTerminalType == USB_AUDIO_STREAMING_TERMINAL_TYPE) + { + if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_OUTPUT_TERMINAL) + return &NodeTypeCapture; + else if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_INPUT_TERMINAL) + return &NodeTypePlayback; + + } + return NULL; +} + +PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR +UsbAudioGetStreamingTerminalDescriptorByIndex( + IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + IN ULONG Index) +{ + PUSB_INTERFACE_DESCRIPTOR Descriptor; + PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR InterfaceHeaderDescriptor; + PUSB_COMMON_DESCRIPTOR CommonDescriptor; + PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR InputTerminalDescriptor; + ULONG TerminalCount = 0; + + for (Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + Descriptor != NULL; + Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, (PVOID)((ULONG_PTR)Descriptor + Descriptor->bLength), -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1)) + { + if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ + { + InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + if (InterfaceHeaderDescriptor != NULL) + { + CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + while (CommonDescriptor) + { + InputTerminalDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)CommonDescriptor; + if (InputTerminalDescriptor->bDescriptorSubtype == 0x02 /* INPUT TERMINAL*/ || InputTerminalDescriptor->bDescriptorSubtype == 0x03 /* OUTPUT_TERMINAL*/) + { + if (InputTerminalDescriptor->wTerminalType == USB_AUDIO_STREAMING_TERMINAL_TYPE) + { + if (TerminalCount == Index) + { + return InputTerminalDescriptor; + } + TerminalCount++; + } + } + CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) + break; + } + } + } + } + return NULL; +} + +PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR +UsbAudioGetNonStreamingTerminalDescriptorByIndex( + IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + IN ULONG Index) +{ + + PUSB_INTERFACE_DESCRIPTOR Descriptor; + PUSB_AUDIO_CONTROL_INTERFACE_HEADER_DESCRIPTOR InterfaceHeaderDescriptor; + PUSB_COMMON_DESCRIPTOR CommonDescriptor; + PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR InputTerminalDescriptor; + ULONG TerminalCount = 0; + + for (Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + Descriptor != NULL; + Descriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, (PVOID)((ULONG_PTR)Descriptor + Descriptor->bLength), -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1)) + { + if (Descriptor->bInterfaceSubClass == 0x01) /* AUDIO_CONTROL */ + { + InterfaceHeaderDescriptor = USBD_ParseDescriptors(ConfigurationDescriptor, ConfigurationDescriptor->wTotalLength, Descriptor, USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + if (InterfaceHeaderDescriptor != NULL) + { + CommonDescriptor = USBD_ParseDescriptors(InterfaceHeaderDescriptor, InterfaceHeaderDescriptor->wTotalLength, (PVOID)((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->bLength), USB_AUDIO_CONTROL_TERMINAL_DESCRIPTOR_TYPE); + while (CommonDescriptor) + { + InputTerminalDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)CommonDescriptor; + if (InputTerminalDescriptor->bDescriptorSubtype == 0x02 /* INPUT TERMINAL*/ || InputTerminalDescriptor->bDescriptorSubtype == 0x03 /* OUTPUT_TERMINAL*/) + { + if (InputTerminalDescriptor->wTerminalType != USB_AUDIO_STREAMING_TERMINAL_TYPE) + { + if (TerminalCount == Index) + { + return InputTerminalDescriptor; + } + TerminalCount++; + } + } + CommonDescriptor = (PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength); + if ((ULONG_PTR)CommonDescriptor >= ((ULONG_PTR)InterfaceHeaderDescriptor + InterfaceHeaderDescriptor->wTotalLength)) + break; + } + } + } + } + return NULL; +} + + NTSTATUS USBAudioPinBuildDescriptors( @@ -71,8 +286,83 @@ PULONG PinDescriptorsCount, PULONG PinDescriptorSize) { - UNIMPLEMENTED - return STATUS_NOT_IMPLEMENTED; + PDEVICE_EXTENSION DeviceExtension; + PKSPIN_DESCRIPTOR_EX Pins; + ULONG TotalTerminalDescriptorCount = 0; + ULONG NonStreamingTerminalDescriptorCount = 0; + ULONG Index = 0; + PUSB_AUDIO_CONTROL_INPUT_TERMINAL_DESCRIPTOR TerminalDescriptor = NULL; + + /* get device extension */ + DeviceExtension = Device->Context; + + CountTerminalUnits(DeviceExtension->ConfigurationDescriptor, &NonStreamingTerminalDescriptorCount, &TotalTerminalDescriptorCount); + DPRINT1("TotalTerminalDescriptorCount %lu NonStreamingTerminalDescriptorCount %lu", TotalTerminalDescriptorCount, NonStreamingTerminalDescriptorCount); + + /* allocate pins */ + Pins = AllocFunction(sizeof(KSPIN_DESCRIPTOR_EX) * TotalTerminalDescriptorCount); + if (!Pins) + { + /* no memory*/ + return STATUS_INSUFFICIENT_RESOURCES; + } + + for (Index = 0; Index < TotalTerminalDescriptorCount; Index++) + { + if (Index < (TotalTerminalDescriptorCount - NonStreamingTerminalDescriptorCount)) + { + /* irp sink pins*/ + TerminalDescriptor = UsbAudioGetStreamingTerminalDescriptorByIndex(DeviceExtension->ConfigurationDescriptor, Index); + Pins[Index].PinDescriptor.InterfacesCount = 1; + Pins[Index].PinDescriptor.Interfaces = &StandardPinInterface; + Pins[Index].PinDescriptor.MediumsCount = 1; + Pins[Index].PinDescriptor.Mediums = &StandardPinMedium; + Pins[Index].PinDescriptor.Category = UsbAudioGetPinCategoryFromTerminalDescriptor(TerminalDescriptor); + + if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_OUTPUT_TERMINAL) + { + Pins[Index].PinDescriptor.Communication = KSPIN_COMMUNICATION_BOTH; + Pins[Index].PinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT; + } + else if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_INPUT_TERMINAL) + { + Pins[Index].PinDescriptor.Communication = KSPIN_COMMUNICATION_SINK; + Pins[Index].PinDescriptor.DataFlow = KSPIN_DATAFLOW_IN; + } + + /* irp sinks / sources can be instantiated */ + Pins[Index].InstancesPossible = 1; + } + else + { + /* bridge pins */ + TerminalDescriptor = UsbAudioGetNonStreamingTerminalDescriptorByIndex(DeviceExtension->ConfigurationDescriptor, Index - (TotalTerminalDescriptorCount - NonStreamingTerminalDescriptorCount)); + Pins[Index].PinDescriptor.InterfacesCount = 1; + Pins[Index].PinDescriptor.Interfaces = &StandardPinInterface; + Pins[Index].PinDescriptor.MediumsCount = 1; + Pins[Index].PinDescriptor.Mediums = &StandardPinMedium; + Pins[Index].PinDescriptor.DataRanges = BridgePinAudioFormats; + Pins[Index].PinDescriptor.DataRangesCount = 1; + Pins[Index].PinDescriptor.Communication = KSPIN_COMMUNICATION_BRIDGE; + Pins[Index].PinDescriptor.Category = UsbAudioGetPinCategoryFromTerminalDescriptor(TerminalDescriptor); + + if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_INPUT_TERMINAL) + { + Pins[Index].PinDescriptor.DataFlow = KSPIN_DATAFLOW_IN; + } + else if (TerminalDescriptor->bDescriptorSubtype == USB_AUDIO_OUTPUT_TERMINAL) + { + Pins[Index].PinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT; + } + } + + } + + *PinDescriptors = Pins; + *PinDescriptorSize = sizeof(KSPIN_DESCRIPTOR_EX); + *PinDescriptorsCount = TotalTerminalDescriptorCount; + + return STATUS_SUCCESS; } NTSTATUS @@ -88,6 +378,7 @@ INIT_USBAUDIO_MID(&ComponentId->Manufacturer, DeviceExtension->DeviceDescriptor->idVendor); INIT_USBAUDIO_PID(&ComponentId->Product, DeviceExtension->DeviceDescriptor->idProduct); + //ComponentId->Component = KSCOMPONENTID_USBAUDIO; UNIMPLEMENTED return STATUS_NOT_IMPLEMENTED; } @@ -99,6 +390,7 @@ PKSDEVICE Device) { KSFILTER_DESCRIPTOR FilterDescriptor; + PDEVICE_EXTENSION DeviceExtension; PKSCOMPONENTID ComponentId; NTSTATUS Status; @@ -107,7 +399,11 @@ /* init filter descriptor*/ FilterDescriptor.Version = KSFILTER_DESCRIPTOR_VERSION; + FilterDescriptor.Flags = 0; FilterDescriptor.ReferenceGuid = &KSNAME_Filter; + FilterDescriptor.Dispatch = &USBAudioFilterDispatch; + FilterDescriptor.CategoriesCount = 1; + FilterDescriptor.Categories = &GUID_KSCATEGORY_AUDIO; /* init component id*/ ComponentId = AllocFunction(sizeof(KSCOMPONENTID)); @@ -134,14 +430,20 @@ return Status; } + DbgBreakPoint(); /* build topology */ Status = BuildUSBAudioFilterTopology(Device); if (!NT_SUCCESS(Status)) { /* failed*/ - FreeFunction(ComponentId); - return Status; - } + //FreeFunction(ComponentId); + //return Status; + } + + /* lets create the filter */ + DeviceExtension = Device->Context; + Status = KsCreateFilterFactory(Device->FunctionalDeviceObject, &FilterDescriptor, ReferenceString, NULL, KSCREATE_ITEM_FREEONSTOP, NULL, NULL, NULL); + DPRINT1("KsCreateFilterFactory: %x\n", Status); return Status; } 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] Fri Sep 23 19:53:19 2016 @@ -5,6 +5,7 @@ #include <initguid.h> #include <wdmguid.h> +#include <ksmedia.h> #include <hubbusif.h> #include <usbbusif.h> Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.h [iso-8859-1] Fri Sep 23 19:53:19 2016 @@ -32,6 +32,8 @@ #define USB_AUDIO_SUBWOOFER_TERMINAL_TYPE (0x0307) #define USB_AUDIO_UNDEFINED_TERMINAL_TYPE (0xFFFF) +#define USB_AUDIO_INPUT_TERMINAL (0x02) +#define USB_AUDIO_OUTPUT_TERMINAL (0x03) #include <pshpack1.h>
8 years, 3 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
35
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Results per page:
10
25
50
100
200