Author: janderwald
Date: Wed Oct 14 20:09:28 2009
New Revision: 43463
URL:
http://svn.reactos.org/svn/reactos?rev=43463&view=rev
Log:
- Fix debugging flood
- Pass correct flags to KsProbeStreamIrp
- Remove dead code
Removed:
trunk/reactos/drivers/wdm/audio/backpln/portcls/port.hpp
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Wed Oct 14
20:09:28 2009
@@ -118,7 +118,10 @@
// ioctl from KsStudio
// Wdmaud already probes buffers, therefore no need to probe it again
// probe the stream irp
- Status = KsProbeStreamIrp(Irp, KSSTREAM_READ | KSPROBE_ALLOCATEMDL |
KSPROBE_PROBEANDLOCK | KSPROBE_ALLOWFORMATCHANGE | KSPROBE_SYSTEMADDRESS, 0);
+ if (IoStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_KS_WRITE_STREAM)
+ Status = KsProbeStreamIrp(Irp, KSSTREAM_WRITE | KSPROBE_ALLOCATEMDL |
KSPROBE_PROBEANDLOCK | KSPROBE_ALLOWFORMATCHANGE | KSPROBE_SYSTEMADDRESS, 0);
+ else
+ Status = KsProbeStreamIrp(Irp, KSSTREAM_READ| KSPROBE_ALLOCATEMDL |
KSPROBE_PROBEANDLOCK | KSPROBE_ALLOWFORMATCHANGE | KSPROBE_SYSTEMADDRESS, 0);
// check for success
if (!NT_SUCCESS(Status))
@@ -200,8 +203,7 @@
if (!Irp)
{
- DPRINT1("NoIrp\n");
- return STATUS_UNSUCCESSFUL;
+ DPRINT("NoIrp\n");
// no irp available, use silence buffer
*Buffer = (PUCHAR)m_SilenceBuffer;
*BufferSize = m_MaxFrameSize;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1] Wed
Oct 14 20:09:28 2009
@@ -614,7 +614,7 @@
}
Status = m_Stream->GetPosition(&Position);
- DPRINT1("Position %u Buffer %p BufferSize %u ActiveIrpOffset %u Capture
%u\n", Position, Buffer, m_CommonBufferSize, BufferSize, m_Capture);
+ DPRINT("Position %u Buffer %p BufferSize %u ActiveIrpOffset %u Capture
%u\n", Position, Buffer, m_CommonBufferSize, BufferSize, m_Capture);
if (Position < m_CommonBufferOffset)
{
Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/port.hpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port.hpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port.hpp (removed)
@@ -1,38 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS
- * FILE: drivers/multimedia/portcls/port/port.h
- * PURPOSE: Port Class driver / Private header for IPort
- * PROGRAMMER: Andrew Greenwood
- *
- * HISTORY:
- * 27 Jan 07 Created
- */
-
-
-/*
- Private header for Port implementations
-*/
-
-#ifndef PORT_PRIVATE_H
-#define PORT_PRIVATE_H
-
-#include "private.h"
-#include <stdunk.h>
-#include <portcls.h>
-
-#if 0
-typedef struct CPort
-{
- union
- {
- IUnknown IUnknown;
- IPort IPort;
- };
-
- LONG m_ref_count;
- PUNKNOWN m_outer_unknown;
-} CPort;
-#endif
-
-#endif
Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp (removed)
@@ -1,72 +1,0 @@
-/*
- ReactOS Operating System
- Port Class API / Port Factory
-
- by Andrew Greenwood
-*/
-
-#define INITGUID
-
-#include "private.h"
-#include <portcls.h>
-#include <ks.h>
-#include <kcom.h>
-#include "port.h"
-
-/*
- * @unimplemented
- */
-PORTCLASSAPI NTSTATUS NTAPI
-PcNewPort(
- OUT PPORT* OutPort,
- IN REFCLSID ClassId)
-{
- /*
- ClassId can be one of the following:
- CLSID_PortDMus -> IPortDMus (dmusicks.h) -- TODO
- CLSID_PortMidi -> IPortMidi
- CLSID_PortTopology -> IPortTopology
- CLSID_PortWaveCyclic -> IPortWaveCyclic
- CLSID_PortWavePci -> IPortWavePci
-
- TODO: What about PortWavePciStream?
- */
-
- PPORT new_port = NULL;
- NTSTATUS status = STATUS_UNSUCCESSFUL;
-
- if ( ! OutPort )
- {
- DPRINT("PcNewPort was supplied a NULL OutPort parameter\n");
- return STATUS_INVALID_PARAMETER;
- }
-
- if ( ( IsEqualGUIDAligned(ClassId, &CLSID_PortMidi) ) ||
- ( IsEqualGUIDAligned(ClassId, &CLSID_PortTopology) ) ||
- ( IsEqualGUIDAligned(ClassId, &CLSID_PortWaveCyclic) ) ||
- ( IsEqualGUIDAligned(ClassId, &CLSID_PortWavePci) ) )
- {
- DPRINT("Calling KoCreateInstance\n");
- /* Call KS.SYS's Kernel-mode COM function */
- status = KoCreateInstance(ClassId, NULL, CLSCTX_KERNEL_SERVER, &IID_IPort,
(PVOID*)&new_port);
- }
- else
- {
-
- DPRINT("PcNewPort received a CLSID it does not deal with\n");
- status = STATUS_NOT_SUPPORTED;
- }
-
- /* If an unsupported CLSID was handed to us, or the creation failed, we fail */
- if ( status != STATUS_SUCCESS )
- {
- return status;
- }
-
- /* Fill the caller's PPORT* to point to the new port */
- *OutPort = new_port;
-
- DPRINT("PcNewPort succeeded\n");
-
- return STATUS_SUCCESS;
-}