1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS Kernel Streaming 4 * FILE: drivers/wdm/audio/backpln/portcls/miniport.cpp 5 * PURPOSE: Miniport construction api 6 * PROGRAMMER: Andrew Greenwood 7 */ 8 9 #include "private.hpp" 10 11 #ifndef YDEBUG 12 #define NDEBUG 13 #endif 14 15 #include <debug.h> 16 17 NTSTATUS 18 NTAPI 19 PcNewMiniport( 20 OUT PMINIPORT* OutMiniport, 21 IN REFCLSID ClassId) 22 { 23 NTSTATUS Status = STATUS_INVALID_PARAMETER; 24 25 DPRINT("PcNewMiniport entered\n"); 26 PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL); 27 28 if (!OutMiniport) 29 { 30 DPRINT("PcNewMiniport was supplied a NULL OutPort parameter\n"); 31 return STATUS_INVALID_PARAMETER; 32 } 33 34 if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUART) || 35 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverUart) || 36 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverDMusUARTCapture)) 37 { 38 Status = NewMiniportDMusUART(OutMiniport, ClassId); 39 } 40 else if (IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynth) || 41 IsEqualGUIDAligned(ClassId, CLSID_MiniportDriverFmSynthWithVol)) 42 { 43 Status = NewMiniportFmSynth(OutMiniport, ClassId); 44 } 45 else 46 { 47 Status = STATUS_INVALID_PARAMETER; 48 } 49 50 DPRINT("PcNewMiniport Status %x\n", Status); 51 return Status; 52 } 53 54